summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorManu Abraham <devnull@localhost>2005-06-22 09:30:05 +0000
committerManu Abraham <devnull@localhost>2005-06-22 09:30:05 +0000
commit3a5c74f33b09afdd82b4b2f997b831e4030a1f07 (patch)
tree21fb2326bdba2ea8049141398e6d7ae68f7d05d5 /linux
parentcff51b473649f36e65c11f9b23c55268e98e2a82 (diff)
downloadmediapointer-dvb-s2-3a5c74f33b09afdd82b4b2f997b831e4030a1f07.tar.gz
mediapointer-dvb-s2-3a5c74f33b09afdd82b4b2f997b831e4030a1f07.tar.bz2
Make the inversion setting specific, ie, only for the 200103A DVB-S
This should not be flagged on other cards.
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c46
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_common.h1
2 files changed, 22 insertions, 25 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c
index 1339912c3..3d8c57859 100644
--- a/linux/drivers/media/dvb/bt8xx/dst.c
+++ b/linux/drivers/media/dvb/bt8xx/dst.c
@@ -408,22 +408,18 @@ static int dst_set_bandwidth(struct dst_state* state, fe_bandwidth_t bandwidth)
static int dst_set_inversion(struct dst_state* state, fe_spectral_inversion_t inversion)
{
- u8 *val;
-
state->inversion = inversion;
- val = &state->tx_tuna[0];
-
- val[8] &= ~0x80;
-
switch (inversion) {
- case INVERSION_OFF:
- break;
- case INVERSION_ON:
- val[8] |= 0x80;
- break;
- default:
- return -EINVAL;
+ case INVERSION_OFF: // Inversion = Normal
+ state->tx_tuna[8] &= ~0x80;
+ break;
+
+ case INVERSION_ON:
+ state->tx_tuna[8] |= 0x80;
+ break;
+ default:
+ return -EINVAL;
}
return 0;
}
@@ -577,7 +573,7 @@ struct dst_types dst_tlist[] = {
.device_id = "200103A",
.offset = 0,
.dst_type = DST_TYPE_IS_SAT,
- .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1,
+ .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1 | DST_TYPE_HAS_OBS_REGS,
.dst_feature = 0
}, /* obsolete */
@@ -954,15 +950,8 @@ static int dst_get_tuna(struct dst_state* state)
state->decode_freq = ((state->rx_tuna[2] & 0x7f) << 8) + state->rx_tuna[3];
state->decode_lock = 1;
- /*
- dst->decode_n1 = (dst->rx_tuna[4] << 8) +
- (dst->rx_tuna[5]);
-
- dst->decode_n2 = (dst->rx_tuna[8] << 8) +
- (dst->rx_tuna[7]);
- */
state->diseq_flags |= HAS_LOCK;
- /* dst->cur_jiff = jiffies; */
+
return 1;
}
@@ -1145,7 +1134,8 @@ static int dst_init(struct dvb_frontend* fe)
static u8 ini_tvci_tuna[] = { 9, 0, 3, 0xb6, 1, 7, 0x0, 0x0, 0, 0 };
static u8 ini_cabfta_tuna[] = { 0, 0, 3, 0xb6, 1, 7, 0x0, 0x0, 0, 0 };
static u8 ini_cabci_tuna[] = { 9, 0, 3, 0xb6, 1, 7, 0x0, 0x0, 0, 0 };
- state->inversion = INVERSION_ON;
+// state->inversion = INVERSION_ON;
+ state->inversion = INVERSION_OFF;
state->voltage = SEC_VOLTAGE_13;
state->tone = SEC_TONE_OFF;
state->symbol_rate = 29473000;
@@ -1210,8 +1200,11 @@ static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet
if (verbose > 4)
dprintk("Set Frequency = [%d]\n", p->frequency);
- dst_set_inversion(state, p->inversion);
+// dst_set_inversion(state, p->inversion);
if (state->dst_type == DST_TYPE_IS_SAT) {
+ if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
+ dst_set_inversion(state, p->inversion);
+
dst_set_fec(state, p->u.qpsk.fec_inner);
dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
if (verbose > 4)
@@ -1233,8 +1226,11 @@ static int dst_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet
struct dst_state* state = fe->demodulator_priv;
p->frequency = state->decode_freq;
- p->inversion = state->inversion;
+// p->inversion = state->inversion;
if (state->dst_type == DST_TYPE_IS_SAT) {
+ if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
+ p->inversion = state->inversion;
+
p->u.qpsk.symbol_rate = state->symbol_rate;
p->u.qpsk.fec_inner = dst_get_fec(state);
} else if (state->dst_type == DST_TYPE_IS_TERR) {
diff --git a/linux/drivers/media/dvb/bt8xx/dst_common.h b/linux/drivers/media/dvb/bt8xx/dst_common.h
index 0b3da2924..1c4d0aeb3 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_common.h
+++ b/linux/drivers/media/dvb/bt8xx/dst_common.h
@@ -47,6 +47,7 @@
#define DST_TYPE_HAS_FW_2 16
#define DST_TYPE_HAS_FW_3 32
#define DST_TYPE_HAS_FW_BUILD 64
+#define DST_TYPE_HAS_OBS_REGS 128
/* Card capability list */