audio: optimize TL1 codec init sequence [1/1]
authorShuai Li <shuai.li@amlogic.com>
Thu, 19 Sep 2019 13:02:28 +0000 (21:02 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Wed, 30 Oct 2019 08:53:24 +0000 (01:53 -0700)
PD#TV-9458

Problem:
Audio codec output has a ditch.

Solution:
Optimize TL1 codec init sequence [1/1]

Verify:
TL1.

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

index a0de3d1..604c62f 100644 (file)
@@ -572,14 +572,13 @@ static void tl1_acodec_release_fast_mode_work_func(struct work_struct *p_work)
        pr_info("%s\n", __func__);
        /*reset audio codec register*/
        tl1_acodec_reset(codec);
-       snd_soc_write(codec, ACODEC_0, 0xF000);
-       msleep(200);
-       snd_soc_write(codec, ACODEC_0, 0xB000);
+       tl1_acodec_start_up(codec);
        tl1_acodec_reg_init(codec);
 
        aml_acodec->codec = codec;
        tl1_acodec_dai_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 }
+
 static int tl1_acodec_dai_mute_stream(struct snd_soc_dai *dai, int mute,
                                      int stream)
 {
@@ -700,8 +699,6 @@ static const struct regmap_config tl1_acodec_regmap_config = {
        .reg_stride = 4,
        .val_bits = 32,
        .max_register = 0x1c,
-       .reg_defaults = tl1_acodec_init_list,
-       .num_reg_defaults = ARRAY_SIZE(tl1_acodec_init_list),
        .cache_type = REGCACHE_RBTREE,
 };