mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
ALSA: ak411x: Fix race of reinit() calls
Protect the call with a mutex, as this may be called in parallel (either from the PCM rate change and the clock change). Acked-by: Jaroslav Kysela <[email protected]> Tested-by: Pavel Hofman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
1293617cdd
commit
1781e78c63
4 changed files with 8 additions and 0 deletions
|
|
@ -287,6 +287,7 @@ struct ak4113 {
|
|||
ak4113_read_t *read;
|
||||
void *private_data;
|
||||
atomic_t wq_processing;
|
||||
struct mutex reinit_mutex;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[AK4113_WRITABLE_REGS];
|
||||
struct snd_kcontrol *kctls[AK4113_CONTROLS];
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ struct ak4114 {
|
|||
ak4114_read_t * read;
|
||||
void * private_data;
|
||||
atomic_t wq_processing;
|
||||
struct mutex reinit_mutex;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[6];
|
||||
unsigned char txcsb[5];
|
||||
|
|
|
|||
Loading…
Reference in a new issue