From 7743f757cb5fe49b967d0792cac2e02ab8a095f3 Mon Sep 17 00:00:00 2001 From: Soumya Managoli Date: Mon, 6 Dec 2021 15:35:53 +0530 Subject: [PATCH] ASoC: bolero: Disable va_swr gpio on clk failure During SSR TX_MCLK failure is observed when both SVA and playback is active. Mute is observed post SSR even though there is no clk enable failure. Issue is seen due to va_swr gpio not being disabled during SSR and hence not enabled properly once uc resumes after SSR. Change-Id: I674bbc80edaaa35b53855166156dba41a32ef45d Signed-off-by: Soumya Managoli --- asoc/codecs/bolero/va-macro.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asoc/codecs/bolero/va-macro.c b/asoc/codecs/bolero/va-macro.c index 7547f486248e..25bbb1d6fe88 100644 --- a/asoc/codecs/bolero/va-macro.c +++ b/asoc/codecs/bolero/va-macro.c @@ -704,6 +704,10 @@ static int va_macro_tx_va_mclk_enable(struct va_macro_priv *va_priv, TX_CORE_CLK, false); if (ret < 0) { + if (va_priv->swr_clk_users == 0) { + msm_cdc_pinctrl_select_sleep_state( + va_priv->va_swr_gpio_p); + } dev_err_ratelimited(va_priv->dev, "%s: swr request clk failed\n", __func__);