[PATCHv4 5/9] ASoC: fsl-asoc-card: set generic codec as clock provider

Elinor Montmasson elinor.montmasson at savoirfairelinux.com
Wed May 15 23:54:07 AEST 2024


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 at savoirfairelinux.com>
Co-authored-by: Philip-Dylan Gleonec <philip-dylan.gleonec at savoirfairelinux.com>
---
 sound/soc/fsl/fsl-asoc-card.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index a4ecc9093558..82ed7f4e81a1 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -750,6 +750,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;
-- 
2.34.1



More information about the Linuxppc-dev mailing list