ASoC: sgtl5000: Convert mic bias to a supply widget
Subsystems (3)
PATCH 1/2 ASoC: sgtl5000: Convert mic bias to a supply widget
No current users and it's the last user of MICBIAS_E().
--- sound/soc/codecs/sgtl5000.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/sgtl5000.c +3 -3
@@ -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,
Signature · 1 line
1.7.9.1
PATCH 2/2 ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E()
There are no users any more and new drivers should be using supply widgets which fully replace it anyway.
--- include/sound/soc-dapm.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
include/sound/soc-dapm.h +0 -4
@@ -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, \
Signature · 1 line
1.7.9.1
WM8994 playback delay
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.
Re: WM8994 playback delay
Quoted 7 lines · Sangbeom Kim
Currently, We are developing SMDK with Exynos5250 and WM8994 on 3.3-rc6. We try to enable
CONFIG_PM_RUNTIMEand 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 onsound/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.
Quoted 3 lines
After removing
wait_for_dc_servofor testing, playback delay is disappeared. So, Could you please explain the purporse ofwait_for_dc_servo()? Ifwait_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.
Quoted 32 lines · Mark Brown
No current users and it's the last user of
MICBIAS_E().Signed-off-by Mark Brown <[email protected]>--- sound/soc/codecs/sgtl5000.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)sound/soc/codecs/sgtl5000.c +3
-3@@ -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,Signature · 6 lines
1.7.9.1 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Regards
Dong Aisheng
Quoted 12 lines · Mark Brown
No current users and it's the last user of
MICBIAS_E().Signed-off-by Mark Brown <[email protected]>--- sound/soc/codecs/sgtl5000.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)sound/soc/codecs/sgtl5000.c +0
-0
sound/soc/codecs/sgtl5000.c static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = { · line 203
Quoted 10 lines
sound/soc/codecs/sgtl5000.c +3
-3@@ -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}Signature · 2 lines
Regards, Shawn
Quoted 10 lines · Shawn Guo
sound/soc/codecs/sgtl5000.c static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = { · line 202
Quoted 6 lines · Mark Brown
sound/soc/codecs/sgtl5000.c +3
-3-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.
Quoted 3 lines
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.
Shawn Guo
Tested-byQuoted 15 lines · Mark Brown
Quoted 10 lines · Shawn Guo
sound/soc/codecs/sgtl5000.c static const struct snd_soc_dapm_widget sgtl5000_dapm_widgets[] = { · line 202
Quoted 6 lines · Mark Brown
sound/soc/codecs/sgtl5000.c +3
-3-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.
Quoted 8 lines
Quoted 3 lines
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.
Signature · 2 lines
Regards, Shawn