diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/common/tuners/tuner-xc2028.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index bdcbfd740f02..27555995f7e4 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -962,14 +962,24 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, | |||
962 | * For DTV 7/8, the firmware uses BW = 8000, so it needs a | 962 | * For DTV 7/8, the firmware uses BW = 8000, so it needs a |
963 | * further adjustment to get the frequency center on VHF | 963 | * further adjustment to get the frequency center on VHF |
964 | */ | 964 | */ |
965 | |||
966 | /* | ||
967 | * The firmware DTV78 used to work fine in UHF band (8 MHz | ||
968 | * bandwidth) but not at all in VHF band (7 MHz bandwidth). | ||
969 | * The real problem was connected to the formula used to | ||
970 | * calculate the center frequency offset in VHF band. | ||
971 | * In fact, removing the 500KHz adjustment fixed the problem. | ||
972 | * This is coherent to what was implemented for the DTV7 | ||
973 | * firmware. | ||
974 | * In the end, now the center frequency is the same for all 3 | ||
975 | * firmwares (DTV7, DTV8, DTV78) and doesn't depend on channel | ||
976 | * bandwidth. | ||
977 | */ | ||
978 | |||
965 | if (priv->cur_fw.type & DTV6) | 979 | if (priv->cur_fw.type & DTV6) |
966 | offset = 1750000; | 980 | offset = 1750000; |
967 | else if (priv->cur_fw.type & DTV7) | 981 | else /* DTV7 or DTV8 or DTV78 */ |
968 | offset = 2250000; | ||
969 | else /* DTV8 or DTV78 */ | ||
970 | offset = 2750000; | 982 | offset = 2750000; |
971 | if ((priv->cur_fw.type & DTV78) && freq < 470000000) | ||
972 | offset -= 500000; | ||
973 | 983 | ||
974 | /* | 984 | /* |
975 | * xc3028 additional "magic" | 985 | * xc3028 additional "magic" |
@@ -979,17 +989,13 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */, | |||
979 | * newer firmwares | 989 | * newer firmwares |
980 | */ | 990 | */ |
981 | 991 | ||
982 | #if 1 | ||
983 | /* | 992 | /* |
984 | * The proper adjustment would be to do it at s-code table. | 993 | * The proper adjustment would be to do it at s-code table. |
985 | * However, this didn't work, as reported by | 994 | * However, this didn't work, as reported by |
986 | * Robert Lowery <rglowery@exemail.com.au> | 995 | * Robert Lowery <rglowery@exemail.com.au> |
987 | */ | 996 | */ |
988 | 997 | ||
989 | if (priv->cur_fw.type & DTV7) | 998 | #if 0 |
990 | offset += 500000; | ||
991 | |||
992 | #else | ||
993 | /* | 999 | /* |
994 | * Still need tests for XC3028L (firmware 3.2 or upper) | 1000 | * Still need tests for XC3028L (firmware 3.2 or upper) |
995 | * So, for now, let's just comment the per-firmware | 1001 | * So, for now, let's just comment the per-firmware |