From: Ondrej Zary Date: Tue, 7 Jul 2009 16:09:48 +0000 (+0200) Subject: ALSA: cmi8330: Allow MPU-401-less operation X-Git-Tag: v2.6.32-rc1~732^2~19^2 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=72b43cf1402169e8bc088838a6db91d613c35627;p=net-next-2.6.git ALSA: cmi8330: Allow MPU-401-less operation 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index f7acb8dac18..02f79d25271 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -389,12 +389,12 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard, 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