Message ID | 1498184697-2156-1-git-send-email-bardliao@realtek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jun 23, 2017 at 10:24:57AM +0800, Bard Liao wrote: > This patch is uploaded for enabling the speaker protection features > of the audio codec. No control of these? > @@ -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.
On Fri, Jun 23, 2017 at 01:55:29PM +0000, Bard Liao wrote: > > On Fri, Jun 23, 2017 at 10:24:57AM +0800, Bard Liao wrote: > > 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.
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 162044d..9344af2 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -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 },
This patch is uploaded for enabling the speaker protection features of the audio codec. Signed-off-by: Bard Liao <bardliao@realtek.com> --- sound/soc/codecs/rt5645.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)