mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: rockchip: rk817-codec: Solve pop problems
DIGEN_CLKE can only be controlled when the amplifier is turned off Signed-off-by: Binyuan Lan <lby@rock-chips.com> Change-Id: I5758cab8f20bd2ede008d1ad138cdadcaa55e39d
This commit is contained in:
@@ -941,26 +941,27 @@ static int rk817_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
|
||||
struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
DBG("%s %d\n", __func__, mute);
|
||||
|
||||
if (mute) {
|
||||
rk817_codec_ctl_gpio(rk817, CODEC_SET_SPK, 0);
|
||||
rk817_codec_ctl_gpio(rk817, CODEC_SET_HP, 0);
|
||||
|
||||
snd_soc_component_update_bits(component,
|
||||
RK817_CODEC_DDAC_MUTE_MIXCTL,
|
||||
DACMT_ENABLE, DACMT_ENABLE);
|
||||
snd_soc_component_write(component, RK817_CODEC_ADAC_CFG1,
|
||||
PWD_DACBIAS_DOWN | PWD_DACD_DOWN |
|
||||
PWD_DACL_DOWN | PWD_DACR_DOWN);
|
||||
/* Reset DAC DTOP_DIGEN_CLKE for playback stopped */
|
||||
snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE,
|
||||
DAC_DIG_CLK_EN, DAC_DIG_CLK_DIS);
|
||||
snd_soc_component_update_bits(component, RK817_CODEC_DTOP_DIGEN_CLKE,
|
||||
DAC_DIG_CLK_EN, DAC_DIG_CLK_EN);
|
||||
|
||||
} else {
|
||||
snd_soc_component_update_bits(component,
|
||||
RK817_CODEC_DDAC_MUTE_MIXCTL,
|
||||
DACMT_ENABLE, DACMT_DISABLE);
|
||||
}
|
||||
|
||||
if (mute) {
|
||||
rk817_codec_ctl_gpio(rk817, CODEC_SET_SPK, 0);
|
||||
rk817_codec_ctl_gpio(rk817, CODEC_SET_HP, 0);
|
||||
} else {
|
||||
switch (rk817->playback_path) {
|
||||
case SPK_PATH:
|
||||
case RING_SPK:
|
||||
|
||||
Reference in New Issue
Block a user