Skip to content

Commit

Permalink
ASoC: rt298: fix jack type detect error
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Bard Liao authored and broonie committed Oct 24, 2016
1 parent 1001354 commit f515c38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/soc/codecs/rt298.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f515c38

Please sign in to comment.