atv_demod: audio: fix audio source contorl for atv demod [1/1]
authornengwen.chen <nengwen.chen@amlogic.com>
Fri, 30 Aug 2019 11:41:40 +0000 (19:41 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Fri, 6 Sep 2019 08:23:18 +0000 (01:23 -0700)
PD#TV-9484

Problem:
1.fix audio source contorl for atv demod.

Solution:
1.fix audio source contorl for atv demod.
2.increase the output power of ATV audio.

Verify:
Verified by r311.

Change-Id: I1332dcd3b968790e3227170799ddb019578fe431
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
drivers/amlogic/atv_demod/atvauddemod_func.c
sound/soc/amlogic/meson/audio_hw.c

index 0fbf1245ade8dd55f92f1eee375116e209272cc4..76c02cff79210e6d03461d8b227f773be66ca510 100644 (file)
@@ -317,7 +317,7 @@ static void set_deem_and_gain(int standard)
        case AUDIO_STANDARD_BTSC:
                deem = AUDIO_DEEM_75US;
                lmr_gain = 0x1e8;
-               lpr_gain = 0x3e0;
+               lpr_gain = 0x3c0;
                demod_gain = 0x2;
                break;
        case AUDIO_STANDARD_A2_K:
@@ -335,25 +335,25 @@ static void set_deem_and_gain(int standard)
        case AUDIO_STANDARD_A2_BG:
                deem = AUDIO_DEEM_50US;
                lmr_gain = 0x3a8;
-               lpr_gain = 0x1d0;
+               lpr_gain = 0x1f6;
                demod_gain = 0x222;
                break;
        case AUDIO_STANDARD_A2_DK1:
                deem = AUDIO_DEEM_50US;
                lmr_gain = 0x3a8;
-               lpr_gain = 0x1d0;
+               lpr_gain = 0x1f6;
                demod_gain = 0x222;
                break;
        case AUDIO_STANDARD_A2_DK2:
                deem = AUDIO_DEEM_50US;
                lmr_gain = 0x3a8;
-               lpr_gain = 0x1d0;
+               lpr_gain = 0x1f6;
                demod_gain = 0x222;
                break;
        case AUDIO_STANDARD_A2_DK3:
                deem = AUDIO_DEEM_50US;
                lmr_gain = 0x3a8;
-               lpr_gain = 0x1d0;
+               lpr_gain = 0x1f6;
                demod_gain = 0x222;
                break;
        case AUDIO_STANDARD_NICAM_DK:
@@ -363,7 +363,7 @@ static void set_deem_and_gain(int standard)
                break;
        case AUDIO_STANDARD_NICAM_I:
                deem = AUDIO_DEEM_J17_2;
-               lpr_gain = 0x200;
+               lpr_gain = 0x177;
                demod_gain = 0x233;
                break;
        case AUDIO_STANDARD_NICAM_BG:
@@ -391,7 +391,7 @@ static void set_deem_and_gain(int standard)
        case AUDIO_STANDARD_MONO_I:
                deem = AUDIO_DEEM_J17_2;
                lmr_gain = 0x3a8;
-               lpr_gain = 0x200;
+               lpr_gain = 0x1c5;
                demod_gain = 0x233;
                break;
        case AUDIO_STANDARD_MONO_BG:
@@ -1593,8 +1593,10 @@ void set_outputmode(uint32_t standard, uint32_t outmode)
                                aud_std = AUDIO_STANDARD_NICAM_L;
 
                        audio_source_select(1);
-               } else
-                       audio_source_select(0);
+               } else {
+                       if (standard == AUDIO_STANDARD_MONO_L)
+                               audio_source_select(0);
+               }
 
                break;
        }
index 5f3b72eec4ec73931f9008aa65f3a2dba5ac703b..4a3848e82a756aabcd8d7e3d90fdcef50a481cd6 100644 (file)
@@ -468,7 +468,7 @@ static void i2sin_fifo2_set_buf(u32 addr, u32 size, u32 src, u32 ch)
 void atv_src_select(bool src)
 {
        aml_audin_update_bits(AUDIN_ATV_DEMOD_CTRL,
-                       0x3, (src << 1) && src);
+                       0x3, (src ? 0x3 : 0x0));
 }
 
 void atv_LR_swap(bool swap)