audio: fix pop snd after bootup [2/2]
authorShuai Li <shuai.li@amlogic.com>
Tue, 8 Jan 2019 14:16:41 +0000 (22:16 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 9 Jan 2019 14:40:26 +0000 (06:40 -0800)
PD#SWPL-3178

Problem:
output big pop noise after system boot up.

Solution:
Add zero and then unmute the stream.
NOTICE: user should unmute the AD82584F after boot.

Verify:
local verified.

Change-Id: I21555318f9347c5340a28f7e5cf0e3e2cde849a0
Signed-off-by: Shuai Li <shuai.li@amlogic.com>
sound/soc/codecs/amlogic/ad82584f.c

index 00e6860..8ad27a8 100644 (file)
@@ -55,7 +55,7 @@ static const
 struct reg_default ad82584f_reg_defaults[AD82584F_REGISTER_COUNT] = {
        {0x00, 0x00},//##State_Control_1
        {0x01, 0x04},//##State_Control_2
-       {0x02, 0x00},//##State_Control_3
+       {0x02, 0x30},//##State_Control_3
        {0x03, 0x4e},//##Master_volume_control
        {0x04, 0x00},//##Channel_1_volume_control
        {0x05, 0x00},//##Channel_2_volume_control
@@ -193,7 +193,7 @@ struct reg_default ad82584f_reg_defaults[AD82584F_REGISTER_COUNT] = {
 static const int m_reg_tab[AD82584F_REGISTER_COUNT][2] = {
        {0x00, 0x00},//##State_Control_1
        {0x01, 0x04},//##State_Control_2
-       {0x02, 0x00},//##State_Control_3
+       {0x02, 0x30},//##State_Control_3
        {0x03, 0x4e},//##Master_volume_control
        {0x04, 0x00},//##Channel_1_volume_control
        {0x05, 0x00},//##Channel_2_volume_control
@@ -817,7 +817,7 @@ static int ad82584f_init(struct snd_soc_codec *codec)
        ad82584f_set_eq_drc(codec);
 
        /*unmute,default power-on is mute.*/
-       snd_soc_write(codec, 0x02, 0x00);
+       /*snd_soc_write(codec, 0x02, 0x00);*/
 
        return 0;
 }