diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-20 11:10:49 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:19:17 -0500 |
commit | 8a3fb4d0ce5cc37a765d59b65a3b3714e5806dc9 (patch) | |
tree | e6edf683d5e474db4879b1209b0841cda5f67ef5 /sound/pci/ali5451 | |
parent | 698444f31788bd9992f7c31bcc4862d82f985890 (diff) |
[ALSA] Remove multi-card support for ali5451 and nm256
Modules: Documentation,ALI5451 driver,NM256 driver
Removed multi-card supports for ali5451 and nm256 drivers.
They are supposed to be a single device.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ali5451')
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 01d971c89e43..1f747c3034fe 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -45,23 +45,25 @@ MODULE_DESCRIPTION("ALI M5451"); | |||
45 | MODULE_LICENSE("GPL"); | 45 | MODULE_LICENSE("GPL"); |
46 | MODULE_SUPPORTED_DEVICE("{{ALI,M5451,pci},{ALI,M5451}}"); | 46 | MODULE_SUPPORTED_DEVICE("{{ALI,M5451,pci},{ALI,M5451}}"); |
47 | 47 | ||
48 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 48 | static int index = SNDRV_DEFAULT_IDX1; /* Index */ |
49 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 49 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ |
50 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; | 50 | static int pcm_channels = 32; |
51 | static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 32}; | 51 | static int spdif = 0; |
52 | static int spdif[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0}; | ||
53 | 52 | ||
54 | module_param_array(index, int, NULL, 0444); | 53 | module_param(index, int, 0444); |
55 | MODULE_PARM_DESC(index, "Index value for ALI M5451 PCI Audio."); | 54 | MODULE_PARM_DESC(index, "Index value for ALI M5451 PCI Audio."); |
56 | module_param_array(id, charp, NULL, 0444); | 55 | module_param(id, charp, 0444); |
57 | MODULE_PARM_DESC(id, "ID string for ALI M5451 PCI Audio."); | 56 | MODULE_PARM_DESC(id, "ID string for ALI M5451 PCI Audio."); |
58 | module_param_array(enable, bool, NULL, 0444); | 57 | module_param(pcm_channels, int, 0444); |
59 | MODULE_PARM_DESC(enable, "Enable ALI 5451 PCI Audio."); | ||
60 | module_param_array(pcm_channels, int, NULL, 0444); | ||
61 | MODULE_PARM_DESC(pcm_channels, "PCM Channels"); | 58 | MODULE_PARM_DESC(pcm_channels, "PCM Channels"); |
62 | module_param_array(spdif, bool, NULL, 0444); | 59 | module_param(spdif, bool, 0444); |
63 | MODULE_PARM_DESC(spdif, "Support SPDIF I/O"); | 60 | MODULE_PARM_DESC(spdif, "Support SPDIF I/O"); |
64 | 61 | ||
62 | /* just for backward compatibility */ | ||
63 | static int enable; | ||
64 | module_param(enable, bool, 0444); | ||
65 | |||
66 | |||
65 | /* | 67 | /* |
66 | * Debug part definitions | 68 | * Debug part definitions |
67 | */ | 69 | */ |
@@ -2353,25 +2355,17 @@ static int __devinit snd_ali_create(snd_card_t * card, | |||
2353 | static int __devinit snd_ali_probe(struct pci_dev *pci, | 2355 | static int __devinit snd_ali_probe(struct pci_dev *pci, |
2354 | const struct pci_device_id *pci_id) | 2356 | const struct pci_device_id *pci_id) |
2355 | { | 2357 | { |
2356 | static int dev; | ||
2357 | snd_card_t *card; | 2358 | snd_card_t *card; |
2358 | ali_t *codec; | 2359 | ali_t *codec; |
2359 | int err; | 2360 | int err; |
2360 | 2361 | ||
2361 | snd_ali_printk("probe ...\n"); | 2362 | snd_ali_printk("probe ...\n"); |
2362 | 2363 | ||
2363 | if (dev >= SNDRV_CARDS) | 2364 | card = snd_card_new(index, id, THIS_MODULE, 0); |
2364 | return -ENODEV; | ||
2365 | if (!enable[dev]) { | ||
2366 | dev++; | ||
2367 | return -ENOENT; | ||
2368 | } | ||
2369 | |||
2370 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | ||
2371 | if (card == NULL) | 2365 | if (card == NULL) |
2372 | return -ENOMEM; | 2366 | return -ENOMEM; |
2373 | 2367 | ||
2374 | if ((err = snd_ali_create(card, pci, pcm_channels[dev], spdif[dev], &codec)) < 0) { | 2368 | if ((err = snd_ali_create(card, pci, pcm_channels, spdif, &codec)) < 0) { |
2375 | snd_card_free(card); | 2369 | snd_card_free(card); |
2376 | return err; | 2370 | return err; |
2377 | } | 2371 | } |
@@ -2402,7 +2396,6 @@ static int __devinit snd_ali_probe(struct pci_dev *pci, | |||
2402 | return err; | 2396 | return err; |
2403 | } | 2397 | } |
2404 | pci_set_drvdata(pci, card); | 2398 | pci_set_drvdata(pci, card); |
2405 | dev++; | ||
2406 | return 0; | 2399 | return 0; |
2407 | } | 2400 | } |
2408 | 2401 | ||