On 5/19/26 1:06 PM, Mark Brown wrote:
On Mon, May 18, 2026 at 06:44:31PM -0300, Val Packett wrote:
This amp supports TDM mode, so implement the set_tdm_slot operation to
let the SoC driver configure the TDM slot number, width, and masks.
+static int aw88261_set_tdm_slot(struct snd_soc_dai *dai,
+ unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
+{
In spite of the changelog this doesn't actually seem to use slot_width?
It should.
Right, I hadn't exactly figured out where that slots in (ha)..
The datasheet seems to say that I2SBCK is slot width, but there are only
3 options for it (32/48/64) and I currently select the one that matches
2*physical_width.
Grepping the tree I'm seeing that slot_width is basically the same thing
as physical width. Should slot_width from set_tdm_slot take precedence
over the params_physical_width() from hw_params? Should I just have both
callbacks set the variable and whichever was called last "wins"?
Note also that we should disable TDM if slots == 0.
This is pretty much already the case.. but I guess I should also reset
the masks specifically to the i2s default (2nd channel to R). Are masks
also zero when slots == 0?
Thanks,
~val