From a864abf4011a505ed8f979ee34fc9dbfb8f58810 Mon Sep 17 00:00:00 2001 From: "nengwen.chen" Date: Fri, 15 Jun 2018 14:52:20 +0800 Subject: [PATCH] atv_demod: Fix audio always mute and unmute during ATV playing. [1/1] PD#167378: Modify atv demod for audio driver get atv audio data. Change-Id: I221c6a94d3756d5361c140fdc88f25b65e33d114 Signed-off-by: nengwen.chen --- drivers/amlogic/atv_demod/atv_demod_ops.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/atv_demod/atv_demod_ops.c b/drivers/amlogic/atv_demod/atv_demod_ops.c index 66ebc14..c4b424e 100644 --- a/drivers/amlogic/atv_demod/atv_demod_ops.c +++ b/drivers/amlogic/atv_demod/atv_demod_ops.c @@ -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); } -- 2.7.4