diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0045-ASoC-dapm-Check-for-bias-level-when-powering-down.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0045-ASoC-dapm-Check-for-bias-level-when-powering-down.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0045-ASoC-dapm-Check-for-bias-level-when-powering-down.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0045-ASoC-dapm-Check-for-bias-level-when-powering-down.patch new file mode 100644 index 00000000..07d84c30 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.10/0045-ASoC-dapm-Check-for-bias-level-when-powering-down.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 2a2a58328a4241c30b0464b700899e7ba93a10a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
3 | Date: Wed, 22 Feb 2012 15:52:56 +0000 | ||
4 | Subject: [PATCH 45/95] ASoC: dapm: Check for bias level when powering down | ||
5 | |||
6 | commit 7679e42ec833ed70aa34790a5f39dcb7e5bda4fe upstream. | ||
7 | |||
8 | Recent enhancements in the bias management means that we might not be | ||
9 | in standby when the CODEC is idle and can have active widgets without | ||
10 | being in full power mode but the shutdown functionality assumes these | ||
11 | things. Add checks for the bias level at each stage so that we don't | ||
12 | do transitions other than the ON->PREPARE->STANDBY->OFF ones that the | ||
13 | drivers are expecting. | ||
14 | |||
15 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | sound/soc/soc-dapm.c | 12 +++++++++--- | ||
19 | 1 file changed, 9 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c | ||
22 | index f42e8b9..ea909c5 100644 | ||
23 | --- a/sound/soc/soc-dapm.c | ||
24 | +++ b/sound/soc/soc-dapm.c | ||
25 | @@ -2982,9 +2982,13 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm) | ||
26 | * standby. | ||
27 | */ | ||
28 | if (powerdown) { | ||
29 | - snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE); | ||
30 | + if (dapm->bias_level == SND_SOC_BIAS_ON) | ||
31 | + snd_soc_dapm_set_bias_level(dapm, | ||
32 | + SND_SOC_BIAS_PREPARE); | ||
33 | dapm_seq_run(dapm, &down_list, 0, false); | ||
34 | - snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY); | ||
35 | + if (dapm->bias_level == SND_SOC_BIAS_PREPARE) | ||
36 | + snd_soc_dapm_set_bias_level(dapm, | ||
37 | + SND_SOC_BIAS_STANDBY); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | @@ -2997,7 +3001,9 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | ||
42 | |||
43 | list_for_each_entry(codec, &card->codec_dev_list, list) { | ||
44 | soc_dapm_shutdown_codec(&codec->dapm); | ||
45 | - snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); | ||
46 | + if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) | ||
47 | + snd_soc_dapm_set_bias_level(&codec->dapm, | ||
48 | + SND_SOC_BIAS_OFF); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | -- | ||
53 | 1.7.9.4 | ||
54 | |||