Devicetree
 help / color / mirror / Atom feed
From: David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org>
To: Srinivas Kandagatla <srini@kernel.org>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 David Rhodes <david.rhodes@cirrus.com>,
	 Richard Fitzgerald <rf@opensource.cirrus.com>,
	 Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 David Rhodes <drhodes@opensource.cirrus.com>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
	 devicetree@vger.kernel.org, phone-devel@vger.kernel.org,
	 David Heidelberg <david@ixit.cz>
Subject: [PATCH RFC 3/6] ASoC: qcom: sdm845: Use per-speaker RX masks for TDM slot assignment
Date: Sun, 05 Jul 2026 22:06:53 +0200	[thread overview]
Message-ID: <20260705-pixel3-audio-v1-3-3b66f33859f1@ixit.cz> (raw)
In-Reply-To: <20260705-pixel3-audio-v1-0-3b66f33859f1@ixit.cz>

From: David Heidelberg <david@ixit.cz>

Both Left and Right codec DAIs were passing the same SPK_TDM_RX_MASK,
both speakers ended up on slot 0, breaking the one speaker in
configuration such as on Pixel 3.

Split SPK_TDM_RX_MASK into per-speaker masks so that the Left codec
gets slot 0 (rx_mask=0x01) and the Right codec gets slot 1
(rx_mask=0x02).

This commit is here, so later CS35L36 receives correct slot for right
and left speakers.

Assisted-by: Claude:claude-4.6-opus
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 sound/soc/qcom/sdm845.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c
index 9de3282bda4be..8b65aa3982d47 100644
--- a/sound/soc/qcom/sdm845.c
+++ b/sound/soc/qcom/sdm845.c
@@ -150,29 +150,29 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream,
 		}
 	}
 
 	for_each_rtd_codec_dais(rtd, j, codec_dai) {
 
 		if (!strcmp(codec_dai->component->name_prefix, "Left")) {
 			ret = snd_soc_dai_set_tdm_slot(
 					codec_dai, LEFT_SPK_TDM_TX_MASK,
-					SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
+					LEFT_SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
 					slot_width);
 			if (ret < 0) {
 				dev_err(rtd->dev,
 					"DEV0 TDM slot err:%d\n", ret);
 				return ret;
 			}
 		}
 
 		if (!strcmp(codec_dai->component->name_prefix, "Right")) {
 			ret = snd_soc_dai_set_tdm_slot(
 					codec_dai, RIGHT_SPK_TDM_TX_MASK,
-					SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
+					RIGHT_SPK_TDM_RX_MASK, NUM_TDM_SLOTS,
 					slot_width);
 			if (ret < 0) {
 				dev_err(rtd->dev,
 					"DEV1 TDM slot err:%d\n", ret);
 				return ret;
 			}
 		}
 	}

-- 
2.53.0



  parent reply	other threads:[~2026-07-05 20:07 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
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 ` David Heidelberg via B4 Relay [this message]
2026-07-05 20:25   ` [PATCH RFC 3/6] ASoC: qcom: sdm845: Use per-speaker RX masks for TDM slot assignment 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=20260705-pixel3-audio-v1-3-3b66f33859f1@ixit.cz \
    --to=devnull+david.ixit.cz@kernel.org \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=drhodes@opensource.cirrus.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=rf@opensource.cirrus.com \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /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