From 4f452819df487bf792cd8ad119917122991adc26 Mon Sep 17 00:00:00 2001 From: mvoelkel Date: Wed, 31 Aug 2016 18:46:07 +0200 Subject: [PATCH] Set input IQ swap to match hardware, fiexes sign issue with offset --- frontends/stv0910.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontends/stv0910.c b/frontends/stv0910.c index fc725c8..8d3cbeb 100644 --- a/frontends/stv0910.c +++ b/frontends/stv0910.c @@ -1139,6 +1139,9 @@ static int probe(struct stv *state) write_reg(state, RSTV0910_CFGEXT, 0x02); /* CFGEXT */ write_reg(state, RSTV0910_GENCFG, 0x15); /* GENCFG */ + write_reg(state, RSTV0910_P1_TNRCFG2, 0x02); /* IQSWAP = 0 */ + write_reg(state, RSTV0910_P2_TNRCFG2, 0x82); /* IQSWAP = 1 */ + write_reg(state, RSTV0910_P1_CAR3CFG, 0x02); write_reg(state, RSTV0910_P2_CAR3CFG, 0x02); write_reg(state, RSTV0910_P1_DMDCFG4, 0x04); @@ -1251,7 +1254,7 @@ static int get_frequency_offset(struct stv *state, s32 *off) derot = ((u32) cfr2 << 16) | ((u32)cfr1 << 8) | cfr0; if (derot & (1<<23)) derot |= 0xFF000000; - *off = - (s32) (((s64) derot * (s64) state->base->mclk) >> 24); + *off = (s32) (((s64) derot * (s64) state->base->mclk) >> 24); //pr_info("foff = %d\n", *off); return 0; }