diff options
Diffstat (limited to 'drivers/media/dvb/bt8xx/dst.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index e5e8c3e869c5..33cca69d67a7 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -906,10 +906,7 @@ static int dst_tone_power_cmd(struct dst_state* state) | |||
906 | if (state->dst_type == DST_TYPE_IS_TERR) | 906 | if (state->dst_type == DST_TYPE_IS_TERR) |
907 | return 0; | 907 | return 0; |
908 | 908 | ||
909 | if (state->voltage == SEC_VOLTAGE_OFF) | 909 | paket[4] = state->tx_tuna[4]; |
910 | paket[4] = 0; | ||
911 | else | ||
912 | paket[4] = 1; | ||
913 | 910 | ||
914 | if (state->tone == SEC_TONE_ON) | 911 | if (state->tone == SEC_TONE_ON) |
915 | paket[2] = 0x02; | 912 | paket[2] = 0x02; |
@@ -1062,7 +1059,6 @@ static int dst_set_diseqc(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* | |||
1062 | 1059 | ||
1063 | static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | 1060 | static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) |
1064 | { | 1061 | { |
1065 | u8 *val; | ||
1066 | int need_cmd; | 1062 | int need_cmd; |
1067 | struct dst_state* state = fe->demodulator_priv; | 1063 | struct dst_state* state = fe->demodulator_priv; |
1068 | 1064 | ||
@@ -1072,29 +1068,23 @@ static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | |||
1072 | return 0; | 1068 | return 0; |
1073 | 1069 | ||
1074 | need_cmd = 0; | 1070 | need_cmd = 0; |
1075 | val = &state->tx_tuna[0]; | ||
1076 | val[8] &= ~0x40; | ||
1077 | switch (voltage) { | 1071 | switch (voltage) { |
1078 | case SEC_VOLTAGE_13: | 1072 | case SEC_VOLTAGE_13: |
1079 | if ((state->diseq_flags & HAS_POWER) == 0) | 1073 | case SEC_VOLTAGE_18: |
1080 | need_cmd = 1; | 1074 | if ((state->diseq_flags & HAS_POWER) == 0) |
1081 | state->diseq_flags |= HAS_POWER; | 1075 | need_cmd = 1; |
1082 | break; | 1076 | state->diseq_flags |= HAS_POWER; |
1077 | state->tx_tuna[4] = 0x01; | ||
1078 | break; | ||
1083 | 1079 | ||
1084 | case SEC_VOLTAGE_18: | 1080 | case SEC_VOLTAGE_OFF: |
1085 | if ((state->diseq_flags & HAS_POWER) == 0) | ||
1086 | need_cmd = 1; | 1081 | need_cmd = 1; |
1087 | state->diseq_flags |= HAS_POWER; | 1082 | state->diseq_flags &= ~(HAS_POWER | HAS_LOCK | ATTEMPT_TUNE); |
1088 | val[8] |= 0x40; | 1083 | state->tx_tuna[4] = 0x00; |
1089 | break; | 1084 | break; |
1090 | |||
1091 | case SEC_VOLTAGE_OFF: | ||
1092 | need_cmd = 1; | ||
1093 | state->diseq_flags &= ~(HAS_POWER | HAS_LOCK | ATTEMPT_TUNE); | ||
1094 | break; | ||
1095 | 1085 | ||
1096 | default: | 1086 | default: |
1097 | return -EINVAL; | 1087 | return -EINVAL; |
1098 | } | 1088 | } |
1099 | if (need_cmd) | 1089 | if (need_cmd) |
1100 | dst_tone_power_cmd(state); | 1090 | dst_tone_power_cmd(state); |