提交 86360a3e 编写于 作者: M Manu Abraham 提交者: Linus Torvalds

[PATCH] dvb: Fix 22k tone control

Signed-off-by: NManu Abraham <manu@kromtek.com>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8f6da8f1
...@@ -907,12 +907,7 @@ static int dst_tone_power_cmd(struct dst_state* state) ...@@ -907,12 +907,7 @@ static int dst_tone_power_cmd(struct dst_state* state)
return 0; return 0;
paket[4] = state->tx_tuna[4]; paket[4] = state->tx_tuna[4];
paket[2] = state->tx_tuna[2];
if (state->tone == SEC_TONE_ON)
paket[2] = 0x02;
else
paket[2] = 0;
paket[3] = state->tx_tuna[3]; paket[3] = state->tx_tuna[3];
paket[7] = dst_check_sum (paket, 7); paket[7] = dst_check_sum (paket, 7);
dst_command(state, paket, 8); dst_command(state, paket, 8);
...@@ -1094,7 +1089,6 @@ static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) ...@@ -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) static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
{ {
u8 *val;
struct dst_state* state = fe->demodulator_priv; struct dst_state* state = fe->demodulator_priv;
state->tone = tone; state->tone = tone;
...@@ -1102,20 +1096,17 @@ static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t 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) if (state->dst_type == DST_TYPE_IS_TERR)
return 0; return 0;
val = &state->tx_tuna[0];
val[8] &= ~0x1;
switch (tone) { switch (tone) {
case SEC_TONE_OFF: case SEC_TONE_OFF:
break; state->tx_tuna[2] = 0xff;
break;
case SEC_TONE_ON: case SEC_TONE_ON:
val[8] |= 1; state->tx_tuna[2] = 0x02;
break; break;
default: default:
return -EINVAL; return -EINVAL;
} }
dst_tone_power_cmd(state); dst_tone_power_cmd(state);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册