ALSA: do not create OPL3 timers if there is no OPL3 irq wired

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:11 pm

Gitweb:     http://git.kernel.org/linus/aa9c293ae46d71f5add0761bce8db67b162e3f29
Commit:     aa9c293ae46d71f5add0761bce8db67b162e3f29
Parent:     48972cc5101dee24243c1b53d409cc27880e7a29
Author:     Krzysztof Helt <krzysztof.h1@wp.pl>
AuthorDate: Wed Jan 21 15:08:03 2009 +0100
Committer:  Takashi Iwai <tiwai@suse.de>
CommitDate: Wed Jan 21 15:11:02 2009 +0100

    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>
---
 sound/isa/ad1816a/ad1816a.c        |    7 ++-----
 sound/isa/cmi8330.c                |    4 ----
 sound/isa/opti9xx/opti92x-ad1848.c |   10 ++--------
 sound/isa/sc6000.c                 |    4 ----
 4 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 7752424..3810833 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
 				    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;
 			}
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index dec6ea5..1154379 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)
 				   "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;
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 19706b0..5deb7e6 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)
 				   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;
 		}
 	}
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index ca35924..bbc5369 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)
 		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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ALSA: do not create OPL3 timers if there is no OPL3 irq wired, Linux Kernel Mailing ..., (Thu Mar 26, 12:11 pm)