[alsa-devel] [PATCH v3] ASoC: AMD: Fix race condition between register access

Agrawal, Akshu Akshu.Agrawal at amd.com
Wed Dec 19 11:45:27 CET 2018



On 11/5/2018 4:45 PM, Mark Brown wrote:
> On Wed, Oct 31, 2018 at 09:24:10PM +0000, Agrawal, Akshu wrote:
> 
>> +/* Lock to protect access to registers */
>> +static DEFINE_SPINLOCK(lock);
>> +
> 
> Why is this a global variable and not a part of the driver structure?
> Is there some interaction between multiple instances?
>
Yes, this lock is used to protect registers which are common to multiple
instances and can cause issue in cases such as simultaneous playback and
capture.

Thanks,
Akshu


More information about the Alsa-devel mailing list