From: zhiwei.yuan Date: Thu, 14 Feb 2019 11:11:36 +0000 (+0800) Subject: dtv_demod: TXL DTMB losing lock sometimes when playing [1/1] X-Git-Tag: hardkernel-4.9.236-104~1667 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5a69200cfd3f1a4318a06ec9cc9fe3355dae42e;p=platform%2Fkernel%2Flinux-amlogic.git dtv_demod: TXL DTMB losing lock sometimes when playing [1/1] PD#SWPL-4854 Problem: TXL DTMB has losing lock issue Solution: set HHI_DEMOD_CLK_CNTL to 0x301 for TXL Verify: verified by t962_p321 Change-Id: I51b61949b5f9c96b64eae7e0054771ce44dbfd5b Signed-off-by: zhiwei.yuan --- diff --git a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_general.c b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_general.c index 0f2cf0d..cec12d8 100644 --- a/drivers/amlogic/media/vin/tvin/tvafe/tvafe_general.c +++ b/drivers/amlogic/media/vin/tvin/tvafe/tvafe_general.c @@ -802,7 +802,7 @@ int adc_set_pll_cntl(bool on, unsigned int module_sel, void *pDtvPara) W_HIU_REG(0xf3, 0x00800000); //HHI_AUDPLL_CLK_OUT_CNTL - W_HIU_REG(0x74, 0x501); + W_HIU_REG(HHI_DEMOD_CLK_CNTL, 0x501); } else if (tvafe_cpu_type() == CPU_TYPE_TXL || tvafe_cpu_type() == CPU_TYPE_TXLX || @@ -850,7 +850,7 @@ int adc_set_pll_cntl(bool on, unsigned int module_sel, void *pDtvPara) tvafe_pr_info("\n%s: on:%d,module:0x%x,flag:0x%x...\n", __func__, on, module_sel, adc_pll_chg); break; - case ADC_EN_DTV_DEMODPLL: /* dtv demod default*/ + case ADC_EN_DTV_DEMODPLL: /* dtv demod */ if (adc_pll_chg & (ADC_EN_ATV_DEMOD | ADC_EN_TVAFE)) { ret = -4; @@ -873,10 +873,17 @@ int adc_set_pll_cntl(bool on, unsigned int module_sel, void *pDtvPara) /*reset*/ W_HIU_REG(HHI_ADC_PLL_CNTL3, 0xca6a2110); W_HIU_REG(HHI_ADC_PLL_CNTL, pDpara->adcpllctl); - if (pDpara->atsc) + if (pDpara->atsc) { W_HIU_REG(HHI_DEMOD_CLK_CNTL, 0x507); - else - W_HIU_REG(HHI_DEMOD_CLK_CNTL, 0x502); + } else { + /*bugzilla 139044*/ + if (tvafe_cpu_type() == CPU_TYPE_TXL) + W_HIU_REG(HHI_DEMOD_CLK_CNTL, + 0x301); + else + W_HIU_REG(HHI_DEMOD_CLK_CNTL, + 0x502); + } W_HIU_REG(HHI_ADC_PLL_CNTL3, 0x4a6a2110);