Commit c58e6ed5 authored by Gergo Koteles's avatar Gergo Koteles Committed by Takashi Iwai

ALSA: hda/tas2781: add lock to system_suspend

Add the missing lock around tasdevice_tuning_switch().

Fixes: 5be27f1e ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: default avatarGergo Koteles <soyer@irl.hu>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Message-ID: <c666da13d4bc48cd1ab1357479e0c6096541372c.1709918447.git.soyer@irl.hu>
parent c850c912
...@@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev) ...@@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev)
if (ret) if (ret)
return ret; return ret;
mutex_lock(&tas_hda->priv->codec_lock);
/* Shutdown chip before system suspend */ /* Shutdown chip before system suspend */
tasdevice_tuning_switch(tas_hda->priv, 1); tasdevice_tuning_switch(tas_hda->priv, 1);
mutex_unlock(&tas_hda->priv->codec_lock);
/* /*
* Reset GPIO may be shared, so cannot reset here. * Reset GPIO may be shared, so cannot reset here.
* However beyond this point, amps may be powered down. * However beyond this point, amps may be powered down.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment