1. 18 Jul, 2024 3 commits
  2. 17 Jul, 2024 3 commits
  3. 15 Jul, 2024 4 commits
  4. 14 Jul, 2024 1 commit
  5. 12 Jul, 2024 5 commits
  6. 11 Jul, 2024 2 commits
  7. 10 Jul, 2024 11 commits
  8. 09 Jul, 2024 6 commits
  9. 08 Jul, 2024 5 commits
    • Mark Brown's avatar
      ASoC: fsl-asoc-card: add S/PDIF controller support · 54e49a3c
      Mark Brown authored
      Merge series from Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>:
      
      This is a series of patches aiming to make the machine driver
      `fsl-asoc-card` compatible with S/PDIF controllers on imx boards.  The
      main goal is to allow the use of S/PDIF controllers with ASRC modules.
      
      The `imx-spdif` machine driver already has specific support for S/PDIF
      controllers but doesn't support using an ASRC with it. However, the
      `fsl-asoc-card` machine driver has the necessary code to create a sound
      card which can use an ASRC module.
      It is then possible to extend the support for S/PDIF audio cards by
      merging the `imx-spdif` driver into `fsl-asoc-card`.
      
      The first three patches adapt the `fsl-asoc-card` driver to support
      multiple codec use cases.
      The driver can get 2 codec phandles from the device tree, and
      codec-related variables are doubled.
      `for_each_codecs` macros are also used when possible to ease adding
      other multi-codec use cases in the future.
      It makes possible to use the two S/PDIF dummy codec drivers
      `spdif_receiver` and `spdif_transmitter` instead of `snd-soc-dummy`,
      which was used in `imx-spdif`.
      
      The fourth patch merges the S/PDIF support from `imx-spdif` to
      `fsl-asoc-card`.
      `fsl-asoc-card` offers the same functionalities as `imx-spdif` did, but
      this merge also extends the S/PDIF support with the possibility of using
      an ASRC.
      Compatible "fsl,imx-audio-spdif" is kept, but `fsl-asoc-card` uses
      different DT properties compared to `imx-spdif`:
      * The "spdif-controller" property from `imx-spdif` is named "audio-cpu"
        in `fsl-asoc-card`.
      * `fsl-asoc-card` uses codecs explicitly declared in DT with
        "audio-codec". With an S/PDIF, codec drivers `spdif_transmitter` and
        `spdif_receiver` should be used. Driver `imx-spdif` used instead the
        dummy codec and a pair of boolean properties, "spdif-in" and
        "spdif-out".
      Backward compatibility is therefore implemented in `fsl-asoc-card`.
      However, it is recommended to use the new properties when needed.
      Especially, declaring and using S/PDIF transmitter and/or receiver nodes
      is better than using the dummy codec.
      
      The last three patches update the device tree bindings of
      `fsl-asoc-card` and update all in-tree device trees to use the
      `fsl-asoc-card` properties.
      Note that as the old properties are still supported:
      * previous versions of in-tree device trees are still supported.
      * out-of-tree device trees are still supported.
      
      This series of patches was successfully built for arm64 and x86 on top
      of the latest "for-next" branch of the ASoC git tree on the 26th of June
      2024.
      These modifications have also been tested on an i.MX8MN evaluation board
      with a linux kernel RT v6.1.26-rt8.
      54e49a3c
    • Mark Brown's avatar
      ASoC: Simplify code with cleanup.h · 0c6c6511
      Mark Brown authored
      Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:
      
      Allocate the memory with scoped/cleanup.h to reduce error handling
      (simpler error paths) and make the code a bit smaller.
      0c6c6511
    • Elinor Montmasson's avatar
      ASoC: dt-bindings: update fsl-asoc-card bindings after imx-spdif merge · 4359caad
      Elinor Montmasson authored
      The S/PDIF audio card support with compatible "fsl,imx-audio-spdif"
      was merged from imx-spdif into the fsl-asoc-card driver.
      It makes possible to use an S/PDIF with an ASRC.
      
      This merge introduces new DT bindings to use with compatible
      "fsl,imx-audio-spdif" to follow the way fsl-asoc-card works:
      * the "spdif-controller" property from imx-spdif is named "audio-cpu"
        in fsl-asoc-card.
      * fsl-asoc-card uses codecs explicitly declared in DT
        with "audio-codec".
        With an SPDIF, codec drivers spdif_transmitter and
        spdif_receiver should be used.
        Driver imx-spdif used instead the dummy codec and a pair of
        boolean properties, "spdif-in" and "spdif-out".
      
      In an upcoming commit, in-tree DTs will be modified to follow these new
      properties:
      * Property "spdif-controller" will be renamed "audio-cpu".
      * spdif_transmitter and spdif_receiver nodes will be declared
        and linked to the fsl-asoc-card node with the property "audio-codec".
      
      To keep backward compatibility with other DTs, support for
      "spdif-controller", "spdif-in" and "spdif-out" properties is kept.
      However, it is recommended to use the new properties if possible.
      It is better to declare transmitter and/or receiver
      in DT than using the dummy codec.
      
      DTs using compatible "fsl,imx-audio-spdif" are still supported, and
      fsl-asoc-card will behave the same as imx-spdif for these DTs.
      Signed-off-by: default avatarElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
      Reviewed-by: default avatarRob Herring (Arm) <robh@kernel.org>
      Link: https://patch.msgid.link/20240627083104.123357-6-elinor.montmasson@savoirfairelinux.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      4359caad
    • Elinor Montmasson's avatar
      ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c · 6d174cc4
      Elinor Montmasson authored
      The imx-spdif machine driver creates audio card to directly use an
      S/PDIF device. However, it doesn't support interacting with an ASRC.
      fsl-asoc-card already has the support to create audio card which can
      use the ASRC.
      
      Merge the S/PDIF support from imx-spdif into driver fsl-asoc-card
      to extend the support of S/PDIF audio card with the use of ASRC devices.
      
      fsl-asoc-card uses slightly different DT properties than imx-spdif:
      * the "spdif-controller" property from imx-spdif is named "audio-cpu" in
        fsl-asoc-card.
      * fsl-asoc-card uses codecs explicitly declared in DT
        with "audio-codec".
        With an SPDIF, codec drivers spdif_transmitter and
        spdif_receiver should be used.
        Driver imx-spdif used instead the dummy codec and a pair of
        boolean properties, "spdif-in" and "spdif-out".
      
      To keep backward compatibility, support for "spdif-controller",
      "spdif-in" and "spdif-out" is also added to fsl-asoc-card.
      However, it is recommended to use the new properties if possible.
      It is better to declare transmitter and/or receiver in DT
      than using the dummy codec.
      
      DTs using compatible "fsl,imx-audio-spdif" are still compatible, and
      fsl-asoc-card will behave the same as imx-spdif
      for these DTs.
      Signed-off-by: default avatarElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
      Link: https://patch.msgid.link/20240627083104.123357-5-elinor.montmasson@savoirfairelinux.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      6d174cc4
    • Elinor Montmasson's avatar
      ASoC: fsl-asoc-card: add compatibility to use 2 codecs in dai-links · fcc6ace8
      Elinor Montmasson authored
      Adapt the driver to work with configurations using two codecs or more.
      Modify fsl_asoc_card_probe() to handle use cases where 2 codecs are
      given in the device tree.
      This will be needed to add support for the SPDIF.
      
      Use cases using one codec will ignore any given codecs other than the
      first.
      Co-developed-by: default avatarPhilip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
      Signed-off-by: default avatarPhilip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
      Signed-off-by: default avatarElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
      Link: https://patch.msgid.link/20240627083104.123357-4-elinor.montmasson@savoirfairelinux.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      fcc6ace8