diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2013-06-02 15:01:18 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-08 20:14:32 -0300 |
commit | b71e2c4cd89929a1160f3a8657135a802cc23df3 (patch) | |
tree | 805ed86b6a64251738c5409c6b06edd04d3cb910 /drivers/media/dvb-frontends | |
parent | 0c1d2b14d09b862ccd6300d774eb579161635710 (diff) |
[media] stb0899: store autodetected inversion while tuning in non S2 mode
In non S2 mode, the device is able to autodetect inversion. So
let's store it for tuning to S2 transponders.
Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/stb0899_algo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/dvb-frontends/stb0899_algo.c b/drivers/media/dvb-frontends/stb0899_algo.c index 4b49efb67931..4ce542c2db4b 100644 --- a/drivers/media/dvb-frontends/stb0899_algo.c +++ b/drivers/media/dvb-frontends/stb0899_algo.c @@ -425,6 +425,14 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state) if (internal->status == DATAOK) { stb0899_read_regs(state, STB0899_CFRM, cfr, 2); /* get derotator frequency */ + + /* store autodetected IQ swapping as default for DVB-S2 tuning */ + reg = stb0899_read_reg(state, STB0899_IQSWAP); + if (STB0899_GETFIELD(SYM, reg)) + internal->inversion = IQ_SWAP_ON; + else + internal->inversion = IQ_SWAP_OFF; + internal->derot_freq = state->config->inversion * MAKEWORD16(cfr[0], cfr[1]); dprintk(state->verbose, FE_DEBUG, 1, "------> DATAOK ! Derot Freq=%d", internal->derot_freq); } |