From: sashiko-bot@kernel.org
To: "Prasad Kumpatla" <prasad.kumpatla@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 3/4] ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration
Date: Tue, 18 Aug 2026 08:59:36 +0000 [thread overview]
Message-ID: <20260818085937.0723F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818084655.3240284-4-prasad.kumpatla@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Un-updated caller sc8280xp_tdm_hw_params() causes PCM initialization failure for missing TDM configurations and ignores malformed ones.
--
--- Patch [3]: [PATCH v2 3/4] ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration ---
commit 6f19acb6aca2ed0950dcc6a8cc707f166eb0eb8c
Author: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration
Return -ENOENT for missing DAI-link configuration and preserve -EINVAL
for malformed TDM slot properties.
Link: https://sashiko.dev/#/patchset/20260804070307.117119-1-prasad.kumpatla@oss.qualcomm.com
> diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
> index d231024206dbf..d9f256d519733 100644
> --- a/sound/soc/qcom/common.c
> +++ b/sound/soc/qcom/common.c
> @@ -103,14 +103,14 @@ static int qcom_snd_parse_dai_tdm_slots(struct snd_soc_pcm_runtime *rtd,
> int ret;
>
> if (!link_np)
> - return -EINVAL;
> + return -ENOENT;
>
> struct device_node *cpu_np __free(device_node) =
> of_get_child_by_name(link_np, "cpu");
> struct device_node *codec_np __free(device_node) =
> of_get_child_by_name(link_np, "codec");
> if (!cpu_np || !codec_np)
> - return -EINVAL;
> + return -ENOENT;
>
> ret = qcom_snd_parse_tdm_slot(cpu_np, cpu_cfg);
> if (ret)
> @@ -172,7 +172,7 @@ int qcom_snd_apply_dai_tdm_slots(struct snd_soc_pcm_runtime *rtd)
>
> ret = qcom_snd_get_dai_tdm_slots(rtd, &cpu_cfg, &codec_cfg);
> if (ret)
> - return ret == -EINVAL ? 0 : ret;
> + return ret == -ENOENT ? 0 : ret;
[Severity: High]
Does changing the return value here also require an update to
sc8280xp_tdm_hw_params() in sound/soc/qcom/sc8280xp.c?
Looking at sc8280xp_tdm_hw_params(), it calls qcom_snd_get_dai_tdm_slots()
which now returns -ENOENT for missing configurations. However, it still
appears to check for -EINVAL:
sound/soc/qcom/sc8280xp.c:sc8280xp_tdm_hw_params() {
...
ret = qcom_snd_get_dai_tdm_slots(rtd, &cpu_cfg, &codec_cfg);
if (ret)
return ret == -EINVAL ? 0 : ret;
...
}
Will this cause sc8280xp_tdm_hw_params() to mistakenly return an error
(-ENOENT) when the configuration is missing, and incorrectly ignore the
error (-EINVAL) when the configuration is actually malformed?
>
> return qcom_snd_apply_dai_tdm_slots_cfg(rtd, &cpu_cfg, &codec_cfg);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260818084655.3240284-1-prasad.kumpatla@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-08-18 8:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 8:46 [PATCH v2 0/4] ASoC: qcom: Fix AudioReach TDM review findings Prasad Kumpatla
2026-08-18 8:46 ` [PATCH v2 1/4] dt-bindings: sound: qcom,q6dsp-lpass-ports: Rename QAIF clock IDs Prasad Kumpatla
2026-08-18 13:02 ` Mark Brown
2026-08-18 8:46 ` [PATCH v2 2/4] ASoC: qcom: qdsp6: Zero-initialize AudioReach module config Prasad Kumpatla
2026-08-18 9:07 ` sashiko-bot
2026-08-18 8:46 ` [PATCH v2 3/4] ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration Prasad Kumpatla
2026-08-18 8:59 ` sashiko-bot [this message]
2026-08-18 8:46 ` [PATCH v2 4/4] ASoC: qcom: sc8280xp: Fix TDM hw_params error handling 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=20260818085937.0723F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=prasad.kumpatla@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.