[alsa-devel] [PATCH] RME HDSPM MADI lock fix

Adrian Knoth adi at drcomp.erfurt.thur.de
Tue Jun 7 10:38:48 CEST 2011


On Tue, Jun 07, 2011 at 10:33:55AM +0200, Jörn Nettingsmeier wrote:

> --- linux-2.6.39/sound/pci/rme9652/hdspm.c.orig	2011-05-19 06:06:34.000000000 +0200
> +++ linux-2.6.39/sound/pci/rme9652/hdspm.c	2011-06-07 10:26:35.778933230 +0200
> @@ -1639,12 +1639,14 @@
>  		}
>  	}
>  	hmidi->pending = 0;
> +	spin_unlock_irqrestore (&hmidi->lock, flags);
>  
> +	spin_lock_irqsave (&hmidi->hdspm->lock, flags);
>  	hmidi->hdspm->control_register |= hmidi->ie;
>  	hdspm_write(hmidi->hdspm, HDSPM_controlRegister,
>  		    hmidi->hdspm->control_register);
> +	spin_unlock_irqrestore (&hmidi->hdspm->lock, flags);
>  
> -	spin_unlock_irqrestore (&hmidi->lock, flags);
>  	return snd_hdspm_midi_output_write (hmidi);
>  }
>  


This looks sane to me. I'll add it to my git repo and will re-post it
together with the upcoming changes for the iosono guys once we're
finished.


Cheers

-- 
mail: adi at thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver


More information about the Alsa-devel mailing list