]> err.no Git - linux-2.6/commitdiff
[PATCH] dvb: dst: fix DST DVB-S get_frequency
authorTom Hughes <tom@compton.nu>
Wed, 9 Nov 2005 05:35:22 +0000 (21:35 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:02 +0000 (07:56 -0800)
fix DST DVB-S get_frequency

 - fixes a bug that caused the returned frequency to wrong

Signed-off-by: Tom Hughes <tom@compton.nu>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/bt8xx/dst.c

index 418ffbbef96695937c425cd15a3e88b3e3893da1..bc833a55438fedbdaa1d29d3b5a193769e432f63 100644 (file)
@@ -1092,7 +1092,13 @@ static int dst_get_tuna(struct dst_state *state)
        }
        if (state->rx_tuna[2] == 0 && state->rx_tuna[3] == 0)
                return 0;
-       state->decode_freq = ((state->rx_tuna[2] & 0x7f) << 8) + state->rx_tuna[3];
+
+       if (state->dst_type == DST_TYPE_IS_SAT) {
+               state->decode_freq = ((state->rx_tuna[2] & 0x7f) << 8) + state->rx_tuna[3];
+       } else {
+               state->decode_freq = ((state->rx_tuna[2] & 0x7f) << 16) + (state->rx_tuna[3] << 8) + state->rx_tuna[4];
+       }
+       state->decode_freq = state->decode_freq * 1000;
        state->decode_lock = 1;
        state->diseq_flags |= HAS_LOCK;