Commit bc4be656 authored by Oder Chiou's avatar Oder Chiou Committed by Mark Brown

ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null even soundwire mode

Base on https://patchwork.kernel.org/patch/11237953/
Soundwire mode also should follow it.
Signed-off-by: default avatarOder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20200701071645.32061-1-oder_chiou@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3f31f7d9
...@@ -992,16 +992,17 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component, ...@@ -992,16 +992,17 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
rt5682->hs_jack = hs_jack; rt5682->hs_jack = hs_jack;
if (!rt5682->is_sdw) { if (!hs_jack) {
if (!hs_jack) { regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
RT5682_JD1_EN_MASK, RT5682_JD1_DIS); regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, RT5682_POW_JDH | RT5682_POW_JDL, 0);
RT5682_POW_JDH | RT5682_POW_JDL, 0); cancel_delayed_work_sync(&rt5682->jack_detect_work);
cancel_delayed_work_sync(&rt5682->jack_detect_work);
return 0;
}
return 0;
}
if (!rt5682->is_sdw) {
switch (rt5682->pdata.jd_src) { switch (rt5682->pdata.jd_src) {
case RT5682_JD1: case RT5682_JD1:
snd_soc_component_update_bits(component, snd_soc_component_update_bits(component,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment