]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.45/asoc-max98090-fix-restore-of-dapm-muxes.patch
drop queue-4.14/mips-make-sure-dt-memory-regions-are-valid.patch
[thirdparty/kernel/stable-queue.git] / releases / 4.19.45 / asoc-max98090-fix-restore-of-dapm-muxes.patch
1 From ecb2795c08bc825ebd604997e5be440b060c5b18 Mon Sep 17 00:00:00 2001
2 From: Jon Hunter <jonathanh@nvidia.com>
3 Date: Wed, 1 May 2019 15:29:38 +0100
4 Subject: ASoC: max98090: Fix restore of DAPM Muxes
5
6 From: Jon Hunter <jonathanh@nvidia.com>
7
8 commit ecb2795c08bc825ebd604997e5be440b060c5b18 upstream.
9
10 The max98090 driver defines 3 DAPM muxes; one for the right line output
11 (LINMOD Mux), one for the left headphone mixer source (MIXHPLSEL Mux)
12 and one for the right headphone mixer source (MIXHPRSEL Mux). The same
13 bit is used for the mux as well as the DAPM enable, and although the mux
14 can be correctly configured, after playback has completed, the mux will
15 be reset during the disable phase. This is preventing the state of these
16 muxes from being saved and restored correctly on system reboot. Fix this
17 by marking these muxes as SND_SOC_NOPM.
18
19 Note this has been verified this on the Tegra124 Nyan Big which features
20 the MAX98090 codec.
21
22 Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
23 Signed-off-by: Mark Brown <broonie@kernel.org>
24 Cc: stable@vger.kernel.org
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 sound/soc/codecs/max98090.c | 12 ++++++------
29 1 file changed, 6 insertions(+), 6 deletions(-)
30
31 --- a/sound/soc/codecs/max98090.c
32 +++ b/sound/soc/codecs/max98090.c
33 @@ -1209,14 +1209,14 @@ static const struct snd_soc_dapm_widget
34 &max98090_right_rcv_mixer_controls[0],
35 ARRAY_SIZE(max98090_right_rcv_mixer_controls)),
36
37 - SND_SOC_DAPM_MUX("LINMOD Mux", M98090_REG_LOUTR_MIXER,
38 - M98090_LINMOD_SHIFT, 0, &max98090_linmod_mux),
39 + SND_SOC_DAPM_MUX("LINMOD Mux", SND_SOC_NOPM, 0, 0,
40 + &max98090_linmod_mux),
41
42 - SND_SOC_DAPM_MUX("MIXHPLSEL Mux", M98090_REG_HP_CONTROL,
43 - M98090_MIXHPLSEL_SHIFT, 0, &max98090_mixhplsel_mux),
44 + SND_SOC_DAPM_MUX("MIXHPLSEL Mux", SND_SOC_NOPM, 0, 0,
45 + &max98090_mixhplsel_mux),
46
47 - SND_SOC_DAPM_MUX("MIXHPRSEL Mux", M98090_REG_HP_CONTROL,
48 - M98090_MIXHPRSEL_SHIFT, 0, &max98090_mixhprsel_mux),
49 + SND_SOC_DAPM_MUX("MIXHPRSEL Mux", SND_SOC_NOPM, 0, 0,
50 + &max98090_mixhprsel_mux),
51
52 SND_SOC_DAPM_PGA("HP Left Out", M98090_REG_OUTPUT_ENABLE,
53 M98090_HPLEN_SHIFT, 0, NULL, 0),