diff options
author | 2021-01-25 14:35:44 +1000 | |
---|---|---|
committer | 2021-01-25 14:35:44 +1000 | |
commit | bc96ad6722f86a377ed2872c9a4854c90caf78ca (patch) | |
tree | ece8859165a1faa10e4e2203d231fc7e87925139 /sound/soc/codecs/rt711.c | |
parent | Merge tag 'drm-intel-gt-next-2021-01-21-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (diff) | |
parent | Linux 5.11-rc5 (diff) | |
download | linux-dev-bc96ad6722f86a377ed2872c9a4854c90caf78ca.tar.xz linux-dev-bc96ad6722f86a377ed2872c9a4854c90caf78ca.zip |
Merge tag 'v5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge v5.11-rc5 into drm-next to clean up a bunch of conflicts we are dragging around.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'sound/soc/codecs/rt711.c')
-rw-r--r-- | sound/soc/codecs/rt711.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c index 5771c02c3459..85f744184a60 100644 --- a/sound/soc/codecs/rt711.c +++ b/sound/soc/codecs/rt711.c @@ -462,6 +462,8 @@ static int rt711_set_amp_gain_put(struct snd_kcontrol *kcontrol, unsigned int read_ll, read_rl; int i; + mutex_lock(&rt711->calibrate_mutex); + /* Can't use update bit function, so read the original value first */ addr_h = mc->reg; addr_l = mc->rreg; @@ -547,6 +549,8 @@ static int rt711_set_amp_gain_put(struct snd_kcontrol *kcontrol, if (dapm->bias_level <= SND_SOC_BIAS_STANDBY) regmap_write(rt711->regmap, RT711_SET_AUDIO_POWER_STATE, AC_PWRST_D3); + + mutex_unlock(&rt711->calibrate_mutex); return 0; } @@ -859,9 +863,11 @@ static int rt711_set_bias_level(struct snd_soc_component *component, break; case SND_SOC_BIAS_STANDBY: + mutex_lock(&rt711->calibrate_mutex); regmap_write(rt711->regmap, RT711_SET_AUDIO_POWER_STATE, AC_PWRST_D3); + mutex_unlock(&rt711->calibrate_mutex); break; default: |