Skip to content

Commit c58e6ed

Browse files
soyersoyertiwai
authored andcommitted
ALSA: hda/tas2781: add lock to system_suspend
Add the missing lock around tasdevice_tuning_switch(). Fixes: 5be27f1 ("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>
1 parent c850c91 commit c58e6ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,13 @@ static int tas2781_system_suspend(struct device *dev)
885885
if (ret)
886886
return ret;
887887

888+
mutex_lock(&tas_hda->priv->codec_lock);
889+
888890
/* Shutdown chip before system suspend */
889891
tasdevice_tuning_switch(tas_hda->priv, 1);
890892

893+
mutex_unlock(&tas_hda->priv->codec_lock);
894+
891895
/*
892896
* Reset GPIO may be shared, so cannot reset here.
893897
* However beyond this point, amps may be powered down.

0 commit comments

Comments
 (0)