summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorManu Abraham <manu@kromtek.com>2005-05-28 15:51:51 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-28 16:46:10 -0700
commit86360a3edeb6b7b6230dc13ef6835d2851409502 (patch)
tree654e06d466ae9b746739cb4a4f0b11dce88d080d /drivers/media
parent8f6da8f166228c1720d16216a9d82d630c58de57 (diff)
[PATCH] dvb: Fix 22k tone control
Signed-off-by: Manu Abraham <manu@kromtek.com> Cc: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/bt8xx/dst.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 33cca69d67a7..8104240a2208 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -907,12 +907,7 @@ static int dst_tone_power_cmd(struct dst_state* state)
return 0;
paket[4] = state->tx_tuna[4];
-
- if (state->tone == SEC_TONE_ON)
- paket[2] = 0x02;
- else
- paket[2] = 0;
-
+ paket[2] = state->tx_tuna[2];
paket[3] = state->tx_tuna[3];
paket[7] = dst_check_sum (paket, 7);
dst_command(state, paket, 8);
@@ -1094,7 +1089,6 @@ static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage)
static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
{
- u8 *val;
struct dst_state* state = fe->demodulator_priv;
state->tone = tone;
@@ -1102,20 +1096,17 @@ static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
if (state->dst_type == DST_TYPE_IS_TERR)
return 0;
- val = &state->tx_tuna[0];
-
- val[8] &= ~0x1;
-
switch (tone) {
- case SEC_TONE_OFF:
- break;
+ case SEC_TONE_OFF:
+ state->tx_tuna[2] = 0xff;
+ break;
- case SEC_TONE_ON:
- val[8] |= 1;
- break;
+ case SEC_TONE_ON:
+ state->tx_tuna[2] = 0x02;
+ break;
- default:
- return -EINVAL;
+ default:
+ return -EINVAL;
}
dst_tone_power_cmd(state);