summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/bt8xx/dst.c
diff options
context:
space:
mode:
authorManu Abraham <devnull@localhost>2005-06-22 10:10:12 +0000
committerManu Abraham <devnull@localhost>2005-06-22 10:10:12 +0000
commit3d6be2afde790a151ae858fc5df2645fcc2e86db (patch)
tree72d70d028c3e5fea6f369d93d7a35d5260ec4edb /linux/drivers/media/dvb/bt8xx/dst.c
parent1e5c36d757624601bd040a727c9bd75ca86f71a2 (diff)
downloadmediapointer-dvb-s2-3d6be2afde790a151ae858fc5df2645fcc2e86db.tar.gz
mediapointer-dvb-s2-3d6be2afde790a151ae858fc5df2645fcc2e86db.tar.bz2
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 <manu@kromtek.com>
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx/dst.c')
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst.c26
1 files changed, 24 insertions, 2 deletions
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);