[ALSA] Add dummy obsoleted module options for backward compatibility
[linux-block.git] / sound / pci / atiixp_modem.c
index c1a239a4dac642b785d354960f6a1c76f225c223..ab39c0b7cceeca40d117e2b4a40611feda8be37f 100644 (file)
@@ -39,20 +39,21 @@ MODULE_DESCRIPTION("ATI IXP MC97 controller");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250}}");
 
-static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */
-static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
-static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;     /* Enable this card */
-static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
+static int index = -2; /* Exclude the first card */
+static char *id = SNDRV_DEFAULT_STR1;  /* ID for this card */
+static int ac97_clock = 48000;
 
-module_param_array(index, int, NULL, 0444);
+module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for ATI IXP controller.");
-module_param_array(id, charp, NULL, 0444);
+module_param(id, charp, 0444);
 MODULE_PARM_DESC(id, "ID string for ATI IXP controller.");
-module_param_array(enable, bool, NULL, 0444);
-MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller.");
-module_param_array(ac97_clock, int, NULL, 0444);
+module_param(ac97_clock, int, 0444);
 MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
 
+/* just for backward compatibility */
+static int enable;
+module_param(enable, int, 0444);
+
 
 /*
  */
@@ -989,6 +990,7 @@ static int __devinit snd_atiixp_pcm_new(atiixp_t *chip)
                return err;
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_atiixp_playback_ops);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_atiixp_capture_ops);
+       pcm->dev_class = SNDRV_PCM_CLASS_MODEM;
        pcm->private_data = chip;
        strcpy(pcm->name, "ATI IXP MC97");
        chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm;
@@ -1067,7 +1069,6 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock)
        if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0)
                return err;
        pbus->clock = clock;
-       pbus->shared_type = AC97_SHARED_TYPE_ATIIXP;    /* shared with audio driver */
        chip->ac97_bus = pbus;
 
        codec_count = 0;
@@ -1256,20 +1257,12 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
 static int __devinit snd_atiixp_probe(struct pci_dev *pci,
                                      const struct pci_device_id *pci_id)
 {
-       static int dev;
        snd_card_t *card;
        atiixp_t *chip;
        unsigned char revision;
        int err;
 
-       if (dev >= SNDRV_CARDS)
-               return -ENODEV;
-       if (!enable[dev]) {
-               dev++;
-               return -ENOENT;
-       }
-
-       card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
+       card = snd_card_new(index, id, THIS_MODULE, 0);
        if (card == NULL)
                return -ENOMEM;
 
@@ -1283,7 +1276,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
        if ((err = snd_atiixp_aclink_reset(chip)) < 0)
                goto __error;
 
-       if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev])) < 0)
+       if ((err = snd_atiixp_mixer_new(chip, ac97_clock)) < 0)
                goto __error;
 
        if ((err = snd_atiixp_pcm_new(chip)) < 0)
@@ -1302,7 +1295,6 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
                goto __error;
 
        pci_set_drvdata(pci, card);
-       dev++;
        return 0;
 
  __error: