mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ASoC: rt298: fix jack type detect error
rt298_jack_detect may be called before card is instantiated. And snd_soc_dapm_force_enable_pin will not work in that case. So, update bit manually by regmap_update_bits. Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
1001354ca3
commit
f515c3834a
1 changed files with 5 additions and 0 deletions
|
|
@ -249,6 +249,11 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic)
|
|||
snd_soc_dapm_force_enable_pin(dapm, "LDO1");
|
||||
snd_soc_dapm_sync(dapm);
|
||||
|
||||
regmap_update_bits(rt298->regmap,
|
||||
RT298_POWER_CTRL1, 0x1001, 0);
|
||||
regmap_update_bits(rt298->regmap,
|
||||
RT298_POWER_CTRL2, 0x4, 0x4);
|
||||
|
||||
regmap_write(rt298->regmap, RT298_SET_MIC1, 0x24);
|
||||
msleep(50);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue