summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c
index 5dc20ce19..776d1aacd 100644
--- a/linux/drivers/media/dvb/bt8xx/dst.c
+++ b/linux/drivers/media/dvb/bt8xx/dst.c
@@ -330,6 +330,7 @@ static int dst_set_freq(struct dst_state *state, u32 freq)
freq = freq / 1000;
if (freq < 950 || freq > 2150)
return -EINVAL;
+
state->tx_tuna[2] = (freq >> 8);
state->tx_tuna[3] = (u8) freq;
state->tx_tuna[4] = 0x01;
@@ -343,6 +344,7 @@ static int dst_set_freq(struct dst_state *state, u32 freq)
freq = freq / 1000;
if (freq < 137000 || freq > 858000)
return -EINVAL;
+
state->tx_tuna[2] = (freq >> 16) & 0xff;
state->tx_tuna[3] = (freq >> 8) & 0xff;
state->tx_tuna[4] = (u8) freq;
@@ -359,25 +361,37 @@ static int dst_set_freq(struct dst_state *state, u32 freq)
static int dst_set_bandwidth(struct dst_state* state, fe_bandwidth_t bandwidth)
{
- u8 *val;
-
state->bandwidth = bandwidth;
if (state->dst_type != DST_TYPE_IS_TERR)
return 0;
- val = &state->tx_tuna[0];
switch (bandwidth) {
case BANDWIDTH_6_MHZ:
- val[6] = 6;
+ if (state->dst_hw_cap & DST_TYPE_HAS_CA)
+ state->tx_tuna[7] = 0x06;
+ else {
+ state->tx_tuna[6] = 0x06;
+ state->tx_tuna[7] = 0x00;
+ }
break;
case BANDWIDTH_7_MHZ:
- val[6] = 7;
+ if (state->dst_hw_cap & DST_TYPE_HAS_CA)
+ state->tx_tuna[7] = 0x07;
+ else {
+ state->tx_tuna[6] = 0x07;
+ state->tx_tuna[7] = 0x00;
+ }
break;
case BANDWIDTH_8_MHZ:
- val[6] = 8;
+ if (state->dst_hw_cap & DST_TYPE_HAS_CA)
+ state->tx_tuna[7] = 0x08;
+ else {
+ state->tx_tuna[6] = 0x08;
+ state->tx_tuna[7] = 0x00;
+ }
break;
default: