diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-05-20 05:59:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-20 05:59:29 -0400 |
commit | 5e8aa85253513b9c1ade8bd71dc341218a752a65 (patch) | |
tree | 84240b7f72fefb805c78300de0ae23b7b96bf5c2 /sound/isa/gus | |
parent | 7bd9db83087aecef8279c0b8b9dfef4db4a8fc3c (diff) | |
parent | 550a8b691ca67761bbf382d98fbd81d215f1d7f0 (diff) |
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/isa/gus')
-rw-r--r-- | sound/isa/gus/gusextreme.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 65e4b18581a6..008e8e5bfa37 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -95,7 +95,7 @@ static int __devinit snd_gusextreme_match(struct device *dev, unsigned int n) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | static int __devinit snd_gusextreme_es1688_create(struct snd_card *card, | 97 | static int __devinit snd_gusextreme_es1688_create(struct snd_card *card, |
98 | struct device *dev, unsigned int n, struct snd_es1688 **rchip) | 98 | struct snd_es1688 *chip, struct device *dev, unsigned int n) |
99 | { | 99 | { |
100 | static long possible_ports[] = {0x220, 0x240, 0x260}; | 100 | static long possible_ports[] = {0x220, 0x240, 0x260}; |
101 | static int possible_irqs[] = {5, 9, 10, 7, -1}; | 101 | static int possible_irqs[] = {5, 9, 10, 7, -1}; |
@@ -119,14 +119,14 @@ static int __devinit snd_gusextreme_es1688_create(struct snd_card *card, | |||
119 | } | 119 | } |
120 | 120 | ||
121 | if (port[n] != SNDRV_AUTO_PORT) | 121 | if (port[n] != SNDRV_AUTO_PORT) |
122 | return snd_es1688_create(card, port[n], mpu_port[n], irq[n], | 122 | return snd_es1688_create(card, chip, port[n], mpu_port[n], |
123 | mpu_irq[n], dma8[n], ES1688_HW_1688, rchip); | 123 | irq[n], mpu_irq[n], dma8[n], ES1688_HW_1688); |
124 | 124 | ||
125 | i = 0; | 125 | i = 0; |
126 | do { | 126 | do { |
127 | port[n] = possible_ports[i]; | 127 | port[n] = possible_ports[i]; |
128 | error = snd_es1688_create(card, port[n], mpu_port[n], irq[n], | 128 | error = snd_es1688_create(card, chip, port[n], mpu_port[n], |
129 | mpu_irq[n], dma8[n], ES1688_HW_1688, rchip); | 129 | irq[n], mpu_irq[n], dma8[n], ES1688_HW_1688); |
130 | } while (error < 0 && ++i < ARRAY_SIZE(possible_ports)); | 130 | } while (error < 0 && ++i < ARRAY_SIZE(possible_ports)); |
131 | 131 | ||
132 | return error; | 132 | return error; |
@@ -206,9 +206,8 @@ static int __devinit snd_gusextreme_detect(struct snd_gus_card *gus, | |||
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |
208 | 208 | ||
209 | static int __devinit snd_gusextreme_mixer(struct snd_es1688 *chip) | 209 | static int __devinit snd_gusextreme_mixer(struct snd_card *card) |
210 | { | 210 | { |
211 | struct snd_card *card = chip->card; | ||
212 | struct snd_ctl_elem_id id1, id2; | 211 | struct snd_ctl_elem_id id1, id2; |
213 | int error; | 212 | int error; |
214 | 213 | ||
@@ -241,17 +240,20 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
241 | struct snd_opl3 *opl3; | 240 | struct snd_opl3 *opl3; |
242 | int error; | 241 | int error; |
243 | 242 | ||
244 | error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card); | 243 | error = snd_card_create(index[n], id[n], THIS_MODULE, |
244 | sizeof(struct snd_es1688), &card); | ||
245 | if (error < 0) | 245 | if (error < 0) |
246 | return error; | 246 | return error; |
247 | 247 | ||
248 | es1688 = card->private_data; | ||
249 | |||
248 | if (mpu_port[n] == SNDRV_AUTO_PORT) | 250 | if (mpu_port[n] == SNDRV_AUTO_PORT) |
249 | mpu_port[n] = 0; | 251 | mpu_port[n] = 0; |
250 | 252 | ||
251 | if (mpu_irq[n] > 15) | 253 | if (mpu_irq[n] > 15) |
252 | mpu_irq[n] = -1; | 254 | mpu_irq[n] = -1; |
253 | 255 | ||
254 | error = snd_gusextreme_es1688_create(card, dev, n, &es1688); | 256 | error = snd_gusextreme_es1688_create(card, es1688, dev, n); |
255 | if (error < 0) | 257 | if (error < 0) |
256 | goto out; | 258 | goto out; |
257 | 259 | ||
@@ -280,11 +282,11 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
280 | } | 282 | } |
281 | gus->codec_flag = 1; | 283 | gus->codec_flag = 1; |
282 | 284 | ||
283 | error = snd_es1688_pcm(es1688, 0, NULL); | 285 | error = snd_es1688_pcm(card, es1688, 0, NULL); |
284 | if (error < 0) | 286 | if (error < 0) |
285 | goto out; | 287 | goto out; |
286 | 288 | ||
287 | error = snd_es1688_mixer(es1688); | 289 | error = snd_es1688_mixer(card, es1688); |
288 | if (error < 0) | 290 | if (error < 0) |
289 | goto out; | 291 | goto out; |
290 | 292 | ||
@@ -300,7 +302,7 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
300 | if (error < 0) | 302 | if (error < 0) |
301 | goto out; | 303 | goto out; |
302 | 304 | ||
303 | error = snd_gusextreme_mixer(es1688); | 305 | error = snd_gusextreme_mixer(card); |
304 | if (error < 0) | 306 | if (error < 0) |
305 | goto out; | 307 | goto out; |
306 | 308 | ||