From: sashiko-bot@kernel.org
To: "David Heidelberg" <david@ixit.cz>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC 1/6] ASoC: qcom: sdm845: Demystify TDM masks a bit
Date: Sun, 05 Jul 2026 20:19:56 +0000 [thread overview]
Message-ID: <20260705201956.74F541F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260705-pixel3-audio-v1-1-3b66f33859f1@ixit.cz>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The CPU DAI's capture mask is incorrectly configured to 0x0F (slots 0-3) instead of 0xF0 (slots 4-7), breaking the V/I sense capture path. The patch exacerbates this by using the playback macro `SPK_TDM_RX_MASK` to construct the capture mask, which creates a false semantic link and obfuscates the underlying bug.
--
commit 7636e0a7627a4449334c3af3eda079faca90b76e
Author: David Heidelberg <david@ixit.cz>
ASoC: qcom: sdm845: Demystify TDM masks a bit
This commit updates the hardcoded TDM masks in the sdm845 machine driver
by defining them as bitmasks and utilizing them in the hw_params function.
It aims to describe which bits are used for each RX/TX slot.
> diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
> index 0ce9dff4dc525..edd2cc7a1c74f 100644
> --- a/sound/soc/qcom/sdm845.c
> +++ b/sound/soc/qcom/sdm845.c
[ ... ]
> @@ -129,8 +131,10 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,
> goto end;
> }
> } else {
> - ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xf, 0,
> - 8, slot_width);
> + ret = snd_soc_dai_set_tdm_slot(cpu_dai,
> + SPK_TDM_RX_MASK | BIT(2) |
> + BIT(3), 0,
> + NUM_TDM_SLOTS, slot_width);
[Severity: High]
This is a pre-existing issue, but does using SPK_TDM_RX_MASK here conflate
the CPU DAI capture mask with the playback RX macros?
Looking at the capture path in sdm845_tdm_snd_hw_params(), the CPU DAI's
capture mask is currently configured to 0x0F (slots 0-3), but the codecs
are configured to transmit on slots 4-7 (mask 0xF0). This mismatch causes
the V/I sense capture path to receive silence.
Since the DSP channel mapping maps channels to slots 0, 4, 8, and 12, an
active mask of 0x0F completely disables slots 4 and 8 on the TDM port.
Could the capture mask be updated to use LEFT_SPK_TDM_TX_MASK and
RIGHT_SPK_TDM_TX_MASK to correctly configure 0xF0, rather than building
0x0F out of the playback mask?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260705-pixel3-audio-v1-0-3b66f33859f1@ixit.cz?part=1
next prev parent reply other threads:[~2026-07-05 20:19 UTC|newest]
Thread overview: 29+ 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 ` David Heidelberg
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:06 ` David Heidelberg
2026-07-05 20:19 ` sashiko-bot [this message]
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:06 ` David Heidelberg
2026-07-05 20:18 ` sashiko-bot
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:06 ` David Heidelberg
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:06 ` David Heidelberg
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:06 ` David Heidelberg
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:06 ` David Heidelberg
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=20260705201956.74F541F000E9@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 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.