Skip to content

Commit

Permalink
ASoC: rt5682: fix the random recording noise of headset
Browse files Browse the repository at this point in the history
The cycle time of FIFO clock should increase 2 times to avoid
the random recording noise issue.
This setting could apply to all known situations in i2s mode.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20200317073308.11572-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Shuming Fan authored and Mark Brown committed Mar 18, 2020
1 parent 28ddd84 commit 557270e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -2651,6 +2651,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ);
regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1,
RT5682_PM_HP_MASK, RT5682_PM_HP_HV);
regmap_update_bits(rt5682->regmap, RT5682_DMIC_CTRL_1,
RT5682_FIFO_CLK_DIV_MASK, RT5682_FIFO_CLK_DIV_2);

INIT_DELAYED_WORK(&rt5682->jack_detect_work,
rt5682_jack_detect_handler);
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/rt5682.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,8 @@
#define RT5682_DMIC_1_EN_SFT 15
#define RT5682_DMIC_1_DIS (0x0 << 15)
#define RT5682_DMIC_1_EN (0x1 << 15)
#define RT5682_FIFO_CLK_DIV_MASK (0x7 << 12)
#define RT5682_FIFO_CLK_DIV_2 (0x1 << 12)
#define RT5682_DMIC_1_DP_MASK (0x3 << 4)
#define RT5682_DMIC_1_DP_SFT 4
#define RT5682_DMIC_1_DP_GPIO2 (0x0 << 4)
Expand Down

0 comments on commit 557270e

Please sign in to comment.