• Herve Codina's avatar
    ASoC: fsl: fsl_qmc_audio: Add support for non-interleaved mode. · 188d9cae
    Herve Codina authored
    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: default avatarHerve Codina <herve.codina@bootlin.com>
    Link: https://patch.msgid.link/20240701113038.55144-11-herve.codina@bootlin.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    188d9cae
fsl_qmc_audio.c 26 KB