aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r--sound/pci/atiixp.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index cb1741102bbc..332a71de9673 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -39,24 +39,21 @@ MODULE_DESCRIPTION("ATI IXP AC97 controller");
39MODULE_LICENSE("GPL"); 39MODULE_LICENSE("GPL");
40MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400}}"); 40MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400}}");
41 41
42static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 42static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
43static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 43static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */
44static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ 44static int ac97_clock = 48000;
45static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000}; 45static char *ac97_quirk;
46static char *ac97_quirk[SNDRV_CARDS]; 46static int spdif_aclink = 1;
47static int spdif_aclink[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; 47
48 48module_param(index, int, 0444);
49module_param_array(index, int, NULL, 0444);
50MODULE_PARM_DESC(index, "Index value for ATI IXP controller."); 49MODULE_PARM_DESC(index, "Index value for ATI IXP controller.");
51module_param_array(id, charp, NULL, 0444); 50module_param(id, charp, 0444);
52MODULE_PARM_DESC(id, "ID string for ATI IXP controller."); 51MODULE_PARM_DESC(id, "ID string for ATI IXP controller.");
53module_param_array(enable, bool, NULL, 0444); 52module_param(ac97_clock, int, 0444);
54MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller.");
55module_param_array(ac97_clock, int, NULL, 0444);
56MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); 53MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
57module_param_array(ac97_quirk, charp, NULL, 0444); 54module_param(ac97_quirk, charp, 0444);
58MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 55MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
59module_param_array(spdif_aclink, bool, NULL, 0444); 56module_param(spdif_aclink, bool, 0444);
60MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link."); 57MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
61 58
62 59
@@ -1578,26 +1575,18 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
1578static int __devinit snd_atiixp_probe(struct pci_dev *pci, 1575static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1579 const struct pci_device_id *pci_id) 1576 const struct pci_device_id *pci_id)
1580{ 1577{
1581 static int dev;
1582 snd_card_t *card; 1578 snd_card_t *card;
1583 atiixp_t *chip; 1579 atiixp_t *chip;
1584 unsigned char revision; 1580 unsigned char revision;
1585 int err; 1581 int err;
1586 1582
1587 if (dev >= SNDRV_CARDS) 1583 card = snd_card_new(index, id, THIS_MODULE, 0);
1588 return -ENODEV;
1589 if (!enable[dev]) {
1590 dev++;
1591 return -ENOENT;
1592 }
1593
1594 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
1595 if (card == NULL) 1584 if (card == NULL)
1596 return -ENOMEM; 1585 return -ENOMEM;
1597 1586
1598 pci_read_config_byte(pci, PCI_REVISION_ID, &revision); 1587 pci_read_config_byte(pci, PCI_REVISION_ID, &revision);
1599 1588
1600 strcpy(card->driver, spdif_aclink[dev] ? "ATIIXP" : "ATIIXP-SPDMA"); 1589 strcpy(card->driver, spdif_aclink ? "ATIIXP" : "ATIIXP-SPDMA");
1601 strcpy(card->shortname, "ATI IXP"); 1590 strcpy(card->shortname, "ATI IXP");
1602 if ((err = snd_atiixp_create(card, pci, &chip)) < 0) 1591 if ((err = snd_atiixp_create(card, pci, &chip)) < 0)
1603 goto __error; 1592 goto __error;
@@ -1605,9 +1594,9 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1605 if ((err = snd_atiixp_aclink_reset(chip)) < 0) 1594 if ((err = snd_atiixp_aclink_reset(chip)) < 0)
1606 goto __error; 1595 goto __error;
1607 1596
1608 chip->spdif_over_aclink = spdif_aclink[dev]; 1597 chip->spdif_over_aclink = spdif_aclink;
1609 1598
1610 if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev], ac97_quirk[dev])) < 0) 1599 if ((err = snd_atiixp_mixer_new(chip, ac97_clock, ac97_quirk)) < 0)
1611 goto __error; 1600 goto __error;
1612 1601
1613 if ((err = snd_atiixp_pcm_new(chip)) < 0) 1602 if ((err = snd_atiixp_pcm_new(chip)) < 0)
@@ -1628,7 +1617,6 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1628 goto __error; 1617 goto __error;
1629 1618
1630 pci_set_drvdata(pci, card); 1619 pci_set_drvdata(pci, card);
1631 dev++;
1632 return 0; 1620 return 0;
1633 1621
1634 __error: 1622 __error: