diff options
author | Manu Abraham <manu@linuxtv.org> | 2006-06-21 17:27:15 +0400 |
---|---|---|
committer | Manu Abraham <manu@linuxtv.org> | 2006-06-21 17:27:15 +0400 |
commit | c9db824090ce27869e036130fc4cd25e2ede7bce (patch) | |
tree | 1ccf69f07ccbdd9e35f5673d45d9892377a74c85 /linux/drivers/media/dvb | |
parent | 43f575078dddff45699048ba8dba7cf52584ecdc (diff) | |
download | mediapointer-dvb-s2-c9db824090ce27869e036130fc4cd25e2ede7bce.tar.gz mediapointer-dvb-s2-c9db824090ce27869e036130fc4cd25e2ede7bce.tar.bz2 |
Add support for VP-3250 ATSC card
From: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dst.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c index f0a2762b8..0e3540655 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.c +++ b/linux/drivers/media/dvb/bt8xx/dst.c @@ -363,6 +363,17 @@ static int dst_set_freq(struct dst_state *state, u32 freq) state->tx_tuna[2] = (freq >> 16) & 0xff; state->tx_tuna[3] = (freq >> 8) & 0xff; state->tx_tuna[4] = (u8) freq; + } else if (state->dst_type == DST_TYPE_IS_ATSC) { + freq = freq / 1000; + if (freq < 51000 || freq > 858000) + return -EINVAL; + state->tx_tuna[2] = (freq >> 16) & 0xff; + state->tx_tuna[3] = (freq >> 8) & 0xff; + state->tx_tuna[4] = (u8) freq; + state->tx_tuna[5] = 0x00; /* ATSC */ + state->tx_tuna[6] = 0x00; + if (state->dst_hw_cap & DST_TYPE_HAS_ANALOG) + state->tx_tuna[7] = 0x00; /* Digital */ } else return -EINVAL; @@ -557,7 +568,7 @@ static int dst_type_print(u8 type) case DST_TYPE_IS_CABLE: otype = "cable"; break; - + case DST_TYPE_IS_ATSC: otype = "atsc"; break; @@ -726,8 +737,8 @@ static struct dst_types dst_tlist[] = { .device_id = "ATSCAD", .offset = 1, .dst_type = DST_TYPE_IS_ATSC, - .type_flags = DST_TYPE_HAS_FW_2, - .dst_feature = 0 + .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD, + .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG }, { } @@ -1052,6 +1063,10 @@ static int dst_get_signal(struct dst_state *state) state->decode_lock = (state->rxbuffer[1]) ? 1 : 0; state->decode_strength = state->rxbuffer[4] << 8; state->decode_snr = state->rxbuffer[3] << 8; + } else if (state->dst_type == DST_TYPE_IS_ATSC) { + state->decode_lock = (state->rxbuffer[6] == 0x00) ? 1 : 0; + state->decode_strength = state->rxbuffer[4] << 8; + state->decode_snr = state->rxbuffer[2] << 8 | state->rxbuffer[3]; } state->cur_jiff = jiffies; } @@ -1530,7 +1545,7 @@ static struct dvb_frontend_ops dst_atsc_ops = { .symbol_rate_max = 45000000, .caps = FE_CAN_FEC_AUTO | FE_CAN_QAM_AUTO | FE_CAN_QAM_64 | FE_CAN_QAM_256 | FE_CAN_8VSB }, - + .release = dst_release, .init = dst_init, .tune = dst_set_frontend, |