ASoC: rk3308_codec: fix codec no sound when drop testing

IP vendor suggest that enable pop sound when enable hpout,
and disable it after disable hpout.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I01f03de8c4859faa4d8966440e8d2dcfa53c8da4
This commit is contained in:
XiaoTan Luo 2021-12-29 16:31:47 +08:00 committed by Tao Huang
parent 2492bad388
commit 765055059c

View File

@ -1522,6 +1522,11 @@ static int rk3308_codec_dac_lineout_disable(struct rk3308_codec_priv *rk3308)
static int rk3308_codec_dac_hpout_enable(struct rk3308_codec_priv *rk3308)
{
regmap_update_bits(rk3308->regmap, RK3308_DAC_ANA_CON01,
RK3308_DAC_HPOUT_POP_SOUND_L_MSK |
RK3308_DAC_HPOUT_POP_SOUND_R_MSK,
RK3308_DAC_HPOUT_POP_SOUND_L_WORK |
RK3308_DAC_HPOUT_POP_SOUND_R_WORK);
udelay(20);
/* Step 07 */
@ -1577,6 +1582,12 @@ static int rk3308_codec_dac_hpout_disable(struct rk3308_codec_priv *rk3308)
RK3308_DAC_L_HPOUT_MUTE |
RK3308_DAC_R_HPOUT_MUTE);
udelay(20);
regmap_update_bits(rk3308->regmap, RK3308_DAC_ANA_CON01,
RK3308_DAC_HPOUT_POP_SOUND_L_MSK |
RK3308_DAC_HPOUT_POP_SOUND_R_MSK,
RK3308_DAC_HPOUT_POP_SOUND_L_DIS |
RK3308_DAC_HPOUT_POP_SOUND_R_DIS);
return 0;
}