[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240515135411.343333-7-elinor.montmasson@savoirfairelinux.com>
Date: Wed, 15 May 2024 15:54:08 +0200
From: Elinor Montmasson <elinor.montmasson@...oirfairelinux.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Shengjiu Wang <shengjiu.wang@...il.com>,
Xiubo Li <Xiubo.Lee@...il.com>,
Fabio Estevam <festevam@...il.com>,
Nicolin Chen <nicoleotsuka@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>
Cc: linux-sound@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org,
linuxppc-dev@...ts.ozlabs.org,
Elinor Montmasson <elinor.montmasson@...oirfairelinux.com>
Subject: [PATCHv4 6/9] ASoC: fsl-asoc-card: add use of devicetree TDM slot properties
Add use of optional TDM slot properties "dai-tdm-slot-num" and
"dai-tdm-slot-width" through snd_soc_of_parse_tdm_slot().
They allow setting a custom TDM slot width in bits and number of slots
for the CPU DAI when using the generic codec.
Signed-off-by: Elinor Montmasson <elinor.montmasson@...oirfairelinux.com>
---
sound/soc/fsl/fsl-asoc-card.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 82ed7f4e81a1..9aca8ad15372 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -751,6 +751,9 @@ 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;
+ snd_soc_of_parse_tdm_slot(np, NULL, NULL,
+ &priv->cpu_priv.slot_num,
+ &priv->cpu_priv.slot_width);
} else {
dev_err(&pdev->dev, "unknown Device Tree compatible\n");
ret = -EINVAL;
--
2.34.1
Powered by blists - more mailing lists