diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-01 12:18:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-01 12:18:10 -0300 |
commit | 3cfc0ea022a646fa73ba82352c3a95af859c20f6 (patch) | |
tree | 7dec94ef3566e2b5caaef53ddb3a3e4f747811bd | |
parent | 12f7442713d7eb82fecd42660ef8714f6e7d6e94 (diff) | |
download | mediapointer-dvb-s2-3cfc0ea022a646fa73ba82352c3a95af859c20f6.tar.gz mediapointer-dvb-s2-3cfc0ea022a646fa73ba82352c3a95af859c20f6.tar.bz2 |
tuner-xc2028: Fix offset frequencies for DVB @ 6MHz
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Both 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.
Thanks to Terry Wu <terrywu2009@gmail.com> for pointing this issue and
to Andy Walls <awalls@radix.net> for an initial patch for this fix.
Priority: normal
CC: Terry Wu <terrywu2009@gmail.com>
CC: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | linux/drivers/media/common/tuners/tuner-xc2028.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/linux/drivers/media/common/tuners/tuner-xc2028.c b/linux/drivers/media/common/tuners/tuner-xc2028.c index 10becc3c0..493e8d642 100644 --- a/linux/drivers/media/common/tuners/tuner-xc2028.c +++ b/linux/drivers/media/common/tuners/tuner-xc2028.c @@ -921,22 +921,28 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, * 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; } |