mbox series

[v2,00/10] Add support for non-interleaved mode in qmc_audio

Message ID 20240701113038.55144-1-herve.codina@bootlin.com (mailing list archive)
Headers show
Series Add support for non-interleaved mode in qmc_audio | expand

Message

Herve Codina July 1, 2024, 11:30 a.m. UTC
The qmc_audio driver supports only audio in interleaved mode.
Non-interleaved mode can be easily supported using several QMC channel
per DAI. 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 interleaved and
non-interleaved modes are slightly different.

In 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.

In 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.

This series add support for the non-interleaved mode in the qmc_audio
driver and is composed of the following parts:
  - Patches 1 and 2: Fix some issues in the qmc_audio
  - Patches 3 to 6: Prepare qmc_audio for the non-interleaved mode
  - Patches 7 and 8: Extend the QMC driver API
  - Patches 9 and 10: The support for non-interleaved mode itself

Compared to the previous iteration, this v2 series mainly improves
qmc_audio_access_is_interleaved().

Best regards,
Hervé

Link to v1: https://lore.kernel.org/lkml/20240620084300.397853-1-herve.codina@bootlin.com/
Changes v1 -> v2
  - Patches 1 to 8
    No changes

  - Patch 9
    Add 'Reviewed-by: Rob Herring (Arm) <robh@kernel.org>'

  - Patch 10
    Remove unneeded ';'
    Modify qmc_audio_access_is_interleaved()

Herve Codina (10):
  ASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value
  ASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch
  ASoC: fsl: fsl_qmc_audio: Split channel buffer and PCM pointer
    handling
  ASoC: fsl: fsl_qmc_audio: Identify the QMC channel involved in
    completion routines
  ASoC: fsl: fsl_qmc_audio: Introduce
    qmc_audio_pcm_{read,write}_submit()
  ASoC: fsl: fsl_qmc_audio: Introduce qmc_dai_constraints_interleaved()
  soc: fsl: cpm1: qmc: Introduce functions to get a channel from a
    phandle list
  soc: fsl: cpm1: qmc: Introduce qmc_chan_count_phandles()
  dt-bindings: sound: fsl,qmc-audio: Add support for multiple QMC
    channels per DAI
  ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode.

 .../bindings/sound/fsl,qmc-audio.yaml         |  41 +-
 drivers/soc/fsl/qe/qmc.c                      |  32 +-
 include/soc/fsl/qe/qmc.h                      |  27 +-
 sound/soc/fsl/fsl_qmc_audio.c                 | 591 +++++++++++++-----
 4 files changed, 506 insertions(+), 185 deletions(-)

Comments

Mark Brown July 4, 2024, 6:35 p.m. UTC | #1
On Mon, 01 Jul 2024 13:30:27 +0200, Herve Codina wrote:
> The qmc_audio driver supports only audio in interleaved mode.
> Non-interleaved mode can be easily supported using several QMC channel
> per DAI. 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 interleaved and
> non-interleaved modes are slightly different.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/10] ASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value
        commit: e62599902327d27687693f6e5253a5d56583db58
[02/10] ASoC: fsl: fsl_qmc_audio: Fix issues detected by checkpatch
        commit: 86dd725b57a88869acfe15b0405937450d0aef30
[03/10] ASoC: fsl: fsl_qmc_audio: Split channel buffer and PCM pointer handling
        commit: 42212b2ce8b1182d536452eee2880d2de7cce059
[04/10] ASoC: fsl: fsl_qmc_audio: Identify the QMC channel involved in completion routines
        commit: 5e51a1f9dfd90de6e44cfb5340d48263f9e8f8d8
[05/10] ASoC: fsl: fsl_qmc_audio: Introduce qmc_audio_pcm_{read,write}_submit()
        commit: 33a6969fbc653f25d5204b17fb67d5a21e6295e6
[06/10] ASoC: fsl: fsl_qmc_audio: Introduce qmc_dai_constraints_interleaved()
        commit: b81cfa66435bdab896b4c24e11d24ec33bdb0601
[07/10] soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list
        commit: 37797c605da33445adc112561695f70bfaa11133
[08/10] soc: fsl: cpm1: qmc: Introduce qmc_chan_count_phandles()
        commit: af8432b2e41abc0a20bdc01a3b144ea7b2f1ee09
[09/10] dt-bindings: sound: fsl,qmc-audio: Add support for multiple QMC channels per DAI
        commit: fb6013168fa94d5863ed6085b24eaeb89102ad74
[10/10] ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode.
        commit: 188d9cae54388171d28bd632a2561863db4b9f8b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark