dvb-usb-friio: accept center-shifted frequency
PATCH 1/1 dvb-usb-friio: accept center-shifted frequency
From: Akihiro Tsukada <[email protected]>
This patch adds a fix to accept frequency with its center shifted.
The driver used to accept center frequencies of the normal UHF band channels, but in ISDB-T, center frequency is shifted with 1/7MHz.
It was shifted internally in the driver,
but this patch enables to accept both types of frequency.
Priority: normal
--- friio-fe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
linux/drivers/media/dvb/dvb-usb/friio-fe.c +6 -4
@@ -134,11 +134,13 @@ static int jdvbt90502_pll_set_freq(strucdeb_fe ("%s: freq=%d, step=%d\n" , __func__, freq, state->frontend.ops.info.frequency_stepsize);/* freq -> oscilator frequency conversion. */ -/* freq: 473,000,000 + n*6,000,000 (no 1/7MHz shift to center freq) */ -/* add 400[1/7 MHZ] = 57.142857MHz. 57MHz for the IF, */ -/* 1/7MHz for center freq shift */ +/* freq: 473,000,000 + n*6,000,000 [+ 142857 (center freq. shift)] */ f = freq / state->frontend.ops.info.frequency_stepsize; - f +=400 ; +/* add 399[1/7 MHZ] = 57MHz for the IF */ + f +=399 ; +/* add center frequency shift if necessary */ +if (f %7 ==0 ) + f++; pll_freq_cmd[DEMOD_REDIRECT_REG ] =JDVBT90502_2ND_I2C_REG ;/* 0xFE */ pll_freq_cmd[ADDRESS_BYTE ] = state->config.pll_address <<1 ; pll_freq_cmd[DIVIDER_BYTE1 ] = (f >>8 ) &0x7F ;
--------------------------------------
GyaO! - Anime, Dramas, Movies, and Music videos [FREE]
http://pr.mail.yahoo.co.jp/gyao/
Patrick Boettcher
AppliedHi Akihiro,
Quoted 27 lines · Akihiro TSUKADA
From: Akihiro Tsukada <[email protected]>
This patch adds a fix to accept frequency with its center shifted.
The driver used to accept center frequencies of the normal UHF band channels, but in ISDB-T, center frequency is shifted with 1/7MHz.
It was shifted internally in the driver,
but this patch enables to accept both types of frequency.Priority: normal
Signed-off-by Akihiro Tsukada <[email protected]>---
friio-fe.c| 10 ++++++----1 file changed, 6 insertions(+), 4 deletions(-)linux/drivers/media/dvb/dvb-usb/friio-fe.c +1
-3@@ -134,11 +134,13 @@ static int jdvbt90502_pll_set_freq(strucdeb_fe ("%s: freq=%d, step=%d\n" , __func__, freq, state->frontend.ops.info.frequency_stepsize);/* freq -> oscilator frequency conversion. */ -/* freq: 473,000,000 + n*6,000,000 (no 1/7MHz shift to center freq) */ -/* add 400[1/7 MHZ] = 57.142857MHz. 57MHz for the IF, */ -/* 1/7MHz for center freq shift */ +/* freq: 473,000,000 + n*6,000,000 [+ 142857 (center freq. shift)] */
linux/drivers/media/dvb/dvb-usb/friio-fe.c static int jdvbt90502_pll_set_freq(struc · line 146
Quoted 10 lines
linux/drivers/media/dvb/dvb-usb/friio-fe.c +5
-1f = freq / state->frontend.ops.info.frequency_stepsize; - f +=400 ; +/* add 399[1/7 MHZ] = 57MHz for the IF */ + f +=399 ; +/* add center frequency shift if necessary */ +if (f %7 ==0 ) + f++; pll_freq_cmd[DEMOD_REDIRECT_REG ] =JDVBT90502_2ND_I2C_REG ;/* 0xFE */ pll_freq_cmd[ADDRESS_BYTE ] = state->config.pll_address <<1 ; pll_freq_cmd[DIVIDER_BYTE1 ] = (f >>8 ) &0x7F ;
I applied your patch, I will later asked Mauro to pull it into main.
thanks,
--
Patrick http://www.kernellabs.com/