diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-10-04 02:46:51 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:17:16 -0500 |
commit | b7fe46220487f684abc858865cff817389af5c76 (patch) | |
tree | d1eabbbdd0f686c87996133fd22ce2327da638c1 /sound/pci/hda/hda_intel.c | |
parent | 4b0940f8117b6cdf7e7c27bdecc29931f18c81ed (diff) |
[ALSA] highlanderize motherboard AC97/HDA drivers
Remove the code for supporting eight cards from the integrated
controller drivers because There Can Be Only One controller of
each type per mainboard.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index faf9dd00ba6c..d9e88dfe8171 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -47,21 +47,18 @@ | |||
47 | #include "hda_codec.h" | 47 | #include "hda_codec.h" |
48 | 48 | ||
49 | 49 | ||
50 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; | 50 | static int index = SNDRV_DEFAULT_IDX1; |
51 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 51 | static char *id = SNDRV_DEFAULT_STR1; |
52 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; | 52 | static char *model; |
53 | static char *model[SNDRV_CARDS]; | 53 | static int position_fix; |
54 | static int position_fix[SNDRV_CARDS]; | ||
55 | 54 | ||
56 | module_param_array(index, int, NULL, 0444); | 55 | module_param(index, int, 0444); |
57 | MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); | 56 | MODULE_PARM_DESC(index, "Index value for Intel HD audio interface."); |
58 | module_param_array(id, charp, NULL, 0444); | 57 | module_param(id, charp, 0444); |
59 | MODULE_PARM_DESC(id, "ID string for Intel HD audio interface."); | 58 | MODULE_PARM_DESC(id, "ID string for Intel HD audio interface."); |
60 | module_param_array(enable, bool, NULL, 0444); | 59 | module_param(model, charp, 0444); |
61 | MODULE_PARM_DESC(enable, "Enable Intel HD audio interface."); | ||
62 | module_param_array(model, charp, NULL, 0444); | ||
63 | MODULE_PARM_DESC(model, "Use the given board model."); | 60 | MODULE_PARM_DESC(model, "Use the given board model."); |
64 | module_param_array(position_fix, int, NULL, 0444); | 61 | module_param(position_fix, int, 0444); |
65 | MODULE_PARM_DESC(position_fix, "Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)."); | 62 | MODULE_PARM_DESC(position_fix, "Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)."); |
66 | 63 | ||
67 | MODULE_LICENSE("GPL"); | 64 | MODULE_LICENSE("GPL"); |
@@ -1544,32 +1541,24 @@ static int __devinit azx_create(snd_card_t *card, struct pci_dev *pci, | |||
1544 | 1541 | ||
1545 | static int __devinit azx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | 1542 | static int __devinit azx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) |
1546 | { | 1543 | { |
1547 | static int dev; | ||
1548 | snd_card_t *card; | 1544 | snd_card_t *card; |
1549 | azx_t *chip; | 1545 | azx_t *chip; |
1550 | int err = 0; | 1546 | int err = 0; |
1551 | 1547 | ||
1552 | if (dev >= SNDRV_CARDS) | 1548 | card = snd_card_new(index, id, THIS_MODULE, 0); |
1553 | return -ENODEV; | ||
1554 | if (! enable[dev]) { | ||
1555 | dev++; | ||
1556 | return -ENOENT; | ||
1557 | } | ||
1558 | |||
1559 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | ||
1560 | if (NULL == card) { | 1549 | if (NULL == card) { |
1561 | snd_printk(KERN_ERR SFX "Error creating card!\n"); | 1550 | snd_printk(KERN_ERR SFX "Error creating card!\n"); |
1562 | return -ENOMEM; | 1551 | return -ENOMEM; |
1563 | } | 1552 | } |
1564 | 1553 | ||
1565 | if ((err = azx_create(card, pci, position_fix[dev], pci_id->driver_data, | 1554 | if ((err = azx_create(card, pci, position_fix, pci_id->driver_data, |
1566 | &chip)) < 0) { | 1555 | &chip)) < 0) { |
1567 | snd_card_free(card); | 1556 | snd_card_free(card); |
1568 | return err; | 1557 | return err; |
1569 | } | 1558 | } |
1570 | 1559 | ||
1571 | /* create codec instances */ | 1560 | /* create codec instances */ |
1572 | if ((err = azx_codec_create(chip, model[dev])) < 0) { | 1561 | if ((err = azx_codec_create(chip, model)) < 0) { |
1573 | snd_card_free(card); | 1562 | snd_card_free(card); |
1574 | return err; | 1563 | return err; |
1575 | } | 1564 | } |
@@ -1595,7 +1584,6 @@ static int __devinit azx_probe(struct pci_dev *pci, const struct pci_device_id * | |||
1595 | } | 1584 | } |
1596 | 1585 | ||
1597 | pci_set_drvdata(pci, card); | 1586 | pci_set_drvdata(pci, card); |
1598 | dev++; | ||
1599 | 1587 | ||
1600 | return err; | 1588 | return err; |
1601 | } | 1589 | } |