Re: [PATCH RFC 5/6] ASoC: cs35l36: Implement set_tdm_slot to program RX slot register
From: David Heidelberg
Date: Wed Jul 29 2026 - 15:24:40 EST
On 06/07/2026 10:52, Charles Keepax wrote:
On Sun, Jul 05, 2026 at 10:06:55PM +0200, David Heidelberg via B4 Relay wrote:
From: David Heidelberg <david@xxxxxxx>
Program ASP_RX1_SLOT with the first set bit of rx_mask so the
amplifier listens on the correct TDM slot when configured by
machine drivers.
Assisted-by: Claude:claude-4.6-opus
Signed-off-by: David Heidelberg <david@xxxxxxx>
---
+static int cs35l36_set_tdm_slot(struct snd_soc_dai *dai,
+ unsigned int tx_mask, unsigned int rx_mask,
+ int slots, int slot_width)
+{
+ struct cs35l36_private *cs35l36 =
+ snd_soc_component_get_drvdata(dai->component);
+
+ if (rx_mask)
+ regmap_update_bits(cs35l36->regmap, CS35L36_ASP_RX1_SLOT,
+ CS35L36_ASP_RX1_SLOT_MASK,
+ ffs(rx_mask) - 1);
It is more normal for the masks to specify the slot number rather
than the bit number, it would probably be nicer to stick with
that convention even though it will complicate the code here a
little.
Thank you, is there one of the cs*l* series which implements in similar fashion as requested?
Thanks
David
Thanks,
Charles
--
David Heidelberg