diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:33:26 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:33:26 -0400 |
commit | 2016ef789a9ded2e169ad1c028ae3deb5302571f (patch) | |
tree | 601359f15b42d4d9868b4eadfe909a7bef6435c5 /sound/isa | |
parent | 7f57356b70dda014ef269135942426e4a852023e (diff) | |
parent | 6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/ad1816a/ad1816a.c | 5 | ||||
-rw-r--r-- | sound/isa/ad1816a/ad1816a_lib.c | 14 | ||||
-rw-r--r-- | sound/isa/ad1848/ad1848_lib.c | 1 | ||||
-rw-r--r-- | sound/isa/cmi8330.c | 4 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4231_lib.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_io.c | 6 | ||||
-rw-r--r-- | sound/isa/opl3sa2.c | 114 | ||||
-rw-r--r-- | sound/isa/sb/sb16_main.c | 2 |
8 files changed, 115 insertions, 33 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 563296d02894..0eb442ca23d6 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c | |||
@@ -53,6 +53,7 @@ static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* Pnp setup */ | |||
53 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* Pnp setup */ | 53 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* Pnp setup */ |
54 | static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* PnP setup */ | 54 | static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* PnP setup */ |
55 | static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* PnP setup */ | 55 | static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; /* PnP setup */ |
56 | static int clockfreq[SNDRV_CARDS]; | ||
56 | 57 | ||
57 | module_param_array(index, int, NULL, 0444); | 58 | module_param_array(index, int, NULL, 0444); |
58 | MODULE_PARM_DESC(index, "Index value for ad1816a based soundcard."); | 59 | MODULE_PARM_DESC(index, "Index value for ad1816a based soundcard."); |
@@ -74,6 +75,8 @@ module_param_array(dma1, int, NULL, 0444); | |||
74 | MODULE_PARM_DESC(dma1, "1st DMA # for ad1816a driver."); | 75 | MODULE_PARM_DESC(dma1, "1st DMA # for ad1816a driver."); |
75 | module_param_array(dma2, int, NULL, 0444); | 76 | module_param_array(dma2, int, NULL, 0444); |
76 | MODULE_PARM_DESC(dma2, "2nd DMA # for ad1816a driver."); | 77 | MODULE_PARM_DESC(dma2, "2nd DMA # for ad1816a driver."); |
78 | module_param_array(clockfreq, int, NULL, 0444); | ||
79 | MODULE_PARM_DESC(clockfreq, "Clock frequency for ad1816a driver (default = 0)."); | ||
77 | 80 | ||
78 | struct snd_card_ad1816a { | 81 | struct snd_card_ad1816a { |
79 | struct pnp_dev *dev; | 82 | struct pnp_dev *dev; |
@@ -209,6 +212,8 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
209 | snd_card_free(card); | 212 | snd_card_free(card); |
210 | return error; | 213 | return error; |
211 | } | 214 | } |
215 | if (clockfreq[dev] >= 5000 && clockfreq[dev] <= 100000) | ||
216 | chip->clock_freq = clockfreq[dev]; | ||
212 | 217 | ||
213 | strcpy(card->driver, "AD1816A"); | 218 | strcpy(card->driver, "AD1816A"); |
214 | strcpy(card->shortname, "ADI SoundPort AD1816A"); | 219 | strcpy(card->shortname, "ADI SoundPort AD1816A"); |
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 625b2eff14a1..ae860360ecf9 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c | |||
@@ -234,7 +234,7 @@ static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream) | |||
234 | ad1816a_t *chip = snd_pcm_substream_chip(substream); | 234 | ad1816a_t *chip = snd_pcm_substream_chip(substream); |
235 | unsigned long flags; | 235 | unsigned long flags; |
236 | snd_pcm_runtime_t *runtime = substream->runtime; | 236 | snd_pcm_runtime_t *runtime = substream->runtime; |
237 | unsigned int size; | 237 | unsigned int size, rate; |
238 | 238 | ||
239 | spin_lock_irqsave(&chip->lock, flags); | 239 | spin_lock_irqsave(&chip->lock, flags); |
240 | 240 | ||
@@ -245,7 +245,10 @@ static int snd_ad1816a_playback_prepare(snd_pcm_substream_t *substream) | |||
245 | snd_dma_program(chip->dma1, runtime->dma_addr, size, | 245 | snd_dma_program(chip->dma1, runtime->dma_addr, size, |
246 | DMA_MODE_WRITE | DMA_AUTOINIT); | 246 | DMA_MODE_WRITE | DMA_AUTOINIT); |
247 | 247 | ||
248 | snd_ad1816a_write(chip, AD1816A_PLAYBACK_SAMPLE_RATE, runtime->rate); | 248 | rate = runtime->rate; |
249 | if (chip->clock_freq) | ||
250 | rate = (rate * 33000) / chip->clock_freq; | ||
251 | snd_ad1816a_write(chip, AD1816A_PLAYBACK_SAMPLE_RATE, rate); | ||
249 | snd_ad1816a_out_mask(chip, AD1816A_PLAYBACK_CONFIG, | 252 | snd_ad1816a_out_mask(chip, AD1816A_PLAYBACK_CONFIG, |
250 | AD1816A_FMT_ALL | AD1816A_FMT_STEREO, | 253 | AD1816A_FMT_ALL | AD1816A_FMT_STEREO, |
251 | snd_ad1816a_get_format(chip, runtime->format, | 254 | snd_ad1816a_get_format(chip, runtime->format, |
@@ -263,7 +266,7 @@ static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream) | |||
263 | ad1816a_t *chip = snd_pcm_substream_chip(substream); | 266 | ad1816a_t *chip = snd_pcm_substream_chip(substream); |
264 | unsigned long flags; | 267 | unsigned long flags; |
265 | snd_pcm_runtime_t *runtime = substream->runtime; | 268 | snd_pcm_runtime_t *runtime = substream->runtime; |
266 | unsigned int size; | 269 | unsigned int size, rate; |
267 | 270 | ||
268 | spin_lock_irqsave(&chip->lock, flags); | 271 | spin_lock_irqsave(&chip->lock, flags); |
269 | 272 | ||
@@ -274,7 +277,10 @@ static int snd_ad1816a_capture_prepare(snd_pcm_substream_t *substream) | |||
274 | snd_dma_program(chip->dma2, runtime->dma_addr, size, | 277 | snd_dma_program(chip->dma2, runtime->dma_addr, size, |
275 | DMA_MODE_READ | DMA_AUTOINIT); | 278 | DMA_MODE_READ | DMA_AUTOINIT); |
276 | 279 | ||
277 | snd_ad1816a_write(chip, AD1816A_CAPTURE_SAMPLE_RATE, runtime->rate); | 280 | rate = runtime->rate; |
281 | if (chip->clock_freq) | ||
282 | rate = (rate * 33000) / chip->clock_freq; | ||
283 | snd_ad1816a_write(chip, AD1816A_CAPTURE_SAMPLE_RATE, rate); | ||
278 | snd_ad1816a_out_mask(chip, AD1816A_CAPTURE_CONFIG, | 284 | snd_ad1816a_out_mask(chip, AD1816A_CAPTURE_CONFIG, |
279 | AD1816A_FMT_ALL | AD1816A_FMT_STEREO, | 285 | AD1816A_FMT_ALL | AD1816A_FMT_STEREO, |
280 | snd_ad1816a_get_format(chip, runtime->format, | 286 | snd_ad1816a_get_format(chip, runtime->format, |
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index 8fb3db103e48..bc642dc94547 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c | |||
@@ -1196,6 +1196,7 @@ int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, un | |||
1196 | .put = snd_ad1848_put_double, | 1196 | .put = snd_ad1848_put_double, |
1197 | }, | 1197 | }, |
1198 | [AD1848_MIX_CAPTURE] = { | 1198 | [AD1848_MIX_CAPTURE] = { |
1199 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
1199 | .info = snd_ad1848_info_mux, | 1200 | .info = snd_ad1848_info_mux, |
1200 | .get = snd_ad1848_get_mux, | 1201 | .get = snd_ad1848_get_mux, |
1201 | .put = snd_ad1848_put_mux, | 1202 | .put = snd_ad1848_put_mux, |
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 46776cc0c157..1fce8b9f37cf 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -194,8 +194,8 @@ AD1848_DOUBLE("Wavetable Capture Volume", 0, CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4 | |||
194 | AD1848_SINGLE("3D Control - Switch", 0, CMI8330_RMUX3D, 5, 1, 1), | 194 | AD1848_SINGLE("3D Control - Switch", 0, CMI8330_RMUX3D, 5, 1, 1), |
195 | AD1848_SINGLE("PC Speaker Playback Volume", 0, CMI8330_OUTPUTVOL, 3, 3, 0), | 195 | AD1848_SINGLE("PC Speaker Playback Volume", 0, CMI8330_OUTPUTVOL, 3, 3, 0), |
196 | AD1848_SINGLE("FM Playback Switch", 0, CMI8330_RECMUX, 3, 1, 1), | 196 | AD1848_SINGLE("FM Playback Switch", 0, CMI8330_RECMUX, 3, 1, 1), |
197 | AD1848_SINGLE("IEC958 Input Capture Switch", 0, CMI8330_RMUX3D, 7, 1, 1), | 197 | AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",CAPTURE,SWITCH), 0, CMI8330_RMUX3D, 7, 1, 1), |
198 | AD1848_SINGLE("IEC958 Input Playback Switch", 0, CMI8330_MUTEMUX, 7, 1, 1), | 198 | AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",PLAYBACK,SWITCH), 0, CMI8330_MUTEMUX, 7, 1, 1), |
199 | }; | 199 | }; |
200 | 200 | ||
201 | #ifdef ENABLE_SB_MIXER | 201 | #ifdef ENABLE_SB_MIXER |
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c index 3e7a2a33a5ca..3199941edd9b 100644 --- a/sound/isa/cs423x/cs4231_lib.c +++ b/sound/isa/cs423x/cs4231_lib.c | |||
@@ -1346,6 +1346,8 @@ static void snd_cs4231_suspend(cs4231_t *chip) | |||
1346 | int reg; | 1346 | int reg; |
1347 | unsigned long flags; | 1347 | unsigned long flags; |
1348 | 1348 | ||
1349 | if (chip->pcm) | ||
1350 | snd_pcm_suspend_all(chip->pcm); | ||
1349 | spin_lock_irqsave(&chip->reg_lock, flags); | 1351 | spin_lock_irqsave(&chip->reg_lock, flags); |
1350 | for (reg = 0; reg < 32; reg++) | 1352 | for (reg = 0; reg < 32; reg++) |
1351 | chip->image[reg] = snd_cs4231_in(chip, reg); | 1353 | chip->image[reg] = snd_cs4231_in(chip, reg); |
diff --git a/sound/isa/gus/gus_io.c b/sound/isa/gus/gus_io.c index 337b0e2a8a36..23e1b5f19e1a 100644 --- a/sound/isa/gus/gus_io.c +++ b/sound/isa/gus/gus_io.c | |||
@@ -269,8 +269,9 @@ void snd_gf1_i_write_addr(snd_gus_card_t * gus, unsigned char reg, | |||
269 | 269 | ||
270 | #endif /* 0 */ | 270 | #endif /* 0 */ |
271 | 271 | ||
272 | unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, | 272 | #ifdef CONFIG_SND_DEBUG |
273 | unsigned char reg, short w_16bit) | 273 | static unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, |
274 | unsigned char reg, short w_16bit) | ||
274 | { | 275 | { |
275 | unsigned int res; | 276 | unsigned int res; |
276 | unsigned long flags; | 277 | unsigned long flags; |
@@ -280,6 +281,7 @@ unsigned int snd_gf1_i_read_addr(snd_gus_card_t * gus, | |||
280 | spin_unlock_irqrestore(&gus->reg_lock, flags); | 281 | spin_unlock_irqrestore(&gus->reg_lock, flags); |
281 | return res; | 282 | return res; |
282 | } | 283 | } |
284 | #endif | ||
283 | 285 | ||
284 | /* | 286 | /* |
285 | 287 | ||
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 95c7b3e53407..75bd6eca63e7 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -145,6 +145,14 @@ static snd_card_t *snd_opl3sa2_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; | |||
145 | 145 | ||
146 | #ifdef CONFIG_PNP | 146 | #ifdef CONFIG_PNP |
147 | 147 | ||
148 | static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = { | ||
149 | { .id = "YMH0021" }, | ||
150 | { .id = "NMX2210" }, /* Gateway Solo 2500 */ | ||
151 | { .id = "" } /* end */ | ||
152 | }; | ||
153 | |||
154 | MODULE_DEVICE_TABLE(pnp, snd_opl3sa2_pnpbiosids); | ||
155 | |||
148 | static struct pnp_card_device_id snd_opl3sa2_pnpids[] = { | 156 | static struct pnp_card_device_id snd_opl3sa2_pnpids[] = { |
149 | /* Yamaha YMF719E-S (Genius Sound Maker 3DX) */ | 157 | /* Yamaha YMF719E-S (Genius Sound Maker 3DX) */ |
150 | { .id = "YMH0020", .devs = { { "YMH0021" } } }, | 158 | { .id = "YMH0020", .devs = { { "YMH0021" } } }, |
@@ -568,20 +576,18 @@ static int snd_opl3sa2_resume(snd_card_t *card) | |||
568 | 576 | ||
569 | #ifdef CONFIG_PNP | 577 | #ifdef CONFIG_PNP |
570 | static int __init snd_opl3sa2_pnp(int dev, opl3sa2_t *chip, | 578 | static int __init snd_opl3sa2_pnp(int dev, opl3sa2_t *chip, |
571 | struct pnp_card_link *card, | 579 | struct pnp_dev *pdev, |
572 | const struct pnp_card_device_id *id) | 580 | int isapnp) |
573 | { | 581 | { |
574 | struct pnp_dev *pdev; | 582 | struct pnp_resource_table * cfg; |
575 | struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); | ||
576 | int err; | 583 | int err; |
577 | 584 | ||
585 | if (!isapnp && pnp_device_is_isapnp(pdev)) | ||
586 | return -ENOENT; /* we have another procedure - card */ | ||
587 | |||
588 | cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); | ||
578 | if (!cfg) | 589 | if (!cfg) |
579 | return -ENOMEM; | 590 | return -ENOMEM; |
580 | pdev = chip->dev = pnp_request_card_device(card, id->devs[0].id, NULL); | ||
581 | if (chip->dev == NULL) { | ||
582 | kfree(cfg); | ||
583 | return -EBUSY; | ||
584 | } | ||
585 | /* PnP initialization */ | 591 | /* PnP initialization */ |
586 | pnp_init_resource_table(cfg); | 592 | pnp_init_resource_table(cfg); |
587 | if (sb_port[dev] != SNDRV_AUTO_PORT) | 593 | if (sb_port[dev] != SNDRV_AUTO_PORT) |
@@ -601,7 +607,7 @@ static int __init snd_opl3sa2_pnp(int dev, opl3sa2_t *chip, | |||
601 | if (irq[dev] != SNDRV_AUTO_IRQ) | 607 | if (irq[dev] != SNDRV_AUTO_IRQ) |
602 | pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); | 608 | pnp_resource_change(&cfg->irq_resource[0], irq[dev], 1); |
603 | err = pnp_manual_config_dev(pdev, cfg, 0); | 609 | err = pnp_manual_config_dev(pdev, cfg, 0); |
604 | if (err < 0) | 610 | if (err < 0 && isapnp) |
605 | snd_printk(KERN_ERR "PnP manual resources are invalid, using auto config\n"); | 611 | snd_printk(KERN_ERR "PnP manual resources are invalid, using auto config\n"); |
606 | err = pnp_activate_dev(pdev); | 612 | err = pnp_activate_dev(pdev); |
607 | if (err < 0) { | 613 | if (err < 0) { |
@@ -617,13 +623,31 @@ static int __init snd_opl3sa2_pnp(int dev, opl3sa2_t *chip, | |||
617 | dma1[dev] = pnp_dma(pdev, 0); | 623 | dma1[dev] = pnp_dma(pdev, 0); |
618 | dma2[dev] = pnp_dma(pdev, 1); | 624 | dma2[dev] = pnp_dma(pdev, 1); |
619 | irq[dev] = pnp_irq(pdev, 0); | 625 | irq[dev] = pnp_irq(pdev, 0); |
620 | snd_printdd("PnP OPL3-SA: sb port=0x%lx, wss port=0x%lx, fm port=0x%lx, midi port=0x%lx\n", | 626 | snd_printdd("%sPnP OPL3-SA: sb port=0x%lx, wss port=0x%lx, fm port=0x%lx, midi port=0x%lx\n", |
621 | sb_port[dev], wss_port[dev], fm_port[dev], midi_port[dev]); | 627 | pnp_device_is_pnpbios(pdev) ? "BIOS" : "ISA", sb_port[dev], wss_port[dev], fm_port[dev], midi_port[dev]); |
622 | snd_printdd("PnP OPL3-SA: control port=0x%lx, dma1=%i, dma2=%i, irq=%i\n", | 628 | snd_printdd("%sPnP OPL3-SA: control port=0x%lx, dma1=%i, dma2=%i, irq=%i\n", |
623 | port[dev], dma1[dev], dma2[dev], irq[dev]); | 629 | pnp_device_is_pnpbios(pdev) ? "BIOS" : "ISA", port[dev], dma1[dev], dma2[dev], irq[dev]); |
624 | kfree(cfg); | 630 | kfree(cfg); |
631 | chip->dev = pdev; | ||
625 | return 0; | 632 | return 0; |
626 | } | 633 | } |
634 | |||
635 | static int __init snd_opl3sa2_cpnp(int dev, opl3sa2_t *chip, | ||
636 | struct pnp_card_link *card, | ||
637 | const struct pnp_card_device_id *id) | ||
638 | { | ||
639 | struct pnp_dev *pdev; | ||
640 | struct pnp_resource_table * cfg = kmalloc(sizeof(struct pnp_resource_table), GFP_KERNEL); | ||
641 | |||
642 | if (!cfg) | ||
643 | return -ENOMEM; | ||
644 | pdev = pnp_request_card_device(card, id->devs[0].id, NULL); | ||
645 | if (pdev == NULL) { | ||
646 | kfree(cfg); | ||
647 | return -EBUSY; | ||
648 | } | ||
649 | return snd_opl3sa2_pnp(dev, chip, pdev, 1); | ||
650 | } | ||
627 | #endif /* CONFIG_PNP */ | 651 | #endif /* CONFIG_PNP */ |
628 | 652 | ||
629 | static int snd_opl3sa2_free(opl3sa2_t *chip) | 653 | static int snd_opl3sa2_free(opl3sa2_t *chip) |
@@ -645,6 +669,7 @@ static int snd_opl3sa2_dev_free(snd_device_t *device) | |||
645 | } | 669 | } |
646 | 670 | ||
647 | static int __devinit snd_opl3sa2_probe(int dev, | 671 | static int __devinit snd_opl3sa2_probe(int dev, |
672 | struct pnp_dev *pdev, | ||
648 | struct pnp_card_link *pcard, | 673 | struct pnp_card_link *pcard, |
649 | const struct pnp_card_device_id *pid) | 674 | const struct pnp_card_device_id *pid) |
650 | { | 675 | { |
@@ -695,8 +720,13 @@ static int __devinit snd_opl3sa2_probe(int dev, | |||
695 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) | 720 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) |
696 | goto __error; | 721 | goto __error; |
697 | #ifdef CONFIG_PNP | 722 | #ifdef CONFIG_PNP |
698 | if (isapnp[dev]) { | 723 | if (pdev) { |
699 | if ((err = snd_opl3sa2_pnp(dev, chip, pcard, pid)) < 0) | 724 | if ((err = snd_opl3sa2_pnp(dev, chip, pdev, 0)) < 0) |
725 | goto __error; | ||
726 | snd_card_set_dev(card, &pdev->dev); | ||
727 | } | ||
728 | if (pcard) { | ||
729 | if ((err = snd_opl3sa2_cpnp(dev, chip, pcard, pid)) < 0) | ||
700 | goto __error; | 730 | goto __error; |
701 | snd_card_set_dev(card, &pcard->card->dev); | 731 | snd_card_set_dev(card, &pcard->card->dev); |
702 | } | 732 | } |
@@ -768,7 +798,9 @@ static int __devinit snd_opl3sa2_probe(int dev, | |||
768 | if ((err = snd_card_register(card)) < 0) | 798 | if ((err = snd_card_register(card)) < 0) |
769 | goto __error; | 799 | goto __error; |
770 | 800 | ||
771 | if (pcard) | 801 | if (pdev) |
802 | pnp_set_drvdata(pdev, card); | ||
803 | else if (pcard) | ||
772 | pnp_set_card_drvdata(pcard, card); | 804 | pnp_set_card_drvdata(pcard, card); |
773 | else | 805 | else |
774 | snd_opl3sa2_legacy[dev] = card; | 806 | snd_opl3sa2_legacy[dev] = card; |
@@ -780,8 +812,8 @@ static int __devinit snd_opl3sa2_probe(int dev, | |||
780 | } | 812 | } |
781 | 813 | ||
782 | #ifdef CONFIG_PNP | 814 | #ifdef CONFIG_PNP |
783 | static int __devinit snd_opl3sa2_pnp_detect(struct pnp_card_link *card, | 815 | static int __devinit snd_opl3sa2_pnp_detect(struct pnp_dev *pdev, |
784 | const struct pnp_card_device_id *id) | 816 | const struct pnp_device_id *id) |
785 | { | 817 | { |
786 | static int dev; | 818 | static int dev; |
787 | int res; | 819 | int res; |
@@ -789,7 +821,7 @@ static int __devinit snd_opl3sa2_pnp_detect(struct pnp_card_link *card, | |||
789 | for ( ; dev < SNDRV_CARDS; dev++) { | 821 | for ( ; dev < SNDRV_CARDS; dev++) { |
790 | if (!enable[dev] || !isapnp[dev]) | 822 | if (!enable[dev] || !isapnp[dev]) |
791 | continue; | 823 | continue; |
792 | res = snd_opl3sa2_probe(dev, card, id); | 824 | res = snd_opl3sa2_probe(dev, pdev, NULL, NULL); |
793 | if (res < 0) | 825 | if (res < 0) |
794 | return res; | 826 | return res; |
795 | dev++; | 827 | dev++; |
@@ -798,7 +830,40 @@ static int __devinit snd_opl3sa2_pnp_detect(struct pnp_card_link *card, | |||
798 | return -ENODEV; | 830 | return -ENODEV; |
799 | } | 831 | } |
800 | 832 | ||
801 | static void __devexit snd_opl3sa2_pnp_remove(struct pnp_card_link * pcard) | 833 | static void __devexit snd_opl3sa2_pnp_remove(struct pnp_dev * pdev) |
834 | { | ||
835 | snd_card_t *card = (snd_card_t *) pnp_get_drvdata(pdev); | ||
836 | |||
837 | snd_card_disconnect(card); | ||
838 | snd_card_free_in_thread(card); | ||
839 | } | ||
840 | |||
841 | static struct pnp_driver opl3sa2_pnp_driver = { | ||
842 | .name = "opl3sa2-pnpbios", | ||
843 | .id_table = snd_opl3sa2_pnpbiosids, | ||
844 | .probe = snd_opl3sa2_pnp_detect, | ||
845 | .remove = __devexit_p(snd_opl3sa2_pnp_remove), | ||
846 | }; | ||
847 | |||
848 | static int __devinit snd_opl3sa2_pnp_cdetect(struct pnp_card_link *card, | ||
849 | const struct pnp_card_device_id *id) | ||
850 | { | ||
851 | static int dev; | ||
852 | int res; | ||
853 | |||
854 | for ( ; dev < SNDRV_CARDS; dev++) { | ||
855 | if (!enable[dev] || !isapnp[dev]) | ||
856 | continue; | ||
857 | res = snd_opl3sa2_probe(dev, NULL, card, id); | ||
858 | if (res < 0) | ||
859 | return res; | ||
860 | dev++; | ||
861 | return 0; | ||
862 | } | ||
863 | return -ENODEV; | ||
864 | } | ||
865 | |||
866 | static void __devexit snd_opl3sa2_pnp_cremove(struct pnp_card_link * pcard) | ||
802 | { | 867 | { |
803 | snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); | 868 | snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); |
804 | 869 | ||
@@ -810,8 +875,8 @@ static struct pnp_card_driver opl3sa2_pnpc_driver = { | |||
810 | .flags = PNP_DRIVER_RES_DISABLE, | 875 | .flags = PNP_DRIVER_RES_DISABLE, |
811 | .name = "opl3sa2", | 876 | .name = "opl3sa2", |
812 | .id_table = snd_opl3sa2_pnpids, | 877 | .id_table = snd_opl3sa2_pnpids, |
813 | .probe = snd_opl3sa2_pnp_detect, | 878 | .probe = snd_opl3sa2_pnp_cdetect, |
814 | .remove = __devexit_p(snd_opl3sa2_pnp_remove), | 879 | .remove = __devexit_p(snd_opl3sa2_pnp_cremove), |
815 | }; | 880 | }; |
816 | #endif /* CONFIG_PNP */ | 881 | #endif /* CONFIG_PNP */ |
817 | 882 | ||
@@ -826,10 +891,11 @@ static int __init alsa_card_opl3sa2_init(void) | |||
826 | if (isapnp[dev]) | 891 | if (isapnp[dev]) |
827 | continue; | 892 | continue; |
828 | #endif | 893 | #endif |
829 | if (snd_opl3sa2_probe(dev, NULL, NULL) >= 0) | 894 | if (snd_opl3sa2_probe(dev, NULL, NULL, NULL) >= 0) |
830 | cards++; | 895 | cards++; |
831 | } | 896 | } |
832 | #ifdef CONFIG_PNP | 897 | #ifdef CONFIG_PNP |
898 | cards += pnp_register_driver(&opl3sa2_pnp_driver); | ||
833 | cards += pnp_register_card_driver(&opl3sa2_pnpc_driver); | 899 | cards += pnp_register_card_driver(&opl3sa2_pnpc_driver); |
834 | #endif | 900 | #endif |
835 | if (!cards) { | 901 | if (!cards) { |
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c index a6a0fa516268..a99e642a68b5 100644 --- a/sound/isa/sb/sb16_main.c +++ b/sound/isa/sb/sb16_main.c | |||
@@ -729,7 +729,7 @@ static int snd_sb16_dma_control_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_valu | |||
729 | } | 729 | } |
730 | 730 | ||
731 | static snd_kcontrol_new_t snd_sb16_dma_control = { | 731 | static snd_kcontrol_new_t snd_sb16_dma_control = { |
732 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 732 | .iface = SNDRV_CTL_ELEM_IFACE_CARD, |
733 | .name = "16-bit DMA Allocation", | 733 | .name = "16-bit DMA Allocation", |
734 | .info = snd_sb16_dma_control_info, | 734 | .info = snd_sb16_dma_control_info, |
735 | .get = snd_sb16_dma_control_get, | 735 | .get = snd_sb16_dma_control_get, |