From: "Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: "lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
"kuninori.morimoto.gx@renesas.com"
<kuninori.morimoto.gx@renesas.com>,
"moinejf@free.fr" <moinejf@free.fr>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH Resend 7/8] ASoC: add snd_soc_of_parse_audio_simple_widgets for DeviceTree
Date: Fri, 24 Jan 2014 02:46:33 +0000 [thread overview]
Message-ID: <638679dfd176409680c962cdeb3704ef@BY2PR03MB505.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20140123193945.GH11727@sirena.org.uk>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1767 bytes --]
> > +static struct snd_soc_dapm_widget simple_widgets[] = {
> > + SND_SOC_DAPM_MIC("Mic", NULL),
> > + SND_SOC_DAPM_LINE("Line", NULL),
> > + SND_SOC_DAPM_HP("Hp", NULL),
> > + SND_SOC_DAPM_SPK("Spk", NULL),
> > +};
>
This is the templates for "Microphone XXX", "Line XXX", "Headphone XXX"
and "Spk XXX" .
> Does this mean we're restricted to a particular set of names? That
> seems sad and won't work if there's a desire for more than one of a
> given widget - the main use case I can see is multiple microphones with
> separate microphone biases. How about having some templates that we
> copy and then replace the name with the one the user supplied?
>
This code has already supplied this I think.
Using this API, the only limitation is that, for example if the user has
multiple Microphones, it should set the name in DT file like:
"Mic XXX", "Mic YYY", "Mic ZZZ"...
And these widgets will use the template of : SND_SOC_DAPM_MIC("Mic", NULL),
And the widgets' names will be replaced with "Mic XXX", "Mic YYY",
"Mic ZZZ"... from the user's DT node.
Or your suggestion is £º
The templates is:
+static struct snd_soc_dapm_widget simple_widgets[] = {
+ SND_SOC_DAPM_MIC("Mic", NULL),
+ SND_SOC_DAPM_LINE("Line", NULL),
+ SND_SOC_DAPM_HP("Hp", NULL),
+ SND_SOC_DAPM_SPK("Spk", NULL),
+};
And in the DT node:
simple-off-codec-widgets =
/* template-name user-supplied-name */
"Mic", "Microphone XXX",
"Mic", "UUU Microphone YYY",
"Hp", "TTT Headphone XXX",
"Hp", "Headphone YYY";
And then just replace the template's name with the user supplied name?
Thanks,
Best Regards,
Xiubo
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2014-01-24 2:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 5:02 [PATCH 0/8] New and Resend the old patches Xiubo Li
2014-01-23 5:02 ` [PATCH 1/8] ASoC: fsl: Add VF610 soc audio card Kconfig Xiubo Li
2014-01-23 18:38 ` Mark Brown
2014-01-26 5:15 ` Li.Xiubo
2014-01-26 12:43 ` Mark Brown
2014-02-10 4:12 ` Li.Xiubo
2014-02-10 12:31 ` Mark Brown
2014-01-23 5:02 ` [PATCH Resend 2/8] ASoC: simple-card: fix __asoc_simple_card_dai_init Xiubo Li
2014-01-23 7:11 ` Jean-Francois Moine
2014-01-23 7:22 ` Li.Xiubo
2014-01-23 5:02 ` [PATCH Resend 3/8] ASoC: simple-card: simplify the daifmt code Xiubo Li
2014-01-23 19:20 ` Mark Brown
2014-01-24 7:26 ` Li.Xiubo
2014-01-23 5:02 ` [PATCH Resend 4/8] ASoC: simple-card: Add snd_card's name parsing from DT node support Xiubo Li
2014-01-23 19:24 ` Mark Brown
2014-01-23 5:02 ` [PATCH 5/8] ASoC: core: set_tdm_slot() will return -ENOTSUPP if no operation provided Xiubo Li
2014-01-23 19:29 ` Mark Brown
2014-01-23 5:02 ` [PATCH 6/8] ASoC: simple-card: add tdm slot supports Xiubo Li
2014-01-23 6:11 ` David Rientjes
2014-01-23 6:35 ` Li.Xiubo
2014-01-23 19:48 ` Mark Brown
2014-01-23 5:02 ` [PATCH Resend 7/8] ASoC: add snd_soc_of_parse_audio_simple_widgets for DeviceTree Xiubo Li
2014-01-23 19:39 ` Mark Brown
2014-01-24 2:46 ` Li.Xiubo [this message]
2014-01-24 13:05 ` Mark Brown
2014-01-23 5:02 ` [PATCH 8/8] ASoC: simple-card: add off-codec widgets supports Xiubo Li
2014-01-23 19:40 ` 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=638679dfd176409680c962cdeb3704ef@BY2PR03MB505.namprd03.prod.outlook.com \
--to=li.xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=moinejf@free.fr \
--cc=shawn.guo@linaro.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
all inboxes | Powered by JetHome®