[alsa-devel] [PATCH 09/13] ASoC: tlv320aic32x4: Fix clock activation on bias level change
Annaliese McDermond
nh6z at nh6z.net
Tue Mar 19 04:37:52 CET 2019
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 at nh6z.net>
---
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
More information about the Alsa-devel
mailing list