From 5bc283d61462f069ec4e821997e648051120d26f Mon Sep 17 00:00:00 2001 From: CrazyCat Date: Thu, 9 Nov 2023 19:05:50 +0200 Subject: [PATCH] media: dvb-frontends/stid135: Improved auto max LLR rate setup. --- drivers/media/dvb-frontends/stid135/stid135_drv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/stid135/stid135_drv.c b/drivers/media/dvb-frontends/stid135/stid135_drv.c index 2060a632c3b9..81bf03293767 100644 --- a/drivers/media/dvb-frontends/stid135/stid135_drv.c +++ b/drivers/media/dvb-frontends/stid135/stid135_drv.c @@ -11599,7 +11599,7 @@ fe_lla_error_t get_current_llr(fe_stid135_handle_t handle,enum fe_stid135_demod struct fe_stid135_internal_param *pParams; pParams = (struct fe_stid135_internal_param *) handle; - //printk("Symbol rate = %d\n", pParams->demod_results[demod_path-1].symbol_rate); + printk("Symbol rate = %d Ks\n", pParams->demod_results[demod_path-1].symbol_rate/1000); *current_llr = pParams->demod_results[demod_path-1].symbol_rate; switch(pParams->demod_results[demod_path-1].modulation) { @@ -11633,8 +11633,9 @@ fe_lla_error_t get_current_llr(fe_stid135_handle_t handle,enum fe_stid135_demod *current_llr *= 10; break; default: - *current_llr *= 3; + *current_llr *= 3; } + *current_llr += 1000000; if(*current_llr != 0) printk("Current LLR = %d MLLR/s\n", *current_llr/1000000); @@ -11643,9 +11644,9 @@ fe_lla_error_t get_current_llr(fe_stid135_handle_t handle,enum fe_stid135_demod if((*current_llr/1000)<90000) fe_stid135_set_maxllr_rate(handle,demod_path,90); - else if(((*current_llr/1000)>=90000)&&((*current_llr/1000)<129000)) + else if((*current_llr/1000)<129000) fe_stid135_set_maxllr_rate(handle,demod_path,129); - else if(((*current_llr/1000)>=129000)&&((*current_llr/1000)<180000)) + else if((*current_llr/1000)<180000) fe_stid135_set_maxllr_rate(handle,demod_path,180); else fe_stid135_set_maxllr_rate(handle,demod_path,250);