From: "Alvin Šipraga" <alvin@pqrs.dk>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: "Alvin Šipraga" <alsi@bang-olufsen.dk>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] ASoC: simple-card: parse symmetric-clock-roles property
Date: Fri, 2 Jun 2023 11:03:21 +0200 [thread overview]
Message-ID: <20230602090322.1876359-5-alvin@pqrs.dk> (raw)
In-Reply-To: <20230602090322.1876359-1-alvin@pqrs.dk>
From: Alvin Šipraga <alsi@bang-olufsen.dk>
The property, when set, specifies that both ends of the dai-link should
have the same clock consumer/provider roles. As with other simple-card
properties, a prefix can be specified.
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
sound/soc/generic/simple-card.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 5a5e4ecd0f61..4513e30948b7 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -181,6 +181,7 @@ static int simple_link_init(struct asoc_simple_priv *priv,
{
struct device *dev = simple_priv_to_dev(priv);
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
+ char prop[128];
int ret;
ret = asoc_simple_parse_daifmt(dev, node, codec,
@@ -188,6 +189,9 @@ static int simple_link_init(struct asoc_simple_priv *priv,
if (ret < 0)
return 0;
+ snprintf(prop, sizeof(prop), "%ssymmetric-clock-roles", prefix);
+ dai_link->symmetric_clock_roles = of_property_read_bool(node, prop);
+
dai_link->init = asoc_simple_dai_init;
dai_link->ops = &simple_ops;
--
2.40.0
next prev parent reply other threads:[~2023-06-02 9:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 9:03 [PATCH 0/4] ASoC: support dai-links with symmetric clock roles Alvin Šipraga
2023-06-02 9:03 ` [PATCH 1/4] ASoC: dt-bindings: document new symmetric-clock-role flag Alvin Šipraga
2023-06-02 10:13 ` Rob Herring
2023-06-02 11:43 ` Mark Brown
2023-06-02 12:12 ` Alvin Šipraga
2023-06-02 12:19 ` Mark Brown
2023-06-02 12:42 ` Alvin Šipraga
2023-06-06 14:39 ` Mark Brown
2023-06-05 11:42 ` Alvin Šipraga
2023-06-02 9:03 ` [PATCH 2/4] ASoC: core: add support for dai-links with symmetric clock roles Alvin Šipraga
2023-06-02 9:03 ` [PATCH 3/4] ASoC: audio-graph-card2: parse symmetric-clock-roles property Alvin Šipraga
2023-06-05 0:35 ` Kuninori Morimoto
2023-06-05 10:58 ` Alvin Šipraga
2023-06-02 9:03 ` Alvin Šipraga [this message]
2023-06-05 0:28 ` [PATCH 4/4] ASoC: simple-card: " Kuninori Morimoto
2023-06-05 11:12 ` Alvin Šipraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230602090322.1876359-5-alvin@pqrs.dk \
--to=alvin@pqrs.dk \
--cc=alsa-devel@alsa-project.org \
--cc=alsi@bang-olufsen.dk \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).