From: Xiubo Li <Li.Xiubo@freescale.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>, <perex@perex.cz>,
<tiwai@suse.de>, <kuninori.morimoto.gx@renesas.com>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-doc@vger.kernel.org>,
Xiubo Li <Li.Xiubo@freescale.com>
Subject: [PATCH 2/4] ASoC: simple-card: simple audio card widgets getting
Date: Wed, 8 Jan 2014 15:02:34 +0800 [thread overview]
Message-ID: <1389164556-2728-2-git-send-email-Li.Xiubo@freescale.com> (raw)
In-Reply-To: <1389164556-2728-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 e473dc9..e7cd9bb 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 asoc_simple_card_widgets *comp;
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);
+ comp = asoc_simple_card_get_widgets(node);
+ if (!IS_ERR_OR_NULL(comp)) {
+ info->snd_card.dapm_widgets = comp->widgets;
+ info->snd_card.num_dapm_widgets = comp->widgets_cnt;
+ } else if (IS_ERR(comp)) {
+ return PTR_ERR(comp);
+ }
+
/* 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-08 7:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 7:02 [PATCH 1/4] ASoC: simple-card: add simple audio card widgets support Xiubo Li
2014-01-08 7:02 ` Xiubo Li [this message]
2014-01-08 7:02 ` [PATCH 3/4] ASoC: fsl: Add VF610 simple audio card widgets driver Xiubo Li
2014-01-08 18:06 ` Mark Brown
2014-01-09 7:43 ` Li.Xiubo
2014-01-08 7:02 ` [PATCH 4/4] ARM: dts: Enable SGTL5000 codec based audio driver node for VF610 TOWER Xiubo Li
2014-01-08 17:59 ` [PATCH 1/4] ASoC: simple-card: add simple audio card widgets support Mark Brown
2014-01-09 7:43 ` Li.Xiubo
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=1389164556-2728-2-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-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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
all inboxes | Powered by JetHome®