diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-12-02 23:07:06 +1000 |
---|---|---|
committer | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2007-12-02 23:07:06 +1000 |
commit | d0188f79d5ca5c89b9106c3a99f9eefe465b5f5e (patch) | |
tree | 4413f396e670f6bb612f186412124239c8c54d5d /linux | |
parent | 00ab6c90dc98d2413de98eebf8638f1f38a365af (diff) | |
download | mediapointer-dvb-s2-d0188f79d5ca5c89b9106c3a99f9eefe465b5f5e.tar.gz mediapointer-dvb-s2-d0188f79d5ca5c89b9106c3a99f9eefe465b5f5e.tar.bz2 |
xc2028: select DTV78 firmware if tuning 7MHz VHF / 8MHz UHF
From: Chris Pascoe <c.pascoe@itee.uq.edu.au>
It seems that the DTV78 firmware is intended for use in locations where
VHF channels have 7MHz bandwidth and UHF channels have 8MHz bandwidth.
If we switch to DTV78 firmware when we detect this condition, we can
avoid firmware reloads when switching between VHF and UHF transponders.
Place the state for this in the control structure so that card drivers
can hint to us to use DTV78 firmware from the first tuning attempt.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/tuner-xc2028.c | 23 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-xc2028.h | 2 |
2 files changed, 17 insertions, 8 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c index 71756cabf..0dbb648ae 100644 --- a/linux/drivers/media/video/tuner-xc2028.c +++ b/linux/drivers/media/video/tuner-xc2028.c @@ -1013,20 +1013,27 @@ static int xc2028_set_params(struct dvb_frontend *fe, return -EINVAL; } - /* FIXME: - There are two Scodes that will never be selected: - DTV78 ZARLINK456, DTV78 DIBCOM52 - When it should opt for DTV78 instead of DTV7 or DTV8? - */ switch (bw) { case BANDWIDTH_8_MHZ: - type |= DTV8 | F8MHZ; + if (p->frequency < 470000000) + priv->ctrl.vhfbw7 = 0; + else + priv->ctrl.uhfbw8 = 1; + type |= (priv->ctrl.vhfbw7 && priv->ctrl.uhfbw8) ? DTV78 : DTV8; + type |= F8MHZ; break; case BANDWIDTH_7_MHZ: - type |= DTV7 | F8MHZ; + if (p->frequency < 470000000) + priv->ctrl.vhfbw7 = 1; + else + priv->ctrl.uhfbw8 = 0; + type |= (priv->ctrl.vhfbw7 && priv->ctrl.uhfbw8) ? DTV78 : DTV7; + type |= F8MHZ; break; case BANDWIDTH_6_MHZ: - type |= DTV6 ; + type |= DTV6; + priv->ctrl.vhfbw7 = 0; + priv->ctrl.uhfbw8 = 0; break; default: tuner_err("error: bandwidth not supported.\n"); diff --git a/linux/drivers/media/video/tuner-xc2028.h b/linux/drivers/media/video/tuner-xc2028.h index 1fe8b1959..7462629b9 100644 --- a/linux/drivers/media/video/tuner-xc2028.h +++ b/linux/drivers/media/video/tuner-xc2028.h @@ -30,6 +30,8 @@ struct xc2028_ctrl { unsigned int mts :1; unsigned int d2633 :1; unsigned int input1:1; + unsigned int vhfbw7:1; + unsigned int uhfbw8:1; unsigned int demod; }; |