[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <638679dfd176409680c962cdeb3704ef@BY2PR03MB505.namprd03.prod.outlook.com>
Date: Fri, 24 Jan 2014 02:46:33 +0000
From: "Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
To: Mark Brown <broonie@...nel.org>
CC: "lgirdwood@...il.com" <lgirdwood@...il.com>,
"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
"kuninori.morimoto.gx@...esas.com" <kuninori.morimoto.gx@...esas.com>,
"moinejf@...e.fr" <moinejf@...e.fr>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH Resend 7/8] ASoC: add
snd_soc_of_parse_audio_simple_widgets for DeviceTree
> > +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
Powered by blists - more mailing lists