[alsa-devel] [PATCH 1/2] ASoC: sgtl5000: Convert mic bias to a supply widget
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,
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, \
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.
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.
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
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}
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.
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
participants (4)
-
Dong Aisheng
-
Mark Brown
-
Sangbeom Kim
-
Shawn Guo