diff mbox series

[PATCHv2,05/10] ASoC: fsl-asoc-card: set generic codec as clock provider

Message ID 20231027144734.3654829-6-elinor.montmasson@savoirfairelinux.com
State Superseded
Headers show
Series ASoC: fsl-asoc-card: compatibility integration of a generic codec use case for use with S/PDIF controller | expand

Commit Message

Elinor Montmasson Oct. 27, 2023, 2:47 p.m. UTC
The default dai format defined by DAI_FMT_BASE doesn't set if the codec
is consumer or provider of the bit and frame clocks.

S/PDIF DIR usually converts audio signal to an asynchronous I2S/PCM
stream, and doesn't consume a bit or frame clock.

As S/PDIF DIR and DIT are used as codecs for the generic use case,
set codecs as provider of both bit and frame clocks by default.

Signed-off-by: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
Co-authored-by: Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
---
 sound/soc/fsl/fsl-asoc-card.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 64f6bcf04720..61c0fd97cde3 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -723,6 +723,7 @@  static int fsl_asoc_card_probe(struct platform_device *pdev)
 		generic_codec_dai_names[1] = "dir-hifi";
 		priv->dai_link[0].num_codecs = 2;
 		priv->dai_link[2].num_codecs = 2;
+		priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
 	} else {
 		dev_err(&pdev->dev, "unknown Device Tree compatible\n");
 		ret = -EINVAL;