atv_demod: Fix audio always mute and unmute during ATV playing. [1/1]
authornengwen.chen <nengwen.chen@amlogic.com>
Fri, 15 Jun 2018 06:52:20 +0000 (14:52 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Tue, 19 Jun 2018 02:35:45 +0000 (19:35 -0700)
PD#167378: Modify atv demod for audio driver get atv audio data.

Change-Id: I221c6a94d3756d5361c140fdc88f25b65e33d114
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
drivers/amlogic/atv_demod/atv_demod_ops.c

index 66ebc1417f3f4176f10c4edffcd8c99f872774e5..c4b424eaea85bb052c9128438f45c6452eb77937 100644 (file)
@@ -330,17 +330,22 @@ void aml_fe_get_atvaudio_state(int *state)
        if (atv_state == ATVDEMOD_STATE_WORK) {
                retrieve_vpll_carrier_lock(&vpll_lock);
                retrieve_vpll_carrier_line_lock(&line_lock);
-               if ((vpll_lock == 0) && (line_lock == 0))
+               if ((vpll_lock == 0) && (line_lock == 0)) {
                        retrieve_vpll_carrier_audio_power(&power);
-       } else
+                       *state = 1;
+               } else
+                       *state = 0;
+       } else {
+               *state = 0;
                pr_audio("%s, atv is not work, atv_state: %d.\n",
                                __func__, atv_state);
-
+       }
+#if 0
        if (power >= 150)
                *state = 1;
        else
                *state = 0;
-
+#endif
        pr_audio("aml_fe_get_atvaudio_state: %d, power = %d.\n",
                        *state, power);
 }