ASoC: rt5645: add sys clk detection
Add system clock detection to prevent output DC from SPO. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8005c49d9a
commit
ca8457bb02
2 changed files with 8 additions and 0 deletions
|
@ -1646,9 +1646,13 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
|
|||
RT5645_PWR_CLS_D_L,
|
||||
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
|
||||
RT5645_PWR_CLS_D_L);
|
||||
snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
|
||||
RT5645_DET_CLK_MASK, RT5645_DET_CLK_MODE1);
|
||||
break;
|
||||
|
||||
case SND_SOC_DAPM_PRE_PMD:
|
||||
snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
|
||||
RT5645_DET_CLK_MASK, RT5645_DET_CLK_DIS);
|
||||
snd_soc_write(codec, RT5645_EQ_CTRL2, 0);
|
||||
snd_soc_update_bits(codec, RT5645_PWR_DIG1,
|
||||
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
|
||||
|
|
|
@ -2122,6 +2122,10 @@ enum {
|
|||
/* General Control3 (0xfc) */
|
||||
#define RT5645_JD_PSV_MODE (0x1 << 12)
|
||||
#define RT5645_IRQ_CLK_GATE_CTRL (0x1 << 11)
|
||||
#define RT5645_DET_CLK_MASK (0x3 << 9)
|
||||
#define RT5645_DET_CLK_DIS (0x0 << 9)
|
||||
#define RT5645_DET_CLK_MODE1 (0x1 << 9)
|
||||
#define RT5645_DET_CLK_MODE2 (0x2 << 9)
|
||||
#define RT5645_MICINDET_MANU (0x1 << 7)
|
||||
#define RT5645_RING2_SLEEVE_GND (0x1 << 5)
|
||||
|
||||
|
|
Loading…
Reference in a new issue