tuner-xc2028: Fix offset frequencies for DVB @ 6MHz
A message that is not in the archive (sent off-list or not yet received): [email protected]
Andy Walls
Acked-byQuoted 21 lines · Patch from Mauro Carvalho Chehab
The patch number 11918 was added via Mauro Carvalho Chehab <[email protected]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>------
From: Mauro Carvalho Chehab <[email protected]>
tuner-xc2028: Fix offset frequencies for DVB @ 6MHzBoth ATSC and DVB @ 6MHz bandwidth require the same offset.
While we're fixing it, let's cleanup the bandwidth setup to better reflect the fact that it is a function of the bandwidth.
Quoted 8 lines
Thanks to Terry Wu <[email protected]> for pointing this issue and to Andy Walls <[email protected]> for an initial patch for this fix.
Priority: normal
CC Terry Wu <[email protected]>CC Andy Walls <[email protected]>Signed-off-by Mauro Carvalho Chehab <[email protected]>
You may want to emphasize with a comment that 'offset = 0' is used for T_ANALOG_TV. It's somewhat hidden by its initialization early in the function.
Italy also appears to use 7 MHz VHF and 8 MHz UHF.
Regards,
Andy
Quoted 56 lines
---
linux/drivers/media/common/tuners/tuner-xc2028.c | 32 ++++++++------- 1 file changed, 19 insertions(+), 13 deletions(-)diff -r
c78c18fe3dc9-re6a8672631a0linux/drivers/media/common/tuners/tuner-xc2028.clinux/drivers/media/common/tuners/tuner-xc2028.c +19
-14@@ -921,22 +921,28 @@ static int generic_set_freq(struct dvb_f* that xc2028 will be in a safe state. * Maybe this might also be needed for DTV. */ -if (new_mode ==T_ANALOG_TV ) { +if (new_mode ==T_ANALOG_TV ) rc = send_seq(priv, {0x00, 0x00}); - }else if (priv->cur_fw.type &ATSC ) { - offset =1750000 ; - }else { - offset =2750000 ; + +/* +* Digital modes require an offset to adjust to the +* proper frequency +*/ +if (new_mode !=T_ANALOG_TV ) { +/* Sets the offset according with firmware */ +if (priv->cur_fw.type &DTV6 ) + offset =1750000 ; +if (priv->cur_fw.type &DTV7 ) + offset =2250000 ; +else /* DTV8 or DTV78 */ + offset =2750000 ; +/* -* We must adjust the offset by 500kHz in two cases in order -* to correctly center the IF output: -* 1) When the ZARLINK456 or DIBCOM52 tables were explicitly -* selected and a 7MHz channel is tuned; -* 2) When tuning a VHF channel with DTV78 firmware. +* We must adjust the offset by 500kHz when +* tuning a 7MHz VHF channel with DTV78 firmware +* (used in Australia) */ -if (((priv->cur_fw.type &DTV7 ) && - (priv->cur_fw.scode_table & (ZARLINK456 |DIBCOM52 ))) || - ((priv->cur_fw.type &DTV78 ) && freq <470000000 )) +if ((priv->cur_fw.type &DTV78 ) && freq <470000000 ) offset -=500000 ; } ---Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/e6a8672631a0f5f549f5ee5db3acac4f35013942
Hi,
Am Montag, den 01.06.2009, 20:00 -0400 schrieb Andy Walls:
Quoted 32 lines
Quoted 21 lines · Patch from Mauro Carvalho Chehab
The patch number 11918 was added via Mauro Carvalho Chehab <[email protected]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>------
From: Mauro Carvalho Chehab <[email protected]>
tuner-xc2028: Fix offset frequencies for DVB @ 6MHzBoth ATSC and DVB @ 6MHz bandwidth require the same offset.
While we're fixing it, let's cleanup the bandwidth setup to better reflect the fact that it is a function of the bandwidth.
Quoted 8 lines
Thanks to Terry Wu <[email protected]> for pointing this issue and to Andy Walls <[email protected]> for an initial patch for this fix.
Priority: normal
CC Terry Wu <[email protected]>CC Andy Walls <[email protected]>Signed-off-by Mauro Carvalho Chehab <[email protected]>
Quoted 7 lines
Acked-by Andy Walls <[email protected]>You may want to emphasize with a comment that 'offset = 0' is used for
T_ANALOG_TV. It's somewhat hidden by its initialization early in the function.Italy also appears to use 7 MHz VHF and 8 MHz UHF.
Germany too.
Cheers,
Hermann
Quoted 61 lines
Regards,
AndyQuoted 56 lines
---
linux/drivers/media/common/tuners/tuner-xc2028.c | 32 ++++++++------- 1 file changed, 19 insertions(+), 13 deletions(-)diff -r
c78c18fe3dc9-re6a8672631a0linux/drivers/media/common/tuners/tuner-xc2028.clinux/drivers/media/common/tuners/tuner-xc2028.c +19
-14@@ -921,22 +921,28 @@ static int generic_set_freq(struct dvb_f* that xc2028 will be in a safe state. * Maybe this might also be needed for DTV. */ -if (new_mode ==T_ANALOG_TV ) { +if (new_mode ==T_ANALOG_TV ) rc = send_seq(priv, {0x00, 0x00}); - }else if (priv->cur_fw.type &ATSC ) { - offset =1750000 ; - }else { - offset =2750000 ; + +/* +* Digital modes require an offset to adjust to the +* proper frequency +*/ +if (new_mode !=T_ANALOG_TV ) { +/* Sets the offset according with firmware */ +if (priv->cur_fw.type &DTV6 ) + offset =1750000 ; +if (priv->cur_fw.type &DTV7 ) + offset =2250000 ; +else /* DTV8 or DTV78 */ + offset =2750000 ; +/* -* We must adjust the offset by 500kHz in two cases in order -* to correctly center the IF output: -* 1) When the ZARLINK456 or DIBCOM52 tables were explicitly -* selected and a 7MHz channel is tuned; -* 2) When tuning a VHF channel with DTV78 firmware. +* We must adjust the offset by 500kHz when +* tuning a 7MHz VHF channel with DTV78 firmware +* (used in Australia) */ -if (((priv->cur_fw.type &DTV7 ) && - (priv->cur_fw.scode_table & (ZARLINK456 |DIBCOM52 ))) || - ((priv->cur_fw.type &DTV78 ) && freq <470000000 )) +if ((priv->cur_fw.type &DTV78 ) && freq <470000000 ) offset -=500000 ; } ---Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/e6a8672631a0f5f549f5ee5db3acac4f35013942