diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2006-06-21 09:27:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:14 -0400 |
commit | ed3d1065a4aa7b1e8e5d35ece0eeeafa5bfa6bd1 (patch) | |
tree | 2ce6a014cb86b6f7444e22b15a276eb5c2fb7aaa /drivers/media/dvb | |
parent | bc7386ba43c4e06e1fdf150c37ea6cbd778fb00c (diff) |
V4L/DVB (4157): Add support for VP-3250 ATSC card
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 755d800c0802..0e35406557e3 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -363,6 +363,17 @@ static int dst_set_freq(struct dst_state *state, u32 freq) | |||
363 | state->tx_tuna[2] = (freq >> 16) & 0xff; | 363 | state->tx_tuna[2] = (freq >> 16) & 0xff; |
364 | state->tx_tuna[3] = (freq >> 8) & 0xff; | 364 | state->tx_tuna[3] = (freq >> 8) & 0xff; |
365 | state->tx_tuna[4] = (u8) freq; | 365 | state->tx_tuna[4] = (u8) freq; |
366 | } else if (state->dst_type == DST_TYPE_IS_ATSC) { | ||
367 | freq = freq / 1000; | ||
368 | if (freq < 51000 || freq > 858000) | ||
369 | return -EINVAL; | ||
370 | state->tx_tuna[2] = (freq >> 16) & 0xff; | ||
371 | state->tx_tuna[3] = (freq >> 8) & 0xff; | ||
372 | state->tx_tuna[4] = (u8) freq; | ||
373 | state->tx_tuna[5] = 0x00; /* ATSC */ | ||
374 | state->tx_tuna[6] = 0x00; | ||
375 | if (state->dst_hw_cap & DST_TYPE_HAS_ANALOG) | ||
376 | state->tx_tuna[7] = 0x00; /* Digital */ | ||
366 | } else | 377 | } else |
367 | return -EINVAL; | 378 | return -EINVAL; |
368 | 379 | ||
@@ -726,8 +737,8 @@ static struct dst_types dst_tlist[] = { | |||
726 | .device_id = "ATSCAD", | 737 | .device_id = "ATSCAD", |
727 | .offset = 1, | 738 | .offset = 1, |
728 | .dst_type = DST_TYPE_IS_ATSC, | 739 | .dst_type = DST_TYPE_IS_ATSC, |
729 | .type_flags = DST_TYPE_HAS_FW_2, | 740 | .type_flags = DST_TYPE_HAS_NEWTUNE | DST_TYPE_HAS_FW_2 | DST_TYPE_HAS_FW_BUILD, |
730 | .dst_feature = 0 | 741 | .dst_feature = DST_TYPE_HAS_MAC | DST_TYPE_HAS_ANALOG |
731 | }, | 742 | }, |
732 | 743 | ||
733 | { } | 744 | { } |
@@ -1052,6 +1063,10 @@ static int dst_get_signal(struct dst_state *state) | |||
1052 | state->decode_lock = (state->rxbuffer[1]) ? 1 : 0; | 1063 | state->decode_lock = (state->rxbuffer[1]) ? 1 : 0; |
1053 | state->decode_strength = state->rxbuffer[4] << 8; | 1064 | state->decode_strength = state->rxbuffer[4] << 8; |
1054 | state->decode_snr = state->rxbuffer[3] << 8; | 1065 | state->decode_snr = state->rxbuffer[3] << 8; |
1066 | } else if (state->dst_type == DST_TYPE_IS_ATSC) { | ||
1067 | state->decode_lock = (state->rxbuffer[6] == 0x00) ? 1 : 0; | ||
1068 | state->decode_strength = state->rxbuffer[4] << 8; | ||
1069 | state->decode_snr = state->rxbuffer[2] << 8 | state->rxbuffer[3]; | ||
1055 | } | 1070 | } |
1056 | state->cur_jiff = jiffies; | 1071 | state->cur_jiff = jiffies; |
1057 | } | 1072 | } |