All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: alsa-devel@alsa-project.org
Subject: [PATCH] cmi8330: Allow MPU-401-less operation
Date: Tue, 7 Jul 2009 18:09:48 +0200	[thread overview]
Message-ID: <200907071809.49437.linux@rainbow-software.org> (raw)

Adding MPU-401 support to cmi8330 driver could cause a regression (non-working 
sound) on a system where there is no free IRQ for the MPU-401 device (which 
is not very uncommon as this card requires two separate IRQs plus a third one 
for MPU-401).


When MPU-401 PnP configuration fails (mostly because of unavailable IRQ), just 
ignore MPU-401 and continue without it.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-test/sound/isa/cmi8330.c	2009-07-06 22:39:24.000000000 +0200
+++ linux-2.6.30-pentium/sound/isa/cmi8330.c	2009-07-06 22:39:09.000000000 
+0200
@@ -389,12 +389,12 @@
 	pdev = acard->mpu;
 
 	err = pnp_activate_dev(pdev);
-	if (err < 0) {
-		snd_printk(KERN_ERR "MPU-401 PnP configure failure\n");
-		return -EBUSY;
+	if (err < 0)
+		snd_printk(KERN_ERR "MPU-401 PnP configure failure: will be disabled\n");
+	else {
+		mpuport[dev] = pnp_port_start(pdev, 0);
+		mpuirq[dev] = pnp_irq(pdev, 0);
 	}
-	mpuport[dev] = pnp_port_start(pdev, 0);
-	mpuirq[dev] = pnp_irq(pdev, 0);
 	return 0;
 }
 #endif


-- 
Ondrej Zary

             reply	other threads:[~2009-07-07 16:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-07 16:09 Ondrej Zary [this message]
2009-07-07 16:25 ` [PATCH] cmi8330: Allow MPU-401-less operation Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907071809.49437.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.