diff options
-rw-r--r-- | drivers/media/common/tuners/tuner-xc2028.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 14649e456fdb..27e7cb6622b1 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -917,22 +917,29 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, | |||
917 | * that xc2028 will be in a safe state. | 917 | * that xc2028 will be in a safe state. |
918 | * Maybe this might also be needed for DTV. | 918 | * Maybe this might also be needed for DTV. |
919 | */ | 919 | */ |
920 | if (new_mode == T_ANALOG_TV) { | 920 | if (new_mode == T_ANALOG_TV) |
921 | rc = send_seq(priv, {0x00, 0x00}); | 921 | rc = send_seq(priv, {0x00, 0x00}); |
922 | } else if (priv->cur_fw.type & ATSC) { | 922 | |
923 | offset = 1750000; | 923 | /* |
924 | } else { | 924 | * Digital modes require an offset to adjust to the |
925 | offset = 2750000; | 925 | * proper frequency. |
926 | * Analog modes require offset = 0 | ||
927 | */ | ||
928 | if (new_mode != T_ANALOG_TV) { | ||
929 | /* Sets the offset according with firmware */ | ||
930 | if (priv->cur_fw.type & DTV6) | ||
931 | offset = 1750000; | ||
932 | else if (priv->cur_fw.type & DTV7) | ||
933 | offset = 2250000; | ||
934 | else /* DTV8 or DTV78 */ | ||
935 | offset = 2750000; | ||
936 | |||
926 | /* | 937 | /* |
927 | * We must adjust the offset by 500kHz in two cases in order | 938 | * We must adjust the offset by 500kHz when |
928 | * to correctly center the IF output: | 939 | * tuning a 7MHz VHF channel with DTV78 firmware |
929 | * 1) When the ZARLINK456 or DIBCOM52 tables were explicitly | 940 | * (used in Australia, Italy and Germany) |
930 | * selected and a 7MHz channel is tuned; | ||
931 | * 2) When tuning a VHF channel with DTV78 firmware. | ||
932 | */ | 941 | */ |
933 | if (((priv->cur_fw.type & DTV7) && | 942 | if ((priv->cur_fw.type & DTV78) && freq < 470000000) |
934 | (priv->cur_fw.scode_table & (ZARLINK456 | DIBCOM52))) || | ||
935 | ((priv->cur_fw.type & DTV78) && freq < 470000000)) | ||
936 | offset -= 500000; | 943 | offset -= 500000; |
937 | } | 944 | } |
938 | 945 | ||