All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmi8330: Allow MPU-401-less operation
@ 2009-07-07 16:09 Ondrej Zary
  2009-07-07 16:25 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zary @ 2009-07-07 16:09 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cmi8330: Allow MPU-401-less operation
  2009-07-07 16:09 [PATCH] cmi8330: Allow MPU-401-less operation Ondrej Zary
@ 2009-07-07 16:25 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-07-07 16:25 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: alsa-devel

At Tue, 7 Jul 2009 18:09:48 +0200,
Ondrej Zary wrote:
> 
> 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>

Applied now.  Thanks.


Takashi

> 
> --- 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
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-07 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 16:09 [PATCH] cmi8330: Allow MPU-401-less operation Ondrej Zary
2009-07-07 16:25 ` Takashi Iwai

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.