[PATCH v2 0/2] ASoC: ti: omap-mcbsp: TDM slots for generic cards

From: Joseph Telaak

Date: Mon Nov 23 2026 - 23:34:38 EST


With simple-audio-card or audio-graph-card, McBSP as clock provider runs
its bit clock at the full SRG input, since only a machine driver can set
its divider. Patch 2 adds set_tdm_slot() so these cards can ask for a
frame of slots x slot_width bit clocks; patch 1 lets the divider use all
8 bits of CLKGDV.

The ADV7513 in the test takes S32_LE only with a companion adv7511
patch:
https://lore.kernel.org/r/20261116-adv7511-s32-v1-1-40ae8228db42@xxxxxxxxxx

---
Changes in v2:
- 2/2: hw_params() checks the stream against the slots and the sysclk
(Mark).
- 2/2: rates are limited at open only for a sysclk set outside a stream,
as simple-audio-card does at init; a sysclk a card sets in hw_params()
is checked there (Mark).
- 2/2: both directions share the SRG, so the second is held to the
first's rate and sysclk until the first's hw_free().
- 2/2: channels are pinned to the active slots, non-empty TX and RX masks
need the same weight, and unsupported slots are reported.
- 2/2: a sysclk from the internal fclk must be that clock's rate, so
simple-card's mclk-fs (rate x fs) is refused instead of misprogrammed.
- 2/2: dropped Jarkko's Acked-by since the patch changed.
- 1/2: commit message wording only; keeps Jarkko's Acked-by.
- Not supported: dai-tdm-slot-width-map switching.
- Not tested on hardware: full duplex and a sysclk set in hw_params();
the test board has playback only.
- Link to v1: https://patch.msgid.link/20261116-omap-mcbsp-tdm-slot-v1-0-6c9f7aa45a29@xxxxxxxxxx

---
Joseph Telaak (2):
ASoC: ti: omap-mcbsp: Use all 8 bits of CLKGDV
ASoC: ti: omap-mcbsp: Implement set_tdm_slot

sound/soc/ti/omap-mcbsp-priv.h | 15 +-
sound/soc/ti/omap-mcbsp.c | 334 ++++++++++++++++++++++++++++++++++++++++-
2 files changed, 345 insertions(+), 4 deletions(-)
---
base-commit: 2c0f21bfcda98db49f6476ff9b042402e5f20d3e
change-id: 20261115-omap-mcbsp-tdm-slot-7ee61348226b

Best regards,
--
Joseph Telaak <joseph@xxxxxxxxxx>