From 3d6be2afde790a151ae858fc5df2645fcc2e86db Mon Sep 17 00:00:00 2001 From: Manu Abraham Date: Wed, 22 Jun 2005 10:10:12 +0000 Subject: Fix a bug that caused the polarization not to be set. Set polarization for cards that do not autodetect polarization Signed-off-by: Manu Abraham --- linux/drivers/media/dvb/bt8xx/dst.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/dvb/bt8xx/dst.c') diff --git a/linux/drivers/media/dvb/bt8xx/dst.c b/linux/drivers/media/dvb/bt8xx/dst.c index b6349ab12..68eb6354d 100644 --- a/linux/drivers/media/dvb/bt8xx/dst.c +++ b/linux/drivers/media/dvb/bt8xx/dst.c @@ -320,6 +320,27 @@ int read_dst(struct dst_state *state, u8 * ret, u8 len) } EXPORT_SYMBOL(read_dst); +static int dst_set_polarization(struct dst_state *state) +{ + switch (state->voltage) { + case SEC_VOLTAGE_13: // vertical + printk("%s: Polarization=[Vertical]\n", __FUNCTION__); + state->tx_tuna[8] |= 0x40; //1 + break; + + case SEC_VOLTAGE_18: // horizontal + printk("%s: Polarization=[Horizontal]\n", __FUNCTION__); + state->tx_tuna[8] =~ 0x40; // 0 + break; + + case SEC_VOLTAGE_OFF: + + break; + } + + return 0; +} + static int dst_set_freq(struct dst_state *state, u32 freq) { state->frequency = freq; @@ -1237,7 +1258,7 @@ static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet dst_set_freq(state, p->frequency); if (verbose > 4) - dprintk("Set Frequency = [%d]\n", p->frequency); + dprintk("Set Frequency=[%d]\n", p->frequency); // dst_set_inversion(state, p->inversion); if (state->dst_type == DST_TYPE_IS_SAT) { @@ -1246,8 +1267,9 @@ static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet dst_set_fec(state, p->u.qpsk.fec_inner); dst_set_symbolrate(state, p->u.qpsk.symbol_rate); + dst_set_polarization(state); if (verbose > 4) - dprintk("Set Symbolrate = [%d]\n", p->u.qpsk.symbol_rate); + dprintk("Set Symbolrate=[%d]\n", p->u.qpsk.symbol_rate); } else if (state->dst_type == DST_TYPE_IS_TERR) { dst_set_bandwidth(state, p->u.ofdm.bandwidth); -- cgit v1.2.3