diff mbox series

[PATCHv2,06/10] ASoC: fsl-asoc-card: add dts property "cpu-slot-width"

Message ID 20231027144734.3654829-7-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
Add new optional dts property "cpu-slot-width", which allows to set a
custom TDM slot width in bits for the CPU DAI
when using the generic codec.

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 61c0fd97cde3..42aa6ec306ec 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -724,6 +724,7 @@  static int fsl_asoc_card_probe(struct platform_device *pdev)
 		priv->dai_link[0].num_codecs = 2;
 		priv->dai_link[2].num_codecs = 2;
 		priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
+		of_property_read_u32(np, "cpu-slot-width", &priv->cpu_priv.slot_width);
 	} else {
 		dev_err(&pdev->dev, "unknown Device Tree compatible\n");
 		ret = -EINVAL;