Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bard Liao and committed by
Mark Brown
ca8457bb 8005c49d

+8
+4
sound/soc/codecs/rt5645.c
··· 1646 1646 RT5645_PWR_CLS_D_L, 1647 1647 RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R | 1648 1648 RT5645_PWR_CLS_D_L); 1649 + snd_soc_update_bits(codec, RT5645_GEN_CTRL3, 1650 + RT5645_DET_CLK_MASK, RT5645_DET_CLK_MODE1); 1649 1651 break; 1650 1652 1651 1653 case SND_SOC_DAPM_PRE_PMD: 1654 + snd_soc_update_bits(codec, RT5645_GEN_CTRL3, 1655 + RT5645_DET_CLK_MASK, RT5645_DET_CLK_DIS); 1652 1656 snd_soc_write(codec, RT5645_EQ_CTRL2, 0); 1653 1657 snd_soc_update_bits(codec, RT5645_PWR_DIG1, 1654 1658 RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
+4
sound/soc/codecs/rt5645.h
··· 2122 2122 /* General Control3 (0xfc) */ 2123 2123 #define RT5645_JD_PSV_MODE (0x1 << 12) 2124 2124 #define RT5645_IRQ_CLK_GATE_CTRL (0x1 << 11) 2125 + #define RT5645_DET_CLK_MASK (0x3 << 9) 2126 + #define RT5645_DET_CLK_DIS (0x0 << 9) 2127 + #define RT5645_DET_CLK_MODE1 (0x1 << 9) 2128 + #define RT5645_DET_CLK_MODE2 (0x2 << 9) 2125 2129 #define RT5645_MICINDET_MANU (0x1 << 7) 2126 2130 #define RT5645_RING2_SLEEVE_GND (0x1 << 5) 2127 2131