summaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-10-04 08:46:51 +0200
committerJaroslav Kysela <perex@suse.cz>2005-11-04 13:17:16 +0100
commitb7fe46220487f684abc858865cff817389af5c76 (patch)
treed1eabbbdd0f686c87996133fd22ce2327da638c1 /sound/pci/atiixp.c
parent4b0940f8117b6cdf7e7c27bdecc29931f18c81ed (diff)
downloadop-kernel-dev-b7fe46220487f684abc858865cff817389af5c76.zip
op-kernel-dev-b7fe46220487f684abc858865cff817389af5c76.tar.gz
[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/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 cb17411..332a71d 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -39,24 +39,21 @@ MODULE_DESCRIPTION("ATI IXP AC97 controller");
MODULE_LICENSE("GPL");
MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400}}");
-static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
-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 char *ac97_quirk[SNDRV_CARDS];
-static int spdif_aclink[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-
-module_param_array(index, int, NULL, 0444);
+static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
+static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */
+static int ac97_clock = 48000;
+static char *ac97_quirk;
+static int spdif_aclink = 1;
+
+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).");
-module_param_array(ac97_quirk, charp, NULL, 0444);
+module_param(ac97_quirk, charp, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
-module_param_array(spdif_aclink, bool, NULL, 0444);
+module_param(spdif_aclink, bool, 0444);
MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
@@ -1578,26 +1575,18 @@ 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;
pci_read_config_byte(pci, PCI_REVISION_ID, &revision);
- strcpy(card->driver, spdif_aclink[dev] ? "ATIIXP" : "ATIIXP-SPDMA");
+ strcpy(card->driver, spdif_aclink ? "ATIIXP" : "ATIIXP-SPDMA");
strcpy(card->shortname, "ATI IXP");
if ((err = snd_atiixp_create(card, pci, &chip)) < 0)
goto __error;
@@ -1605,9 +1594,9 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
if ((err = snd_atiixp_aclink_reset(chip)) < 0)
goto __error;
- chip->spdif_over_aclink = spdif_aclink[dev];
+ chip->spdif_over_aclink = spdif_aclink;
- if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev], ac97_quirk[dev])) < 0)
+ if ((err = snd_atiixp_mixer_new(chip, ac97_clock, ac97_quirk)) < 0)
goto __error;
if ((err = snd_atiixp_pcm_new(chip)) < 0)
@@ -1628,7 +1617,6 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
goto __error;
pci_set_drvdata(pci, card);
- dev++;
return 0;
__error:
OpenPOWER on IntegriCloud