All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget
@ 2011-11-27 12:21 Mark Brown
  2011-11-28 16:58 ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-11-27 12:21 UTC (permalink / raw)
  To: Stephen Warren, Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Also rename it to MICBIAS to reflect the pin name and help any out of tree
users notice the change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8903.c      |    4 ++--
 sound/soc/tegra/tegra_wm8903.c |   18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 0cf78c1..12dae43 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -843,7 +843,7 @@ SND_SOC_DAPM_OUTPUT("LON"),
 SND_SOC_DAPM_OUTPUT("ROP"),
 SND_SOC_DAPM_OUTPUT("RON"),
 
-SND_SOC_DAPM_MICBIAS("Mic Bias", WM8903_MIC_BIAS_CONTROL_0, 0, 0),
+SND_SOC_DAPM_SUPPLY("MICBIAS", WM8903_MIC_BIAS_CONTROL_0, 0, 0, NULL, 0),
 
 SND_SOC_DAPM_MUX("Left Input Mux", SND_SOC_NOPM, 0, 0, &linput_mux),
 SND_SOC_DAPM_MUX("Left Input Inverting Mux", SND_SOC_NOPM, 0, 0,
@@ -952,7 +952,7 @@ SND_SOC_DAPM_SUPPLY("CLK_SYS", WM8903_CLOCK_RATES_2, 2, 0, NULL, 0),
 static const struct snd_soc_dapm_route wm8903_intercon[] = {
 
 	{ "CLK_DSP", NULL, "CLK_SYS" },
-	{ "Mic Bias", NULL, "CLK_SYS" },
+	{ "MICBIAS", NULL, "CLK_SYS" },
 	{ "HPL_DCS", NULL, "CLK_SYS" },
 	{ "HPR_DCS", NULL, "CLK_SYS" },
 	{ "LINEOUTL_DCS", NULL, "CLK_SYS" },
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index b260f54..2f5b107 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -201,8 +201,8 @@ static const struct snd_soc_dapm_route harmony_audio_map[] = {
 	{"Int Spk", NULL, "RON"},
 	{"Int Spk", NULL, "LOP"},
 	{"Int Spk", NULL, "LON"},
-	{"Mic Bias", NULL, "Mic Jack"},
-	{"IN1L", NULL, "Mic Bias"},
+	{"Mic Jack", NULL, "MICBIAS"},
+	{"IN1L", NULL, "Mic Jack"},
 };
 
 static const struct snd_soc_dapm_route seaboard_audio_map[] = {
@@ -212,8 +212,8 @@ static const struct snd_soc_dapm_route seaboard_audio_map[] = {
 	{"Int Spk", NULL, "RON"},
 	{"Int Spk", NULL, "LOP"},
 	{"Int Spk", NULL, "LON"},
-	{"Mic Bias", NULL, "Mic Jack"},
-	{"IN1R", NULL, "Mic Bias"},
+	{"Mic Jack", NULL, "MICBIAS"},
+	{"IN1R", NULL, "Mic Jack"},
 };
 
 static const struct snd_soc_dapm_route kaen_audio_map[] = {
@@ -223,8 +223,8 @@ static const struct snd_soc_dapm_route kaen_audio_map[] = {
 	{"Int Spk", NULL, "RON"},
 	{"Int Spk", NULL, "LOP"},
 	{"Int Spk", NULL, "LON"},
-	{"Mic Bias", NULL, "Mic Jack"},
-	{"IN2R", NULL, "Mic Bias"},
+	{"Mic Jack", NULL, "MICBIAS"},
+	{"IN2R", NULL, "Mic Jack"},
 };
 
 static const struct snd_soc_dapm_route aebl_audio_map[] = {
@@ -232,8 +232,8 @@ static const struct snd_soc_dapm_route aebl_audio_map[] = {
 	{"Headphone Jack", NULL, "HPOUTL"},
 	{"Int Spk", NULL, "LINEOUTR"},
 	{"Int Spk", NULL, "LINEOUTL"},
-	{"Mic Bias", NULL, "Mic Jack"},
-	{"IN1R", NULL, "Mic Bias"},
+	{"Mic Jack", NULL, "MICBIAS"},
+	{"IN1R", NULL, "Mic Jack"},
 };
 
 static const struct snd_kcontrol_new tegra_wm8903_controls[] = {
@@ -329,7 +329,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
 	wm8903_mic_detect(codec, &tegra_wm8903_mic_jack, SND_JACK_MICROPHONE,
 				0);
 
-	snd_soc_dapm_force_enable_pin(dapm, "Mic Bias");
+	snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");
 
 	return 0;
 }
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget
  2011-11-27 12:21 [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget Mark Brown
@ 2011-11-28 16:58 ` Stephen Warren
  2011-11-28 17:00   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2011-11-28 16:58 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com

Mark Brown wrote at Sunday, November 27, 2011 5:22 AM:
> Also rename it to MICBIAS to reflect the pin name and help any out of tree
> users notice the change.
...
> diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
...
> -SND_SOC_DAPM_MICBIAS("Mic Bias", WM8903_MIC_BIAS_CONTROL_0, 0, 0),
> +SND_SOC_DAPM_SUPPLY("MICBIAS", WM8903_MIC_BIAS_CONTROL_0, 0, 0, NULL, 0),

Acked-by: Stephen Warren <swarren@nvidia.com>

For my education, why is this better modeled as a supply instead of a
mic bias? Thanks.

-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget
  2011-11-28 16:58 ` Stephen Warren
@ 2011-11-28 17:00   ` Mark Brown
  2011-11-28 18:10     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2011-11-28 17:00 UTC (permalink / raw)
  To: Stephen Warren
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	Liam Girdwood

On Mon, Nov 28, 2011 at 08:58:32AM -0800, Stephen Warren wrote:
> Mark Brown wrote at Sunday, November 27, 2011 5:22 AM:

> > -SND_SOC_DAPM_MICBIAS("Mic Bias", WM8903_MIC_BIAS_CONTROL_0, 0, 0),
> > +SND_SOC_DAPM_SUPPLY("MICBIAS", WM8903_MIC_BIAS_CONTROL_0, 0, 0, NULL, 0),

> For my education, why is this better modeled as a supply instead of a
> mic bias? Thanks.

The wiring in the DAPM map is *much* more comprehensible.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget
  2011-11-28 17:00   ` Mark Brown
@ 2011-11-28 18:10     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-11-28 18:10 UTC (permalink / raw)
  To: Stephen Warren
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	Liam Girdwood

On Mon, Nov 28, 2011 at 05:00:29PM +0000, Mark Brown wrote:
> On Mon, Nov 28, 2011 at 08:58:32AM -0800, Stephen Warren wrote:
> > Mark Brown wrote at Sunday, November 27, 2011 5:22 AM:

> > > -SND_SOC_DAPM_MICBIAS("Mic Bias", WM8903_MIC_BIAS_CONTROL_0, 0, 0),
> > > +SND_SOC_DAPM_SUPPLY("MICBIAS", WM8903_MIC_BIAS_CONTROL_0, 0, 0, NULL, 0),

> > For my education, why is this better modeled as a supply instead of a
> > mic bias? Thanks.

> The wiring in the DAPM map is *much* more comprehensible.

Oh, and the other thing is that it means that your device tree wiring
doesn't need to do any Linux-specific stuff to do with the funny way
the widgets needed to be wired up or jump through hoops otherwise and
can just talk about the pin being connected.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-28 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-27 12:21 [PATCH] ASoC: Convert WM8903 MICBIAS to a supply widget Mark Brown
2011-11-28 16:58 ` Stephen Warren
2011-11-28 17:00   ` Mark Brown
2011-11-28 18:10     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.