aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp_modem.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-10-04 02:46:51 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:17:16 -0500
commitb7fe46220487f684abc858865cff817389af5c76 (patch)
treed1eabbbdd0f686c87996133fd22ce2327da638c1 /sound/pci/atiixp_modem.c
parent4b0940f8117b6cdf7e7c27bdecc29931f18c81ed (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/atiixp_modem.c')
-rw-r--r--sound/pci/atiixp_modem.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index a88a6f372050..a4778d373cdf 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -39,18 +39,15 @@ MODULE_DESCRIPTION("ATI IXP MC97 controller");
39MODULE_LICENSE("GPL"); 39MODULE_LICENSE("GPL");
40MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250}}"); 40MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250}}");
41 41
42static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ 42static int index = -2; /* Exclude the first card */
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};
46 45
47module_param_array(index, int, NULL, 0444); 46module_param(index, int, 0444);
48MODULE_PARM_DESC(index, "Index value for ATI IXP controller."); 47MODULE_PARM_DESC(index, "Index value for ATI IXP controller.");
49module_param_array(id, charp, NULL, 0444); 48module_param(id, charp, 0444);
50MODULE_PARM_DESC(id, "ID string for ATI IXP controller."); 49MODULE_PARM_DESC(id, "ID string for ATI IXP controller.");
51module_param_array(enable, bool, NULL, 0444); 50module_param(ac97_clock, int, 0444);
52MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller.");
53module_param_array(ac97_clock, int, NULL, 0444);
54MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); 51MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
55 52
56 53
@@ -1256,20 +1253,12 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
1256static int __devinit snd_atiixp_probe(struct pci_dev *pci, 1253static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1257 const struct pci_device_id *pci_id) 1254 const struct pci_device_id *pci_id)
1258{ 1255{
1259 static int dev;
1260 snd_card_t *card; 1256 snd_card_t *card;
1261 atiixp_t *chip; 1257 atiixp_t *chip;
1262 unsigned char revision; 1258 unsigned char revision;
1263 int err; 1259 int err;
1264 1260
1265 if (dev >= SNDRV_CARDS) 1261 card = snd_card_new(index, id, THIS_MODULE, 0);
1266 return -ENODEV;
1267 if (!enable[dev]) {
1268 dev++;
1269 return -ENOENT;
1270 }
1271
1272 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
1273 if (card == NULL) 1262 if (card == NULL)
1274 return -ENOMEM; 1263 return -ENOMEM;
1275 1264
@@ -1283,7 +1272,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1283 if ((err = snd_atiixp_aclink_reset(chip)) < 0) 1272 if ((err = snd_atiixp_aclink_reset(chip)) < 0)
1284 goto __error; 1273 goto __error;
1285 1274
1286 if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev])) < 0) 1275 if ((err = snd_atiixp_mixer_new(chip, ac97_clock)) < 0)
1287 goto __error; 1276 goto __error;
1288 1277
1289 if ((err = snd_atiixp_pcm_new(chip)) < 0) 1278 if ((err = snd_atiixp_pcm_new(chip)) < 0)
@@ -1302,7 +1291,6 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
1302 goto __error; 1291 goto __error;
1303 1292
1304 pci_set_drvdata(pci, card); 1293 pci_set_drvdata(pci, card);
1305 dev++;
1306 return 0; 1294 return 0;
1307 1295
1308 __error: 1296 __error: