diff options
author | Manu Abraham <devnull@localhost> | 2005-06-22 09:53:02 +0000 |
---|---|---|
committer | Manu Abraham <devnull@localhost> | 2005-06-22 09:53:02 +0000 |
commit | f7c7e6c5aff81450875557502e198e76babf229d (patch) | |
tree | b8027fac41659752b733828c1bdf8d485e7763c3 | |
parent | 373fd368605a1fa30c07355d7feabdfb16d84f2e (diff) | |
download | mediapointer-dvb-s2-f7c7e6c5aff81450875557502e198e76babf229d.tar.gz mediapointer-dvb-s2-f7c7e6c5aff81450875557502e198e76babf229d.tar.bz2 |
Make the bandwidth setting generic such that it supports more DVB-T cards
Signed-off-by: Manu Abraham <manu@kromtek.com>
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.c | 26 |
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: |