aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2009-01-21 09:08:03 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-21 09:11:02 -0500
commitaa9c293ae46d71f5add0761bce8db67b162e3f29 (patch)
tree2959f67371e81c448be89fd11bdeb3310b99158f /sound/isa
parent48972cc5101dee24243c1b53d409cc27880e7a29 (diff)
ALSA: do not create OPL3 timers if there is no OPL3 irq wired
Most cards have OPL3 FM synthetiser but they do not have OPL3 interrupt wired to a sound chip or CPU. Do not create OPL3 timers for such cards as the timers are useless witthout interrupt. This patch removes OPL3 timers for following alsa drivers: snd-ad1816a, snd-opti93x, snd-opti92x, snd-sc6000, snd-cmi8330. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/ad1816a/ad1816a.c7
-rw-r--r--sound/isa/cmi8330.c4
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c10
-rw-r--r--sound/isa/sc6000.c4
4 files changed, 4 insertions, 21 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 77524244a846..3810833d3a87 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -207,11 +207,8 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
207 OPL3_HW_AUTO, 0, &opl3) < 0) { 207 OPL3_HW_AUTO, 0, &opl3) < 0) {
208 printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2); 208 printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2);
209 } else { 209 } else {
210 if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) { 210 error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
211 snd_card_free(card); 211 if (error < 0) {
212 return error;
213 }
214 if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
215 snd_card_free(card); 212 snd_card_free(card);
216 return error; 213 return error;
217 } 214 }
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index dec6ea52cc4f..115437957413 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -546,10 +546,6 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev)
546 "no OPL device at 0x%lx-0x%lx ?\n", 546 "no OPL device at 0x%lx-0x%lx ?\n",
547 fmport[dev], fmport[dev] + 2); 547 fmport[dev], fmport[dev] + 2);
548 } else { 548 } else {
549 err = snd_opl3_timer_new(opl3, 0, 1);
550 if (err < 0)
551 return err;
552
553 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 549 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
554 if (err < 0) 550 if (err < 0)
555 return err; 551 return err;
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 19706b0d8497..5deb7e69a029 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -815,14 +815,8 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
815 chip->fm_port, chip->fm_port + 4 - 1); 815 chip->fm_port, chip->fm_port + 4 - 1);
816 } 816 }
817 if (opl3) { 817 if (opl3) {
818#ifdef CS4231 818 error = snd_opl3_hwdep_new(opl3, 0, 1, &synth);
819 const int t1dev = 1; 819 if (error < 0)
820#else
821 const int t1dev = 0;
822#endif
823 if ((error = snd_opl3_timer_new(opl3, t1dev, t1dev+1)) < 0)
824 return error;
825 if ((error = snd_opl3_hwdep_new(opl3, 0, 1, &synth)) < 0)
826 return error; 820 return error;
827 } 821 }
828 } 822 }
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index ca35924dc3b3..bbc53692e68d 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -576,10 +576,6 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
576 snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n", 576 snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n",
577 0x388, 0x388 + 2); 577 0x388, 0x388 + 2);
578 } else { 578 } else {
579 err = snd_opl3_timer_new(opl3, 0, 1);
580 if (err < 0)
581 goto err_unmap2;
582
583 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 579 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
584 if (err < 0) 580 if (err < 0)
585 goto err_unmap2; 581 goto err_unmap2;