ASoC: rt5682: fix the pop noise while OMTP type headset plugin
To turn the headphone output switch off during jack type detection, it could avoid the pop noise when jack type switches to OMTP type. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20200623125312.27896-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -932,7 +932,9 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
|
||||
RT5682_PWR_ANLG_1, RT5682_PWR_FV2, RT5682_PWR_FV2);
|
||||
snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
|
||||
RT5682_PWR_CBJ, RT5682_PWR_CBJ);
|
||||
|
||||
snd_soc_component_update_bits(component,
|
||||
RT5682_HP_CHARGE_PUMP_1,
|
||||
RT5682_OSW_L_MASK | RT5682_OSW_R_MASK, 0);
|
||||
snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1,
|
||||
RT5682_TRIG_JD_MASK, RT5682_TRIG_JD_HIGH);
|
||||
|
||||
@@ -956,6 +958,11 @@ int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert)
|
||||
rt5682->jack_type = SND_JACK_HEADPHONE;
|
||||
break;
|
||||
}
|
||||
|
||||
snd_soc_component_update_bits(component,
|
||||
RT5682_HP_CHARGE_PUMP_1,
|
||||
RT5682_OSW_L_MASK | RT5682_OSW_R_MASK,
|
||||
RT5682_OSW_L_EN | RT5682_OSW_R_EN);
|
||||
} else {
|
||||
rt5682_enable_push_button_irq(component, false);
|
||||
snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1,
|
||||
|
||||
Reference in New Issue
Block a user