From: Xiubo Li <Li.Xiubo@freescale.com>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: kuninori.morimoto.gx@renesas.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Xiubo Li <Li.Xiubo@freescale.com>
Subject: [PATCHv2 3/6] ASoC: simple-card: simple audio card widgets getting
Date: Mon, 13 Jan 2014 13:53:55 +0800 [thread overview]
Message-ID: <1389592438-13761-4-git-send-email-Li.Xiubo@freescale.com> (raw)
In-Reply-To: <1389592438-13761-1-git-send-email-Li.Xiubo@freescale.com>
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
sound/soc/generic/simple-card.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index b7dc63e..dbd93cc 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -125,6 +125,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
struct device_node **of_codec,
struct device_node **of_platform)
{
+ struct snd_soc_widgets *wdg;
struct device_node *np;
char *name;
int ret;
@@ -133,6 +134,14 @@ static int asoc_simple_card_parse_of(struct device_node *node,
info->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
+ wdg = snd_soc_get_widgets(node);
+ if (!IS_ERR_OR_NULL(wdg)) {
+ info->snd_card.dapm_widgets = wdg->widgets;
+ info->snd_card.num_dapm_widgets = wdg->cnt;
+ } else if (IS_ERR(wdg)) {
+ return PTR_ERR(wdg);
+ }
+
/* DAPM routes */
if (of_property_read_bool(node, "simple-audio-card,routing")) {
ret = snd_soc_of_parse_audio_routing(&info->snd_card,
--
1.8.4
next prev parent reply other threads:[~2014-01-13 5:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 5:53 [PATCHv2 0/6] One simple card use case Xiubo Li
2014-01-13 5:53 ` [PATCHv2 1/6] ASoC: core: add off-CODEC widgets list register/unregister Xiubo Li
2014-01-13 5:53 ` Xiubo Li [this message]
[not found] ` <1389592438-13761-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-01-13 5:53 ` [PATCHv2 2/6] ASoC: core: add snd_soc_get_widgets Xiubo Li
2014-01-13 5:53 ` [PATCHv2 4/6] ASoC: simple-card: add sound-widgets usage Xiubo Li
2014-01-13 5:53 ` [PATCHv2 5/6] ASoC: fsl: Add VF610 simple audio card widgets driver Xiubo Li
2014-01-13 17:16 ` Mark Brown
[not found] ` <20140113171614.GD29039-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-14 9:55 ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
2014-01-13 5:53 ` [PATCHv2 6/6] ARM: dts: Enable SGTL5000 codec based audio driver node for VF610 TOWER Xiubo Li
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=1389592438-13761-4-git-send-email-Li.Xiubo@freescale.com \
--to=li.xiubo@freescale.com \
--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 \
/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).