ALSA: usb-audio: scarlett2: Fix data_mutex lock
The private->vol_updated flag was being checked outside of the mutex_lock/unlock() of private->data_mutex leading to the volume data being fetched twice from the device unnecessarily or old volume data being returned. Update scarlett2_*_ctl_get() and include the private->vol_updated flag check inside the critical region. Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://lore.kernel.org/r/20210620164643.GA9216@m.b4.vuSigned-off-by: Takashi Iwai <tiwai@suse.de>
Showing
Please register or sign in to comment