From: Paul Cercueil <paul@crapouillou.net>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, od@zcrc.me,
Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH 3/3] ASoC: simple-card: Read pin switches conf from devicetree
Date: Sat, 20 Apr 2019 12:45:53 +0200 [thread overview]
Message-ID: <20190420104553.5071-3-paul@crapouillou.net> (raw)
In-Reply-To: <20190420104553.5071-1-paul@crapouillou.net>
When the routing path between a widget (e.g. "Speaker") and the codec
goes through an external amplifier, having a pin switch for this widget
allows the amplifier to be disabled when the widget is not to be used
(e.g. when using headphones).
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
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 34de32efc4c4..d34adb1518e7 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -556,6 +556,10 @@ static int simple_parse_of(struct simple_priv *priv)
if (ret < 0)
return ret;
+ ret = asoc_simple_card_of_parse_pin_switches(card, PREFIX);
+ if (ret < 0)
+ return ret;
+
/* Single/Muti DAI link(s) & New style of DT node */
memset(&li, 0, sizeof(li));
for (li.cpu = 1; li.cpu >= 0; li.cpu--) {
--
2.21.0.593.g511ec345e18
next prev parent reply other threads:[~2019-04-20 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 10:45 [PATCH 1/3] ASoC: doc: simple-card: Add pin-switches property Paul Cercueil
2019-04-20 10:45 ` [PATCH 2/3] ASoC: simple-card-utils: add asoc_simple_card_of_parse_pin_switches() Paul Cercueil
2019-04-25 18:49 ` Mark Brown
2019-04-20 10:45 ` Paul Cercueil [this message]
2019-04-25 19:24 ` Applied "ASoC: doc: simple-card: Add pin-switches property" to the asoc tree Mark Brown
2019-04-25 19:26 ` Mark Brown
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=20190420104553.5071-3-paul@crapouillou.net \
--to=paul@crapouillou.net \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=od@zcrc.me \
--cc=robh+dt@kernel.org \
/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).