diff mbox series

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

Message ID 20230901144550.520072-7-elinor.montmasson@savoirfairelinux.com (mailing list archive)
State New, archived
Headers show
Series [01/10] ASoC: fsl-asoc-card: add new compatible for dummy codec | expand

Commit Message

Elinor Montmasson Sept. 1, 2023, 2:45 p.m. UTC
From: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>

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 dummy 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 d8f4412be308..12d01970850d 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -721,6 +721,7 @@  static int fsl_asoc_card_probe(struct platform_device *pdev)
 		priv->dai_fmt |= SND_SOC_DAIFMT_CBC_CFC;
 		priv->card.dapm_routes = NULL;
 		priv->card.num_dapm_routes = 0;
+		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;