All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
@ 2012-03-28 19:53 Mark Brown
  2012-03-28 19:53 ` [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E() Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mark Brown @ 2012-03-28 19:53 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Zeng Zhaoming, Liam Girdwood
  Cc: alsa-devel, Mark Brown

No current users and it's the last user of MICBIAS_E().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/sgtl5000.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d192626..77beb6d 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -197,9 +197,9 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
 	SND_SOC_DAPM_OUTPUT("HP_OUT"),
 	SND_SOC_DAPM_OUTPUT("LINE_OUT"),
 
-	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
-				mic_bias_event,
-				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
+			    mic_bias_event,
+			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
 
 	SND_SOC_DAPM_PGA_E("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0,
 			small_pop_event,
-- 
1.7.9.1

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

* [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E()
  2012-03-28 19:53 [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Mark Brown
@ 2012-03-28 19:53 ` Mark Brown
  2012-03-28 23:02   ` WM8994 playback delay Sangbeom Kim
  2012-03-29  3:40 ` [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Dong Aisheng
  2012-03-29  5:24 ` Shawn Guo
  2 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2012-03-28 19:53 UTC (permalink / raw)
  To: Fabio Estevam, Shawn Guo, Zeng Zhaoming, Liam Girdwood
  Cc: alsa-devel, Mark Brown

There are no users any more and new drivers should be using supply widgets
which fully replace it anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/sound/soc-dapm.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index f98dc7d..01e7ad1 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -141,10 +141,6 @@ struct device;
 {       .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \
 	.invert = winvert, .kcontrol_news = wcontrols, \
 	.num_kcontrols = wncontrols, .event = wevent, .event_flags = wflags}
-#define SND_SOC_DAPM_MICBIAS_E(wname, wreg, wshift, winvert, wevent, wflags) \
-{	.id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, .shift = wshift, \
-	.invert = winvert, .kcontrol_news = NULL, .num_kcontrols = 0, \
-	.event = wevent, .event_flags = wflags}
 #define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \
 	wevent, wflags) \
 {	.id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
-- 
1.7.9.1

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

* WM8994 playback delay
  2012-03-28 19:53 ` [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E() Mark Brown
@ 2012-03-28 23:02   ` Sangbeom Kim
  2012-03-29 10:50     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Sangbeom Kim @ 2012-03-28 23:02 UTC (permalink / raw)
  To: 'Mark Brown'
  Cc: alsa-devel, sbkim01, sangsu4u.park, 'Liam Girdwood'

Hi, Mark,

Currently, We are developing SMDK with Exynos5250 and  WM8994 on 3.3-rc6.
We try to enable CONFIG_PM_RUNTIME and on/off control of power domain.
But It has playback delay in the first playback.(3~4sec and 6/10times)

In that time, Log maessage is 
'wm8994-codec wm8994-codec: Timed out waiting for DC Servo 300'
wait_for_dc_servo() function generate above message on sound/soc/codecs/wm_hubs.c

After removing wait_for_dc_servo for testing, playback delay is disappeared.
So, Could you please explain the  purporse of wait_for_dc_servo()?
If wait_for_dc_servo() is removed, What kind of problem can be happened?

Thanks,
Sangbeom.

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

* Re: [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
  2012-03-28 19:53 [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Mark Brown
  2012-03-28 19:53 ` [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E() Mark Brown
@ 2012-03-29  3:40 ` Dong Aisheng
  2012-03-29  5:24 ` Shawn Guo
  2 siblings, 0 replies; 8+ messages in thread
From: Dong Aisheng @ 2012-03-29  3:40 UTC (permalink / raw)
  To: Mark Brown
  Cc: Fabio Estevam, alsa-devel, Liam, Zeng Zhaoming, Shawn Guo, Girdwood

On Wed, Mar 28, 2012 at 08:53:45PM +0100, Mark Brown wrote:
> No current users and it's the last user of MICBIAS_E().
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/sgtl5000.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index d192626..77beb6d 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -197,9 +197,9 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
>  	SND_SOC_DAPM_OUTPUT("HP_OUT"),
>  	SND_SOC_DAPM_OUTPUT("LINE_OUT"),
>  
> -	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> -				mic_bias_event,
> -				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> +	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> +			    mic_bias_event,
> +			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
>  
>  	SND_SOC_DAPM_PGA_E("HP", SGTL5000_CHIP_ANA_POWER, 4, 0, NULL, 0,
>  			small_pop_event,
> -- 
> 1.7.9.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>

Regards
Dong Aisheng

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

* Re: [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
  2012-03-28 19:53 [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Mark Brown
  2012-03-28 19:53 ` [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E() Mark Brown
  2012-03-29  3:40 ` [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Dong Aisheng
@ 2012-03-29  5:24 ` Shawn Guo
  2012-03-29 10:56   ` Mark Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2012-03-29  5:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, Liam Girdwood, Zeng Zhaoming

On Wed, Mar 28, 2012 at 08:53:45PM +0100, Mark Brown wrote:
> No current users and it's the last user of MICBIAS_E().
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/sgtl5000.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
> index d192626..77beb6d 100644
> --- a/sound/soc/codecs/sgtl5000.c
> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -197,9 +197,9 @@ static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = {
>  	SND_SOC_DAPM_OUTPUT("HP_OUT"),
>  	SND_SOC_DAPM_OUTPUT("LINE_OUT"),
>  
> -	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> -				mic_bias_event,
> -				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> +	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> +			    mic_bias_event,
> +			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
>  
It breaks my capture testing.

I'm not sure these two macros are equivalent, since they have different
.id assignment.  To quickly confirm the problem, I have the capture
back to work with the following change.

 #define SND_SOC_DAPM_SUPPLY(wname, wreg, wshift, winvert, wevent, wflags) \
-{      .id = snd_soc_dapm_supply, .name = wname, .reg = wreg,  \
+{      .id = snd_soc_dapm_micbias, .name = wname, .reg = wreg, \
        .shift = wshift, .invert = winvert, .event = wevent, \
        .event_flags = wflags}

-- 
Regards,
Shawn

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

* Re: WM8994 playback delay
  2012-03-28 23:02   ` WM8994 playback delay Sangbeom Kim
@ 2012-03-29 10:50     ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2012-03-29 10:50 UTC (permalink / raw)
  To: Sangbeom Kim; +Cc: alsa-devel, sbkim01, sangsu4u.park, 'Liam Girdwood'


[-- Attachment #1.1: Type: text/plain, Size: 1297 bytes --]

On Thu, Mar 29, 2012 at 08:02:29AM +0900, Sangbeom Kim wrote:

> Currently, We are developing SMDK with Exynos5250 and  WM8994 on 3.3-rc6.
> We try to enable CONFIG_PM_RUNTIME and on/off control of power domain.
> But It has playback delay in the first playback.(3~4sec and 6/10times)

> In that time, Log maessage is 
> 'wm8994-codec wm8994-codec: Timed out waiting for DC Servo 300'
> wait_for_dc_servo() function generate above message on sound/soc/codecs/wm_hubs.c

This issue usually indicates that the clocking has an issue - are you
following a similar pattern to that seen in the lowland machine driver
in mainline?  This is the best practice for WM8994 class parts, it
should minimise power consumption when idle.

> After removing wait_for_dc_servo for testing, playback delay is disappeared.
> So, Could you please explain the  purporse of wait_for_dc_servo()?
> If wait_for_dc_servo() is removed, What kind of problem can be happened?

The DC servo is used to reduce pops on the headphone output.  If the DC
servo is not run the headphone outputs will produce audible artifacts
when headphone is enabled which are generally considered unacceptable by
users.  There's a more detailed explanation of the feature in the WM8994
datasheet but that's the high level.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
  2012-03-29  5:24 ` Shawn Guo
@ 2012-03-29 10:56   ` Mark Brown
  2012-03-29 14:11     ` Shawn Guo
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2012-03-29 10:56 UTC (permalink / raw)
  To: Shawn Guo; +Cc: Fabio Estevam, alsa-devel, Liam Girdwood, Zeng Zhaoming


[-- Attachment #1.1: Type: text/plain, Size: 1009 bytes --]

On Thu, Mar 29, 2012 at 01:24:13PM +0800, Shawn Guo wrote:
> On Wed, Mar 28, 2012 at 08:53:45PM +0100, Mark Brown wrote:

> > -	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> > -				mic_bias_event,
> > -				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> > +	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> > +			    mic_bias_event,
> > +			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),

> It breaks my capture testing.

Well, any capture testing that uses mic bias shouldn't work in mainline
anyway - there's no hookup in the machine driver.

> I'm not sure these two macros are equivalent, since they have different
> .id assignment.  To quickly confirm the problem, I have the capture
> back to work with the following change.

You'll need to change the hookup in your machine to adapt to the change
of widget type - see the previous conversions that have been done in git
history for examples.  No device tree bindings should be using old style
mic bias hookups.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
  2012-03-29 10:56   ` Mark Brown
@ 2012-03-29 14:11     ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2012-03-29 14:11 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, Liam Girdwood, Zeng Zhaoming

On Thu, Mar 29, 2012 at 11:56:46AM +0100, Mark Brown wrote:
> On Thu, Mar 29, 2012 at 01:24:13PM +0800, Shawn Guo wrote:
> > On Wed, Mar 28, 2012 at 08:53:45PM +0100, Mark Brown wrote:
> 
> > > -	SND_SOC_DAPM_MICBIAS_E("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> > > -				mic_bias_event,
> > > -				SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> > > +	SND_SOC_DAPM_SUPPLY("Mic Bias", SGTL5000_CHIP_MIC_CTRL, 8, 0,
> > > +			    mic_bias_event,
> > > +			    SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
> 
> > It breaks my capture testing.
> 
> Well, any capture testing that uses mic bias shouldn't work in mainline
> anyway - there's no hookup in the machine driver.
> 
> > I'm not sure these two macros are equivalent, since they have different
> > .id assignment.  To quickly confirm the problem, I have the capture
> > back to work with the following change.
> 
> You'll need to change the hookup in your machine to adapt to the change
> of widget type - see the previous conversions that have been done in git
> history for examples.  No device tree bindings should be using old style
> mic bias hookups.

Yes, with the proper machine driver adaption, it works now.
Thanks, Mark.

Tested-by: Shawn Guo <shawn.guo@linaro.org>

-- 
Regards,
Shawn

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

end of thread, other threads:[~2012-03-29 14:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 19:53 [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Mark Brown
2012-03-28 19:53 ` [PATCH 2/2] ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E() Mark Brown
2012-03-28 23:02   ` WM8994 playback delay Sangbeom Kim
2012-03-29 10:50     ` Mark Brown
2012-03-29  3:40 ` [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget Dong Aisheng
2012-03-29  5:24 ` Shawn Guo
2012-03-29 10:56   ` Mark Brown
2012-03-29 14:11     ` Shawn Guo

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.