Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 4/9] ASoC: qcom: lpass-va-macro: Add shikra compatible
Date: Sun, 22 Nov 2026 19:01:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-228220@kernel.org> (raw)
In-Reply-To: <20261123-add_shikra_support-v7-4-7bf3aa089fc6@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] ASoC: qcom: lpass-va-macro: missing version cross-check in
  va_macro_probe()
- [Low] ASoC: qcom: lpass-va-macro: duplicate base defaults in
  va_4_0_defaults
--

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

ASoC: qcom: lpass-va-macro: Add shikra compatible

This commit adds Shikra VA macro match data, LPASS codec v4.0 adaptive
filter (ADPT) register definitions and defaults, and frame sync counter
bypass handling.

> diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
> index af8308eacb0ba..2401006387445 100644
> --- a/sound/soc/codecs/lpass-va-macro.c
> +++ b/sound/soc/codecs/lpass-va-macro.c

[ ... ]

> @@ -396,6 +448,127 @@ static const struct reg_default va_defaults[] = {
>  	{ CDC_VA_TX3_TX_PATH_SEC6, 0x00},
>  };
>  
> +static const struct reg_default va_4_0_defaults[] = {
> +	/* VA macro */
> +	{ CDC_VA_CLK_RST_CTRL_MCLK_CONTROL, 0x00},
> +	{ CDC_VA_CLK_RST_CTRL_FS_CNT_CONTROL, 0x00},
> +	{ CDC_VA_CLK_RST_CTRL_SWR_CONTROL, 0x00},

[ ... ]

> +	{ CDC_VA_TX3_TX_PATH_SEC5, 0x00},
> +	{ CDC_VA_TX3_TX_PATH_SEC6, 0x00},
> +	/* ADPT blocks */
> +	{ CDC_VA_CDC_ADPT0_ADPT_CTRL, 0x51},

[Severity: Low]
This isn't a bug, but va_4_0_defaults[] copies all 75 base register
entries from va_defaults[] verbatim before appending the 40 new v4.0 ADPT
entries, which makes the two tables easy to get out of sync if a common
default changes.

[ ... ]

> @@ -542,7 +782,13 @@ static int va_macro_mclk_enable(struct va_macro *va, bool mclk_enable)
>  	if (mclk_enable) {
>  		va_clk_rsc_fs_gen_request(va, true);
>  		regcache_mark_dirty(regmap);
> -		regcache_sync_region(regmap, 0x0, VA_MAX_OFFSET);
> +		regcache_sync_region(regmap, 0x0, regmap_get_max_register(regmap));
> +		/*
> +		 * Sync the decimator input muxes again to restore registers
> +		 * skipped by no_sync_defaults when they hold reset values.
> +		 */
> +		regcache_sync_region(regmap, CDC_VA_INP_MUX_ADC_MUX0_CFG0,
> +				     CDC_VA_INP_MUX_ADC_MUX3_CFG1);
>  	} else {
>  		va_clk_rsc_fs_gen_request(va, false);
>  	}

[ ... ]

> @@ -1565,6 +1817,14 @@ static int va_macro_set_lpass_codec_version(struct va_macro *va)
>  		default:
>  			break;
>  		}
> +	} else if (maj == 4) {
> +		switch (min) {
> +		case 0:
> +			version = LPASS_CODEC_VERSION_4_0;
> +			break;
> +		default:
> +			break;
> +		}
>  	}
>  
>  	if (version == LPASS_CODEC_VERSION_UNKNOWN) {

[Severity: Low]
As reported by Ajay Kumar Nandam on v4 [1], the commit message states that
probe cross-checks the register layout chosen from match data against the
version reported by hardware, but neither va_macro_probe() nor
va_macro_set_lpass_codec_version() compares the detected version against
the selected match data (such as data->regmap_config or data->has_adpt).

Also, the commit message does not mention why va_macro_mclk_enable() adds
a second regcache_sync_region() call for CDC_VA_INP_MUX_ADC_MUX0_CFG0
through CDC_VA_INP_MUX_ADC_MUX3_CFG1 across all VA macro platforms.

[1] https://lore.kernel.org/r/84c8e0d7-b3f6-497d-93ac-4c3ad7e5956a@oss.qualcomm.com

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-add_shikra_support-v7-0-7bf3aa089fc6@oss.qualcomm.com?part=4

  reply	other threads:[~2026-11-22 19:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 18:41 [PATCH v7 0/9] ASoC: qcom: Add shikra and Hawi LPASS macro support Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 1/9] ASoC: dt-bindings: qcom: Add Shikra RX and VA macro codecs Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 2/9] ASoC: qcom: lpass-macro-common: Add missing v2.9 version string Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 3/9] ASoC: qcom: lpass-rx-macro: Add shikra compatible Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 4/9] ASoC: qcom: lpass-va-macro: " Mohammad Rafi Shaik
2026-11-22 19:01   ` sashiko-bot [this message]
2026-11-22 18:41 ` [PATCH v7 5/9] ASoC: qcom: lpass-va-macro: Add SoundWire microphone support Mohammad Rafi Shaik
2026-11-22 18:55   ` sashiko-bot
2026-11-22 18:41 ` [PATCH v7 6/9] ASoC: dt-bindings: qcom: Add Hawi LPASS macro codecs Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 7/9] ASoC: dt-bindings: qcom: Add Maili " Mohammad Rafi Shaik
2026-11-22 18:41 ` [PATCH v7 8/9] ASoC: qcom: lpass-tx-macro: Add support for Hawi Mohammad Rafi Shaik
2026-11-22 19:00   ` sashiko-bot
2026-11-22 18:41 ` [PATCH v7 9/9] ASoC: qcom: lpass: " Mohammad Rafi Shaik
2026-11-22 18:57   ` sashiko-bot

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-228220@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-sound@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox