[PATCH] ASoC: Add power down of widget powered up for suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the widget was powered up when the device enters to the suspend, it
remains on because the power of the widget doesn't change, but we need
to power down the widget on suspend.

Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
---
 sound/soc/soc-dapm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index d2af872..099d3b6 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -978,8 +978,11 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
 				continue;
 
 			power = w->power_check(w);
-			if (power)
+			if (power) {
 				sys_power = 1;
+				if (event == SND_SOC_DAPM_STREAM_SUSPEND)
+					power = 0;
+			}
 
 			if (w->power == power)
 				continue;
-- 
1.6.3.3
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux