summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorAndreas Oberritter <devnull@localhost>2005-01-30 19:45:10 +0000
committerAndreas Oberritter <devnull@localhost>2005-01-30 19:45:10 +0000
commit79fd74ec4271a16be4293e863bfa90ed7004d964 (patch)
treebccc88976c39aea75fc39b6ae9a72f0e4662eec6 /linux
parent63635de82f71fea123eb1e85cccb7d984a436a02 (diff)
downloadmediapointer-dvb-s2-79fd74ec4271a16be4293e863bfa90ed7004d964.tar.gz
mediapointer-dvb-s2-79fd74ec4271a16be4293e863bfa90ed7004d964.tar.bz2
fix unhandled invert_pwm option (needed on dbox2 hardware)
submitted by Carsten Juttner <carjay@gmx.net>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/ves1x93.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1x93.c b/linux/drivers/media/dvb/frontends/ves1x93.c
index 7a147d18a..1c511ef6b 100644
--- a/linux/drivers/media/dvb/frontends/ves1x93.c
+++ b/linux/drivers/media/dvb/frontends/ves1x93.c
@@ -185,7 +185,7 @@ static int ves1x93_set_symbolrate (struct ves1x93_state* state, u32 srate)
{
u32 BDR;
u32 ratio;
- u8 ADCONF, FCONF, FNR;
+ u8 ADCONF, FCONF, FNR, AGCR;
u32 BDRI;
u32 tmp;
u32 FIN;
@@ -253,10 +253,16 @@ static int ves1x93_set_symbolrate (struct ves1x93_state* state, u32 srate)
ves1x93_writereg (state, 0x20, ADCONF);
ves1x93_writereg (state, 0x21, FCONF);
+ AGCR = state->init_1x93_tab[0x05];
+ if (state->config->invert_pwm)
+ AGCR |= 0x20;
+
if (srate < 6000000)
- ves1x93_writereg (state, 0x05, state->init_1x93_tab[0x05] | 0x80);
+ AGCR |= 0x80;
else
- ves1x93_writereg (state, 0x05, state->init_1x93_tab[0x05] & 0x7f);
+ AGCR &= ~0x80;
+
+ ves1x93_writereg (state, 0x05, AGCR);
/* ves1993 hates this, will lose lock */
if (state->demod_type != DEMOD_VES1993)