Skip to content

Commit 714f5df

Browse files
Michael-zy2000broonie
authored andcommitted
ASoC: codecs: ES8326: solve hp and button detect issue
We got an error report about headphone type detection and button detection. We fixed the headphone type detection error by adjusting the condition of setting es8326->hp to 0.And we fixed the button detection error by adjusting micbias and vref. Signed-off-by: Zhang Yi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 1f90047 commit 714f5df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/soc/codecs/es8326.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ static void es8326_jack_detect_handler(struct work_struct *work)
829829
/* mute adc when mic path switch */
830830
regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44);
831831
regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
832-
es8326->hp = 0;
833832
}
833+
es8326->hp = 0;
834834
regmap_update_bits(es8326->regmap, ES8326_HPDET_TYPE, 0x03, 0x01);
835835
regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x0a);
836836
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x03);
@@ -981,7 +981,7 @@ static int es8326_resume(struct snd_soc_component *component)
981981
regmap_write(es8326->regmap, ES8326_ANA_LP, 0xf0);
982982
usleep_range(10000, 15000);
983983
regmap_write(es8326->regmap, ES8326_HPJACK_TIMER, 0xd9);
984-
regmap_write(es8326->regmap, ES8326_ANA_MICBIAS, 0xcb);
984+
regmap_write(es8326->regmap, ES8326_ANA_MICBIAS, 0xd8);
985985
/* set headphone default type and detect pin */
986986
regmap_write(es8326->regmap, ES8326_HPDET_TYPE, 0x83);
987987
regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE, 0x05);
@@ -1018,7 +1018,7 @@ static int es8326_resume(struct snd_soc_component *component)
10181018

10191019
regmap_write(es8326->regmap, ES8326_ANA_VSEL, 0x7F);
10201020
/* select vdda as micbias source */
1021-
regmap_write(es8326->regmap, ES8326_VMIDLOW, 0x23);
1021+
regmap_write(es8326->regmap, ES8326_VMIDLOW, 0x03);
10221022
/* set dac dsmclip = 1 */
10231023
regmap_write(es8326->regmap, ES8326_DAC_DSM, 0x08);
10241024
regmap_write(es8326->regmap, ES8326_DAC_VPPSCALE, 0x15);

0 commit comments

Comments
 (0)