From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v4 4/8] ASoC: qcom: lpass-va-macro: Add shikra compatible
Date: Tue, 22 Sep 2026 09:53:25 +0000 [thread overview]
Message-ID: <20260922095325.7D2C21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922-add_shikra_support-v1-4-6c6cb6444caf@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] ASoC: lpass-va-macro: static version assignment bypasses hardware cross-check
--
commit 56f2a447aaf7dc3ac69e03680c277ea0d7300890
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
ASoC: qcom: lpass-va-macro: Add shikra compatible
This commit adds shikra specific VA macro data and register programming
needed by the LPASS codec v4.1 implementation. It extends the VA macro
with four adaptive filter blocks and adds the new registers as a separate
reg_default array.
> diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
> index 03d6434a4a126..02dc3346924f1 100644
> --- a/sound/soc/codecs/lpass-va-macro.c
> +++ b/sound/soc/codecs/lpass-va-macro.c
[ ... ]
> @@ -463,6 +674,27 @@ static const struct regmap_config va_regmap_config = {
[ ... ]
> +static const struct regmap_config va_4_1_regmap_config = {
> + .name = "va_macro",
> + .reg_bits = 32,
> + .val_bits = 32,
> + .reg_stride = 4,
> + .cache_type = REGCACHE_MAPLE,
> + .reg_defaults = va_4_1_defaults,
> + .num_reg_defaults = ARRAY_SIZE(va_4_1_defaults),
> + .max_register = VA_4_1_MAX_OFFSET,
> + .volatile_reg = va_is_volatile_register,
> + .readable_reg = va_is_readable_register,
> + .writeable_reg = va_is_rw_register,
> +};
> +
> +static const struct va_macro_data shikra_va_data = {
> + .has_swr_master = true,
> + .has_npl_clk = true,
> + .version = LPASS_CODEC_VERSION_4_1,
[Severity: Medium]
Does this static version assignment bypass the hardware cross-check?
The commit message states that probe cross-checks the register layout against
the version reported by the hardware. However, setting the version here causes
the probe function to skip reading the hardware register entirely:
sound/soc/codecs/lpass-va-macro.c:va_macro_probe() {
...
if (data->version) {
lpass_macro_set_codec_version(data->version);
} else {
/* read version from register */
ret = va_macro_set_lpass_codec_version(va);
if (ret)
goto err_rpm_put;
}
...
}
Because data->version evaluates to true for the shikra compatible,
va_macro_set_lpass_codec_version() is bypassed. If a mismatched device tree
is booted on older hardware that is not v4.1, could this lead to bus errors
by accessing unsupported ADPT registers?
> + .regmap_config = &va_4_1_regmap_config,
> +};
> +
> static int va_clk_rsc_fs_gen_request(struct va_macro *va, bool enable)
> {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922-add_shikra_support-v1-0-6c6cb6444caf@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-09-22 9:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 9:42 [PATCH v4 0/8] ASoC: qcom: Add shikra and Hawi LPASS macro support Mohammad Rafi Shaik
2026-09-22 9:42 ` [PATCH v4 1/8] ASoC: dt-bindings: qcom: Add Shikra RX and VA macro codecs Mohammad Rafi Shaik
2026-09-23 8:42 ` Krzysztof Kozlowski
2026-09-28 6:26 ` Krzysztof Kozlowski
2026-09-22 9:42 ` [PATCH v4 2/8] ASoC: qcom: lpass-macro-common: Add missing v2.9 version string Mohammad Rafi Shaik
2026-09-24 5:43 ` Ajay Kumar Nandam
2026-09-22 9:42 ` [PATCH v4 3/8] ASoC: qcom: lpass-rx-macro: Add shikra compatible Mohammad Rafi Shaik
2026-09-24 6:14 ` Ajay Kumar Nandam
2026-09-22 9:42 ` [PATCH v4 4/8] ASoC: qcom: lpass-va-macro: " Mohammad Rafi Shaik
2026-09-22 9:53 ` sashiko-bot [this message]
2026-09-25 7:23 ` Ajay Kumar Nandam
2026-09-22 9:42 ` [PATCH v4 5/8] ASoC: qcom: lpass-va-macro: Add SoundWire microphone support Mohammad Rafi Shaik
2026-09-22 10:00 ` sashiko-bot
2026-09-25 9:21 ` Ajay Kumar Nandam
2026-09-22 9:42 ` [PATCH v4 6/8] ASoC: dt-bindings: qcom: Add Hawi LPASS macro codecs Mohammad Rafi Shaik
2026-09-22 9:55 ` sashiko-bot
2026-09-22 9:42 ` [PATCH v4 7/8] ASoC: qcom: lpass-tx-macro: Add support for Bolero v4.0 Mohammad Rafi Shaik
2026-09-22 10:01 ` sashiko-bot
2026-09-22 15:49 ` Mark Brown
2026-10-01 12:42 ` Prasad Kumpatla
2026-09-25 10:22 ` Ajay Kumar Nandam
2026-10-01 12:46 ` Prasad Kumpatla
2026-09-22 9:42 ` [PATCH v4 8/8] ASoC: qcom: lpass: Add support for LPASS codec v4.0 Mohammad Rafi Shaik
2026-09-25 11:02 ` Ajay Kumar Nandam
2026-10-01 12:44 ` Prasad Kumpatla
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=20260922095325.7D2C21F000FF@smtp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox