Re: [PATCH 4/4] ASoC: ti: davinci-mcasp: Add asynchronous mode support

From: Péter Ujfalusi

Date: Mon Feb 02 2026 - 12:03:09 EST




On 30/01/2026 07:10, Sen Wang wrote:
> McASP has dedicated clock & frame sync registers for both transmit
> and receive. Currently McASP driver only supports synchronous behavior and
> couples both TX & RX settings.
>
> Add logic that enables asynchronous mode via ti,async-mode property. In
> async mode, playback & record can be done simultaneously with different
> audio configurations (tdm slots, tdm width, audio bit depth).
>
> Note the ability to have different tx/rx DSP formats (i2s, dsp_a, etc.),
> while possible in hardware, remains to be a gap as it require changes
> to the corresponding machine driver interface.
>
> Existing IIS (sync mode) and DIT mode logic remains mostly unchanged.
> Exceptions are IIS mode logic that previously assumed sync mode, which has
> now been made aware of the distinction. And shared logic across all modes
> also now checks for McASP tx/rx-specific driver attributes. Those
> attributes have been populated according to the original extent, ensuring
> no divergence in functionality.
>
> Constraints no longer applicable for async mode are skipped.
> Clock selection options have also been added to include rx/tx-only clk_ids,
> exposing independent configuration via the machine driver as well.
>
> Note that asynchronous mode is not applicable for McASP in DIT mode,
> which is a transmitter-only mode to interface w/ self-clocking formats.
>
> Signed-off-by: Sen Wang <sen@xxxxxx>
> ---
> include/linux/platform_data/davinci_asp.h | 3 +-
> sound/soc/ti/davinci-mcasp.c | 487 +++++++++++++++++-----
> sound/soc/ti/davinci-mcasp.h | 10 +
> 3 files changed, 398 insertions(+), 102 deletions(-)
>
> diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
>

static void mcasp_start_rx(struct davinci_mcasp *mcasp)
> {
> if (mcasp->rxnumevt) { /* enable FIFO */
> @@ -230,13 +288,17 @@ static void mcasp_start_rx(struct davinci_mcasp *mcasp)
> /*
> * When ASYNC == 0 the transmit and receive sections operate
> * synchronously from the transmit clock and frame sync. We need to make
> - * sure that the TX signlas are enabled when starting reception.
> + * sure that the TX signals are enabled when starting reception.
> + * Else set pin to be output when McASP is the master

In new code - while it might not match with old code - use producer
instead of master.

Otherwise it looks nice, I trust you have tested the sync and DIT mode.

With this nitpick addressed:
Acked-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>

--
Péter