Skip to contentSkip to conversation

ASoC: rt5645: enable speaker protection features

PATCH Superseded Bard Liao 2 participants 3 messages Jun 23, 2017 1 message not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/1 ASoC: rt5645: enable speaker protection features

This patch is uploaded for enabling the speaker protection features of the audio codec.

---
 sound/soc/codecs/rt5645.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5645.c +4 -3
index 162044d..9344af2 100644
@@ -59,10 +59,11 @@ static const struct regmap_range_cfg rt5645_ranges[] = {
 
 static const struct reg_sequence init_list[] = {
 	{RT5645_PR_BASE + 0x3d,	0x3600},
-	{RT5645_PR_BASE + 0x1c,	0xfd20},
+	{RT5645_PR_BASE + 0x1c,	0xfd70},
 	{RT5645_PR_BASE + 0x20,	0x611f},
 	{RT5645_PR_BASE + 0x21,	0x4040},
 	{RT5645_PR_BASE + 0x23,	0x0004},
+	{RT5645_CLSD_OUT_CTRL, 0xa0e8},
 	{RT5645_ASRC_4, 0x0120},
 };
 
@@ -171,7 +172,7 @@ static const struct reg_default rt5645_reg[] = {
 	{ 0x9c, 0x0aea },
 	{ 0x9d, 0x000c },
 	{ 0x9e, 0x0400 },
-	{ 0xa0, 0xa0a8 },
+	{ 0xa0, 0xa0e8 },
 	{ 0xa1, 0x0059 },
 	{ 0xa2, 0x0001 },
 	{ 0xae, 0x6000 },
@@ -328,7 +329,7 @@ static const struct reg_default rt5650_reg[] = {
 	{ 0x9c, 0x0aea },
 	{ 0x9d, 0x000c },
 	{ 0x9e, 0x0400 },
-	{ 0xa0, 0xa0a8 },
+	{ 0xa0, 0xa0e8 },
 	{ 0xa1, 0x0059 },
 	{ 0xa2, 0x0001 },
 	{ 0xae, 0x6000 },
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 2 lines · Bard Liao

This patch is uploaded for enabling the speaker protection features of the audio codec.

No control of these?

sound/soc/codecs/rt5645.c static const struct reg_default rt5645_reg[] = { · line 178

Quoted 9 lines
sound/soc/codecs/rt5645.c +1 -1
@@ -171,7 +172,7 @@ static const struct reg_default rt5645_reg[] = {
 	{ 0x9c, 0x0aea },
 	{ 0x9d, 0x000c },
 	{ 0x9e, 0x0400 },
-	{ 0xa0, 0xa0a8 },
+	{ 0xa0, 0xa0e8 },
 	{ 0xa1, 0x0059 },
 	{ 0xa2, 0x0001 },
 	{ 0xae, 0x6000 },

You shouldn't be changing the register defaults away from the physical defaults, just do it with a normal register write. Changing the defaults will break cache resyncing.

A message that is not in the archive (sent off-list or not yet received): ABFD875FF5FB574BA706497D987D48D70267665F@RTITMBSV02.realtek.com.tw

maintainer
#3 lore raw
Quoted 8 lines · Bard Liao
Quoted 5 lines · Bard Liao

You shouldn't be changing the register defaults away from the physical defaults, just do it with a normal register write. Changing the defaults will break cache resyncing.

Agree. The reason I did it is the register will also be modified by regmap_register_patch.

If it goes in via a normal write it'll still get restored, just as part of the regular cache writeout on resume.