[PATCH 09/13] ASoC: tlv320aic32x4: Fix clock activation on bias level change

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

 



The clocks are double-disabled when they are first coming up
because they are already off when it first moves into STANDBY.
Check if the state is already off and leave things alone if
it is.

Signed-off-by: Annaliese McDermond <nh6z@xxxxxxxx>
---
 sound/soc/codecs/tlv320aic32x4.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index b8b97b211d46..10f0e07889b7 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -814,6 +814,8 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
 				  enum snd_soc_bias_level level)
 {
 	int ret;
+	struct snd_soc_dapm_context *dapm =
+					snd_soc_component_get_dapm(component);
 
 	struct clk_bulk_data clocks[] = {
 		{ .id = "madc" },
@@ -836,6 +838,7 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
 	case SND_SOC_BIAS_PREPARE:
 		break;
 	case SND_SOC_BIAS_STANDBY:
+		if (dapm->bias_level != SND_SOC_BIAS_OFF)
 			clk_bulk_disable_unprepare(ARRAY_SIZE(clocks), clocks);
 		break;
 	case SND_SOC_BIAS_OFF:
-- 
2.19.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux