]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: do not create OPL3 timers if there is no OPL3 irq wired
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Wed, 21 Jan 2009 14:08:03 +0000 (15:08 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 21 Jan 2009 14:11:02 +0000 (15:11 +0100)
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>
sound/isa/ad1816a/ad1816a.c
sound/isa/cmi8330.c
sound/isa/opti9xx/opti92x-ad1848.c
sound/isa/sc6000.c

index 77524244a846458a7f561f7722e39b1e5e17b971..3810833d3a87c633cfd27d1beebcc49b0c377183 100644 (file)
@@ -207,11 +207,8 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
                                    OPL3_HW_AUTO, 0, &opl3) < 0) {
                        printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2);
                } else {
-                       if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) {
-                               snd_card_free(card);
-                               return error;
-                       }
-                       if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
+                       error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
+                       if (error < 0) {
                                snd_card_free(card);
                                return error;
                        }
index dec6ea52cc4f08d124502f37322414991738461a..1154379574135f01716512f6151ed33486e5b235 100644 (file)
@@ -546,10 +546,6 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev)
                                   "no OPL device at 0x%lx-0x%lx ?\n",
                                   fmport[dev], fmport[dev] + 2);
                } else {
-                       err = snd_opl3_timer_new(opl3, 0, 1);
-                       if (err < 0)
-                               return err;
-
                        err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
                        if (err < 0)
                                return err;
index 19706b0d84978c5307166826b9aed76a0c40f46e..5deb7e69a02978570cde4fb30d087c8f1a5a1346 100644 (file)
@@ -815,14 +815,8 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
                                   chip->fm_port, chip->fm_port + 4 - 1);
                }
                if (opl3) {
-#ifdef CS4231
-                       const int t1dev = 1;
-#else
-                       const int t1dev = 0;
-#endif
-                       if ((error = snd_opl3_timer_new(opl3, t1dev, t1dev+1)) < 0)
-                               return error;
-                       if ((error = snd_opl3_hwdep_new(opl3, 0, 1, &synth)) < 0)
+                       error = snd_opl3_hwdep_new(opl3, 0, 1, &synth);
+                       if (error < 0)
                                return error;
                }
        }
index ca35924dc3b3d05efa49db7051048c5d7b0d4e36..bbc53692e68d3e58d8499c1f31fbe05936aad57e 100644 (file)
@@ -576,10 +576,6 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
                snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n",
                           0x388, 0x388 + 2);
        } else {
-               err = snd_opl3_timer_new(opl3, 0, 1);
-               if (err < 0)
-                       goto err_unmap2;
-
                err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
                if (err < 0)
                        goto err_unmap2;