Skip to content

Commit 5096a16

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt5650: enhance spk protection function
This patch adjusts several default settings to ensure the speaker protection function can be enabled safely. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20260615091012.718168-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent fdf043f commit 5096a16

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

sound/soc/codecs/rt5645.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static const struct reg_sequence rt5650_init_list[] = {
8383
{RT5645_PWR_ANLG1, 0x02},
8484
{RT5645_IL_CMD3, 0x6728},
8585
{RT5645_PR_BASE + 0x3a, 0x0000},
86+
{RT5645_CLSD_OUT_CTRL1, 0x4059},
87+
{RT5645_GEN_CTRL3, 0x0200},
8688
};
8789

8890
static const struct reg_default rt5645_reg[] = {
@@ -1855,13 +1857,9 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
18551857
RT5645_PWR_CLS_D_L,
18561858
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
18571859
RT5645_PWR_CLS_D_L);
1858-
snd_soc_component_update_bits(component, RT5645_GEN_CTRL3,
1859-
RT5645_DET_CLK_MASK, RT5645_DET_CLK_MODE1);
18601860
break;
18611861

18621862
case SND_SOC_DAPM_PRE_PMD:
1863-
snd_soc_component_update_bits(component, RT5645_GEN_CTRL3,
1864-
RT5645_DET_CLK_MASK, RT5645_DET_CLK_DIS);
18651863
snd_soc_component_write(component, RT5645_EQ_CTRL2, 0);
18661864
snd_soc_component_update_bits(component, RT5645_PWR_DIG1,
18671865
RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |

sound/soc/codecs/rt5645.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
#define RT5645_A_JD_CTRL1 0x94
119119
#define RT5645_VAD_CTRL4 0x9d
120120
#define RT5645_CLSD_OUT_CTRL 0xa0
121+
#define RT5645_CLSD_OUT_CTRL1 0xa1
121122
/* Function - Digital */
122123
#define RT5645_ADC_EQ_CTRL1 0xae
123124
#define RT5645_ADC_EQ_CTRL2 0xaf

0 commit comments

Comments
 (0)