diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2013-06-02 13:59:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-08 19:14:17 -0400 |
commit | 0c1d2b14d09b862ccd6300d774eb579161635710 (patch) | |
tree | ca80497dfd440f79d65a9a5c45e5d744f82ee581 /drivers/media/dvb-frontends/stb0899_algo.c | |
parent | 55b3318b3a49488a14ccfceffde668d548c4e427 (diff) |
[media] stb0899: store successful inversion for next run
Usually, inversion doesn't change in a system. Storing the last
successful inversion value speeds up tuning of DVB-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/stb0899_algo.c')
-rw-r--r-- | drivers/media/dvb-frontends/stb0899_algo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/stb0899_algo.c b/drivers/media/dvb-frontends/stb0899_algo.c index e0d31a2ea578..4b49efb67931 100644 --- a/drivers/media/dvb-frontends/stb0899_algo.c +++ b/drivers/media/dvb-frontends/stb0899_algo.c | |||
@@ -1488,9 +1488,15 @@ enum stb0899_status stb0899_dvbs2_algo(struct stb0899_state *state) | |||
1488 | 1488 | ||
1489 | offsetfreq = offsetfreq / ((1 << 30) / 1000); | 1489 | offsetfreq = offsetfreq / ((1 << 30) / 1000); |
1490 | offsetfreq *= (internal->master_clk / 1000000); | 1490 | offsetfreq *= (internal->master_clk / 1000000); |
1491 | |||
1492 | /* store current inversion for next run */ | ||
1491 | reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); | 1493 | reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); |
1492 | if (STB0899_GETFIELD(SPECTRUM_INVERT, reg)) | 1494 | if (STB0899_GETFIELD(SPECTRUM_INVERT, reg)) |
1493 | offsetfreq *= -1; | 1495 | internal->inversion = IQ_SWAP_ON; |
1496 | else | ||
1497 | internal->inversion = IQ_SWAP_OFF; | ||
1498 | |||
1499 | offsetfreq *= internal->inversion; | ||
1494 | 1500 | ||
1495 | internal->freq = internal->freq - offsetfreq; | 1501 | internal->freq = internal->freq - offsetfreq; |
1496 | internal->srate = stb0899_dvbs2_get_srate(state); | 1502 | internal->srate = stb0899_dvbs2_get_srate(state); |