]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode.
authorHerve Codina <herve.codina@bootlin.com>
Mon, 1 Jul 2024 11:30:37 +0000 (13:30 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jul 2024 11:25:00 +0000 (12:25 +0100)
commit188d9cae54388171d28bd632a2561863db4b9f8b
tree715105b7b327e21b377725f853ed2ca8b2ec7e43
parentfb6013168fa94d5863ed6085b24eaeb89102ad74
ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode.

The current fsl_qmc_audio works in interleaved mode. The audio samples
are interleaved and all data are sent to (received from) one QMC
channel.

Using several QMC channels, non interleaved mode can be easily
supported. In that case, data related to ch0 are sent to (received from)
the first QMC channel, data related to ch1 use the next QMC channel and
so on up to the last channel.

In terms of constraints and settings, the two modes are slightly
different:
- Interleaved mode:
    - The sample size should fit in the number of time-slots available
      for the QMC channel.
    - The number of audio channels should fit in the number of
      time-slots (taking into account the sample size) available for the
      QMC channel.
- Non-interleaved mode:
    - The number of audio channels is the number of available QMC
      channels.
    - Each QMC channel should have the same number of time-slots.
    - The sample size equals the number of time-slots of one QMC
      channel.

Add support for the non-interleaved mode allowing multiple QMC channel
per DAI. The DAI switches in non-interleaved mode when more that one QMC
channel is available.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20240701113038.55144-11-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_qmc_audio.c