aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorGergo Koteles <soyer@irl.hu>2024-03-08 18:41:41 +0100
committerTakashi Iwai <tiwai@suse.de>2024-03-11 09:14:39 +0100
commitc58e6ed55a1bb9811d6d936d001b068bb0419467 (patch)
tree9fb8ae7e0a358d2112670e213010a4e46585a85b /sound/pci/hda
parentALSA: hda/tas2781: use dev_dbg in system_resume (diff)
downloadwireguard-linux-c58e6ed55a1bb9811d6d936d001b068bb0419467.tar.xz
wireguard-linux-c58e6ed55a1bb9811d6d936d001b068bb0419467.zip
ALSA: hda/tas2781: add lock to system_suspend
Add the missing lock around tasdevice_tuning_switch(). Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") Signed-off-by: Gergo Koteles <soyer@irl.hu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Message-ID: <c666da13d4bc48cd1ab1357479e0c6096541372c.1709918447.git.soyer@irl.hu>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/tas2781_hda_i2c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index ee3e0afc9b31..750e49fbb91e 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev)
if (ret)
return ret;
+ mutex_lock(&tas_hda->priv->codec_lock);
+
/* Shutdown chip before system suspend */
tasdevice_tuning_switch(tas_hda->priv, 1);
+ mutex_unlock(&tas_hda->priv->codec_lock);
+
/*
* Reset GPIO may be shared, so cannot reset here.
* However beyond this point, amps may be powered down.