Message ID | 20190319033756.20616-10-nh6z@nh6z.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: tlv320aic32x4: Rework Clock Setting | expand |
On Mon, Mar 18, 2019 at 08:37:52PM -0700, Annaliese McDermond wrote: > 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. This looks like a bug fix for the existing code prior to the series - changes like this should be put at the start of the series so that they can be more easily sent as fixes without having to wait for the next merge window.
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:
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@nh6z.net> --- sound/soc/codecs/tlv320aic32x4.c | 3 +++ 1 file changed, 3 insertions(+)