]> www.infradead.org Git - users/dwmw2/linux.git/commit
ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c
authorElinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Thu, 27 Jun 2024 08:31:01 +0000 (10:31 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 8 Jul 2024 15:09:38 +0000 (16:09 +0100)
commit6d174cc4f22461ad3fe383570527e86bf1948a2e
tree2d09217c51ac1789f3469ef237e99acc3cd09dee
parentfcc6ace84f1f6ce2211af25c3c8fb30a0fb2bb2c
ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c

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: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Link: https://patch.msgid.link/20240627083104.123357-5-elinor.montmasson@savoirfairelinux.com
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm/configs/imx_v6_v7_defconfig
arch/arm64/configs/defconfig
sound/soc/fsl/Kconfig
sound/soc/fsl/Makefile
sound/soc/fsl/fsl-asoc-card.c
sound/soc/fsl/imx-spdif.c [deleted file]