mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
To: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, ajay.nandam@oss.qualcomm.com
Subject: Re: [PATCH v1 1/3] ASoC: codecs: wsa885x: Reset registers on teardown for B2B playback
Date: Tue, 6 Oct 2026 14:03:23 +0530	[thread overview]
Message-ID: <47a42c54-d3b8-44ec-8017-cdc34b474798@oss.qualcomm.com> (raw)
In-Reply-To: <20261006053717.3455143-2-prasad.kumpatla@oss.qualcomm.com>



On 10/6/2026 11:07 AM, Prasad Kumpatla wrote:
> During back-to-back speaker playback the PA sometimes fails to enable
> because a few I2S/TDM and clock source registers retain their previous
> state and are not reprogrammed on the next stream.
> 
> Reset the relevant I2S/TDM, clock source and bandgap override registers
> in hw_free() so the codec is torn down cleanly and the speaker amplifier
> comes up reliably on back-to-back use cases. Move the bandgap override
> reset out of set_sysclk() into the teardown path where it belongs.
> 
> Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
> ---
>   sound/soc/codecs/wsa885x.c | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/wsa885x.c b/sound/soc/codecs/wsa885x.c
> index 1faa8541a872..5ffbf9e89fd9 100644
> --- a/sound/soc/codecs/wsa885x.c
> +++ b/sound/soc/codecs/wsa885x.c
> @@ -896,7 +896,6 @@ static int wsa885x_codec_set_sysclk(struct snd_soc_dai *dai, int clk_id,
>   
>   	regmap_write(wsa885x->regmap, WSA885X_DIG_CTRL0_SYS_CLK_SEL, 0x00);
>   	regmap_write(wsa885x->regmap, WSA885X_DIG_CTRL0_POWER_FSM_CTL1, 0x01);
> -	regmap_write(wsa885x->regmap, WSA885X_ANA_TOP_BG_TVP_OVRD_CTL, 0x00);
>   
>   	return 0;
>   }
> @@ -1006,6 +1005,16 @@ static int wsa885x_codec_hw_free(struct snd_pcm_substream *substream,
>   				 struct snd_soc_dai *dai)
>   {
>   	static const struct reg_sequence regs[] = {
> +		{ WSA885X_DIG_CTRL1_I2S_RESET_CTL, 0x00 },
> +		{ WSA885X_DIG_CTRL1_I2S_CFG0_TDM_TX, 0x00 },
> +		{ WSA885X_DIG_CTRL1_I2S_CFG1_TDM_TX, 0x00 },
> +		{ WSA885X_DIG_CTRL1_I2S_TDM_CTL1, 0x05 },
> +		{ WSA885X_DIG_CTRL1_I2S_TDM_CTL0, 0x00 },
> +		{ WSA885X_DIG_CTRL1_I2S_TDM_CH_TX, 0x00 },
> +		{ WSA885X_DIG_CTRL1_I2S_CTL0, 0x06 },
> +		{ WSA885X_DIG_CTRL1_I2S_TDM_CH_RX, 0x08 },
> +		{ WSA885X_DIG_CTRL0_CLK_SOURCE_ENABLE, 0x00 },
> +		{ WSA885X_ANA_TOP_BG_TVP_OVRD_CTL, 0x00 },


This moves the BG_TVP override clear from immediately after a successful 
PLL lock to hw_free(), so WSA885X_ANA_TOP_BG_TVP_OVRD_CTL appears to 
remain at 0x03 for the lifetime of the active stream.

Is that intentional for the back-to-back playback fix? If the override 
is only needed during PLL programming/lock, keeping the old immediate 
clear and also resetting it during hw_free() would preserve the existing 
active-stream behavior while still cleaning up the teardown path.

Thanks
Ajay Kumar Nandam


>   		{ WSA885X_DIG_CTRL0_PA_FSM_CTL, 0x00 },
>   	};
>   	struct wsa885x_priv *wsa885x;


  reply	other threads:[~2026-10-06  8:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06  5:37 [PATCH v1 0/3] ASoC: qcom: split out self-contained Hawi/Maili audio changes Prasad Kumpatla
2026-10-06  5:37 ` [PATCH v1 1/3] ASoC: codecs: wsa885x: Reset registers on teardown for B2B playback Prasad Kumpatla
2026-10-06  8:33   ` Ajay Kumar Nandam [this message]
2026-10-06 11:34     ` Prasad Kumpatla
2026-10-06  5:37 ` [PATCH v1 2/3] ASoC: qcom: sc8280xp: add Maili sound card configuration Prasad Kumpatla
2026-10-06  8:34   ` Ajay Kumar Nandam
2026-10-06  5:37 ` [PATCH v1 3/3] arm64: defconfig: Enable Hawi LPASS LPI pinctrl driver Prasad Kumpatla
2026-10-06  8:35   ` Ajay Kumar Nandam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47a42c54-d3b8-44ec-8017-cdc34b474798@oss.qualcomm.com \
    --to=ajay.nandam@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=prasad.kumpatla@oss.qualcomm.com \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®