Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "David Heidelberg" <david@ixit.cz>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH RFC 2/6] ASoC: qcom: sdm845: use DSP_A format for TDM codec DAIs
Date: Sun, 05 Jul 2026 20:18:14 +0000	[thread overview]
Message-ID: <20260705201814.84F3A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260705-pixel3-audio-v1-2-3b66f33859f1@ixit.cz>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Missing NULL check on `codec_dai->component->name_prefix` causes a kernel panic if the device tree omits the `sound-name-prefix` property.
--

commit 34e4567f69218c8e1f7099e3d2b65d5ada37de5a
Author: David Heidelberg <david@ixit.cz>

ASoC: qcom: sdm845: use DSP_A format for TDM codec DAIs

This commit modifies sdm845_snd_startup() to use the DSP_A timing format
instead of DSP_B for TDM codec DAIs to match the expected hardware behavior.

> diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
> --- a/sound/soc/qcom/sdm845.c
> +++ b/sound/soc/qcom/sdm845.c
> @@ -385,7 +385,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
>  				TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
>  		}
>  
> -		codec_dai_fmt |= SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_DSP_B;
> +		codec_dai_fmt |= SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_DSP_A;
>  
>  		for_each_rtd_codec_dais(rtd, j, codec_dai) {
>  
>  			if (!strcmp(codec_dai->component->name_prefix,
>  				    "Left")) {

[Severity: High]
This is a pre-existing issue, but can this lead to a NULL pointer dereference?

If a codec's device tree node omits the sound-name-prefix property, the ASoC
core sets component->name_prefix to NULL. Passing this directly to strcmp()
will cause a kernel panic during driver startup.

The same pattern appears immediately below this for the "Right" channel
prefix, and also in sdm845_tdm_snd_hw_params(). Should there be a NULL check
added before comparing these prefixes?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260705-pixel3-audio-v1-0-3b66f33859f1@ixit.cz?part=2

  reply	other threads:[~2026-07-05 20:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-05 20:06 [PATCH RFC 0/6] Speakers for Pixel 3 / 3 XL David Heidelberg via B4 Relay
2026-07-05 20:06 ` [PATCH RFC 1/6] ASoC: qcom: sdm845: Demystify TDM masks a bit David Heidelberg via B4 Relay
2026-07-05 20:19   ` sashiko-bot
2026-07-05 20:06 ` [PATCH RFC 2/6] ASoC: qcom: sdm845: use DSP_A format for TDM codec DAIs David Heidelberg via B4 Relay
2026-07-05 20:18   ` sashiko-bot [this message]
2026-07-06  8:33   ` Konrad Dybcio
2026-07-06  9:15     ` David Heidelberg
2026-07-06  9:40       ` Konrad Dybcio
2026-07-05 20:06 ` [PATCH RFC 3/6] ASoC: qcom: sdm845: Use per-speaker RX masks for TDM slot assignment David Heidelberg via B4 Relay
2026-07-05 20:25   ` sashiko-bot
2026-07-05 20:06 ` [PATCH RFC 4/6] ASoC: qcom: sdm845: Set codec dai and component sysclk during startup David Heidelberg via B4 Relay
2026-07-05 20:19   ` sashiko-bot
2026-07-05 20:06 ` [PATCH RFC 5/6] ASoC: cs35l36: Implement set_tdm_slot to program RX slot register David Heidelberg via B4 Relay
2026-07-05 20:20   ` sashiko-bot
2026-07-06  8:52   ` Charles Keepax
2026-07-06  9:11   ` Konrad Dybcio
2026-07-05 20:06 ` [PATCH RFC 6/6] arm64: dts: qcom: sdm845-google: Add basic audio support David Heidelberg via B4 Relay
2026-07-05 20:18   ` sashiko-bot
2026-07-06  9:14   ` Konrad Dybcio
2026-07-06  9:17     ` David Heidelberg
2026-07-06 11:59       ` Konrad Dybcio
2026-07-06 12:00   ` Konrad Dybcio

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=20260705201814.84F3A1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --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