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/via82xx_modem.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/via82xx_modem.c')
-rw-r--r-- | sound/pci/via82xx_modem.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index c3ab8fbf582c..a7a60d837c85 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -55,18 +55,15 @@ MODULE_DESCRIPTION("VIA VT82xx modem"); | |||
55 | MODULE_LICENSE("GPL"); | 55 | MODULE_LICENSE("GPL"); |
56 | MODULE_SUPPORTED_DEVICE("{{VIA,VT82C686A/B/C modem,pci}}"); | 56 | MODULE_SUPPORTED_DEVICE("{{VIA,VT82C686A/B/C modem,pci}}"); |
57 | 57 | ||
58 | static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ | 58 | static int index = -2; /* Exclude the first card */ |
59 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 59 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ |
60 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ | 60 | static int ac97_clock = 48000; |
61 | static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000}; | ||
62 | 61 | ||
63 | module_param_array(index, int, NULL, 0444); | 62 | module_param(index, int, 0444); |
64 | MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); | 63 | MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); |
65 | module_param_array(id, charp, NULL, 0444); | 64 | module_param(id, charp, 0444); |
66 | MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge."); | 65 | MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge."); |
67 | module_param_array(enable, bool, NULL, 0444); | 66 | module_param(ac97_clock, int, 0444); |
68 | MODULE_PARM_DESC(enable, "Enable modem part of VIA 82xx bridge."); | ||
69 | module_param_array(ac97_clock, int, NULL, 0444); | ||
70 | MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); | 67 | MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); |
71 | 68 | ||
72 | 69 | ||
@@ -1135,7 +1132,6 @@ static int __devinit snd_via82xx_create(snd_card_t * card, | |||
1135 | static int __devinit snd_via82xx_probe(struct pci_dev *pci, | 1132 | static int __devinit snd_via82xx_probe(struct pci_dev *pci, |
1136 | const struct pci_device_id *pci_id) | 1133 | const struct pci_device_id *pci_id) |
1137 | { | 1134 | { |
1138 | static int dev; | ||
1139 | snd_card_t *card; | 1135 | snd_card_t *card; |
1140 | via82xx_t *chip; | 1136 | via82xx_t *chip; |
1141 | unsigned char revision; | 1137 | unsigned char revision; |
@@ -1143,14 +1139,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, | |||
1143 | unsigned int i; | 1139 | unsigned int i; |
1144 | int err; | 1140 | int err; |
1145 | 1141 | ||
1146 | if (dev >= SNDRV_CARDS) | 1142 | card = snd_card_new(index, id, THIS_MODULE, 0); |
1147 | return -ENODEV; | ||
1148 | if (!enable[dev]) { | ||
1149 | dev++; | ||
1150 | return -ENOENT; | ||
1151 | } | ||
1152 | |||
1153 | card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); | ||
1154 | if (card == NULL) | 1143 | if (card == NULL) |
1155 | return -ENOMEM; | 1144 | return -ENOMEM; |
1156 | 1145 | ||
@@ -1167,7 +1156,8 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, | |||
1167 | goto __error; | 1156 | goto __error; |
1168 | } | 1157 | } |
1169 | 1158 | ||
1170 | if ((err = snd_via82xx_create(card, pci, chip_type, revision, ac97_clock[dev], &chip)) < 0) | 1159 | if ((err = snd_via82xx_create(card, pci, chip_type, revision, |
1160 | ac97_clock, &chip)) < 0) | ||
1171 | goto __error; | 1161 | goto __error; |
1172 | if ((err = snd_via82xx_mixer_new(chip)) < 0) | 1162 | if ((err = snd_via82xx_mixer_new(chip)) < 0) |
1173 | goto __error; | 1163 | goto __error; |
@@ -1191,7 +1181,6 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, | |||
1191 | return err; | 1181 | return err; |
1192 | } | 1182 | } |
1193 | pci_set_drvdata(pci, card); | 1183 | pci_set_drvdata(pci, card); |
1194 | dev++; | ||
1195 | return 0; | 1184 | return 0; |
1196 | 1185 | ||
1197 | __error: | 1186 | __error: |