All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 5/9] ASoC: qcom: lpass-va-macro: Add SoundWire microphone support
Date: Wed, 14 Oct 2026 09:30:12 +0000	[thread overview]
Message-ID: <sashiko-outbox-171075@kernel.org> (raw)
In-Reply-To: <20261014-add_shikra_support_v5-v5-5-fb9f0667e613@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] ASoC: qcom: lpass-va-macro: Stale hardware domain state when switching decimator mux dynamically
--

commit 06fa19ab9efeab4b7696e8d81e98eecb28b18195
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

ASoC: qcom: lpass-va-macro: Add SoundWire microphone support
    
The VA decimators can currently capture audio only from DMIC inputs.
Add support for routing audio from SoundWire microphone (SMIC) inputs
as well.

> diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
> index 53828dd80b832..cdef2b187407e 100644
> --- a/sound/soc/codecs/lpass-va-macro.c
> +++ b/sound/soc/codecs/lpass-va-macro.c

[ ... ]

> @@ -1003,6 +1032,18 @@ static int va_macro_enable_dec(struct snd_soc_dapm_widget *w,
>  
>  	switch (event) {
>  	case SND_SOC_DAPM_PRE_PMU:
> +		/*
> +		 * ADC_DMIC_SEL is shared by the DMIC and the SoundWire mic
> +		 * mux, so its value depends on the order in which userspace
> +		 * restores the two controls. Program it from the resolved
> +		 * mux state of this decimator, which is what selects the
> +		 * input domain.
> +		 */
> +		snd_soc_component_update_bits(comp, dec_cfg_reg,
> +					      CDC_VA_TX_PATH_ADC_DMIC_SEL_MASK,
> +					      is_amic_enabled(comp, decimator) ?
> +					      CDC_VA_TX_PATH_ADC_DMIC_SEL_ADC :
> +					      CDC_VA_TX_PATH_ADC_DMIC_SEL_DMIC);

[Severity: Medium]
The outer decimator muxes like va_dec0_mux are defined using the standard
SOC_DAPM_ENUM macro.  Unlike the inner muxes like va_smic0_mux which have
custom put callbacks (va_macro_put_dec_enum), the outer muxes lack a custom
put callback to sync this register on the fly.

If an active capture stream is running and the outer decimator mux is
dynamically toggled between VA_DMIC and SWR_MIC, the mux widget remains
powered.  Since the power state doesn't cycle, DAPM will bypass the
SND_SOC_DAPM_PRE_PMU event in va_macro_enable_dec() shown here.

Will this cause ADC_DMIC_SEL to become stale and the hardware to continue
capturing from the old domain while DAPM routes the new one, resulting in
silent or corrupted audio until the stream is restarted?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014-add_shikra_support_v5-v5-0-fb9f0667e613@oss.qualcomm.com?part=5

  reply	other threads:[~2026-10-14  9:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  9:12 [PATCH v5 0/9] ASoC: qcom: Add shikra and Hawi LPASS macro support Mohammad Rafi Shaik
2026-10-14  9:12 ` [PATCH v5 1/9] ASoC: dt-bindings: qcom: Add Shikra RX and VA macro codecs Mohammad Rafi Shaik
2026-10-14  9:12 ` [PATCH v5 2/9] ASoC: qcom: lpass-macro-common: Add missing v2.9 version string Mohammad Rafi Shaik
2026-10-14  9:12 ` [PATCH v5 3/9] ASoC: qcom: lpass-rx-macro: Add shikra compatible Mohammad Rafi Shaik
2026-10-14  9:28   ` sashiko-bot
2026-10-14  9:12 ` [PATCH v5 4/9] ASoC: qcom: lpass-va-macro: " Mohammad Rafi Shaik
2026-10-14  9:12 ` [PATCH v5 5/9] ASoC: qcom: lpass-va-macro: Add SoundWire microphone support Mohammad Rafi Shaik
2026-10-14  9:30   ` sashiko-bot [this message]
2026-10-14  9:12 ` [PATCH v5 6/9] ASoC: dt-bindings: qcom: Add Hawi LPASS macro codecs Mohammad Rafi Shaik
2026-10-14  9:35   ` sashiko-bot
2026-10-14  9:12 ` [PATCH v5 7/9] ASoC: dt-bindings: qcom: Add Maili " Mohammad Rafi Shaik
2026-10-14  9:12 ` [PATCH v5 8/9] ASoC: qcom: lpass-tx-macro: Add support for Bolero v4.0 Mohammad Rafi Shaik
2026-10-14  9:35   ` sashiko-bot
2026-10-14  9:12 ` [PATCH v5 9/9] ASoC: qcom: lpass: Add support for LPASS codec v4.0 Mohammad Rafi Shaik

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=sashiko-outbox-171075@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mohammad.rafi.shaik@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.