[alsa-devel] [RFC] [PATCH 02/62] mpu401:snd_mpu401_uart_new(): split semantic of irq_flags

Takashi Iwai tiwai at suse.de
Mon Sep 12 12:47:29 CEST 2011


At Sun, 11 Sep 2011 17:10:36 +0200,
Clemens Ladisch wrote:
> 
> diff --git a/sound/isa/als100.c b/sound/isa/als100.c
> index 20becc8..3355609 100644
> --- a/sound/isa/als100.c
> +++ b/sound/isa/als100.c
> @@ -245,18 +245,22 @@ static int __devinit snd_card_als100_probe(int dev,
> 
>  	if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
>  		int mpu_type = MPU401_HW_ALS100;
> +		int mpu_flags = 0;
> 
> -		if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
> +		if (mpu_irq[dev] == SNDRV_AUTO_IRQ) {
>  			mpu_irq[dev] = -1;
> +			mpu_flags = MPU401_INFO_RX_POLL;
> +		}

When mpu_irq[dev] is set to -1, it won't work.
Instead of setting mpu_flag in this if block, you'd need another check
of mpu_irq[], i.e.

		if (mpu_irq[dev] == SNDRV_AUTO_IRQ)
			mpu_irq[dev] = -1;
		if (mpu_irq[dev] < 0)
			mpu_flags = MPU401_INFO_RX_POLL;

The similar problems are found in other places, too.


thanks,

Takashi


More information about the Alsa-devel mailing list