]>
Commit | Line | Data |
---|---|---|
9676bf85 SL |
1 | From 4a1b6688dfc0ae18c215f7dd12d66e69e3aaf9d4 Mon Sep 17 00:00:00 2001 |
2 | From: Sasha Levin <sashal@kernel.org> | |
3 | Date: Fri, 8 Mar 2024 18:41:41 +0100 | |
4 | Subject: ALSA: hda/tas2781: add lock to system_suspend | |
5 | ||
6 | From: Gergo Koteles <soyer@irl.hu> | |
7 | ||
8 | [ Upstream commit c58e6ed55a1bb9811d6d936d001b068bb0419467 ] | |
9 | ||
10 | Add the missing lock around tasdevice_tuning_switch(). | |
11 | ||
12 | Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") | |
13 | Signed-off-by: Gergo Koteles <soyer@irl.hu> | |
14 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
15 | Message-ID: <c666da13d4bc48cd1ab1357479e0c6096541372c.1709918447.git.soyer@irl.hu> | |
16 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
17 | --- | |
18 | sound/pci/hda/tas2781_hda_i2c.c | 4 ++++ | |
19 | 1 file changed, 4 insertions(+) | |
20 | ||
21 | diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c | |
22 | index c39a5404fb392..10b5624b1f1f0 100644 | |
23 | --- a/sound/pci/hda/tas2781_hda_i2c.c | |
24 | +++ b/sound/pci/hda/tas2781_hda_i2c.c | |
25 | @@ -796,9 +796,13 @@ static int tas2781_system_suspend(struct device *dev) | |
26 | if (ret) | |
27 | return ret; | |
28 | ||
29 | + mutex_lock(&tas_hda->priv->codec_lock); | |
30 | + | |
31 | /* Shutdown chip before system suspend */ | |
32 | tasdevice_tuning_switch(tas_hda->priv, 1); | |
33 | ||
34 | + mutex_unlock(&tas_hda->priv->codec_lock); | |
35 | + | |
36 | /* | |
37 | * Reset GPIO may be shared, so cannot reset here. | |
38 | * However beyond this point, amps may be powered down. | |
39 | -- | |
40 | 2.43.0 | |
41 |