summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/stb0899_algo.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] stb0899: use sign_extend32() for sign extensionMartin Kepplinger2015-02-031-3/+2
| | | | | | | Instead of implement its own logic, use the already-defined one. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] stb0899: sign of CRL_FREQ doesn't depend on inversionReinhard Nißl2013-06-081-3/+1
| | | | | | | | | Contrary to CFR (derotator frequency), which changes signedness depending on inversion, CRL_FREQ does not. 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>
* [media] stb0899: use autodetected inversion instead of configured inversionReinhard Nißl2013-06-081-9/+9
| | | | | | | | | For consistency, it is necessary to use the autodetected inversion instead of the configured one. 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>
* [media] stb0899: store autodetected inversion while tuning in non S2 modeReinhard Nißl2013-06-081-0/+8
| | | | | | | | | 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>
* [media] stb0899: store successful inversion for next runReinhard Nißl2013-06-081-1/+7
| | | | | | | | | 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>
* [media] stb0899: fix inversion enum values to match usage with CFRReinhard Nißl2013-06-081-2/+2
| | | | | | | | | | | | | | | | | | | Throughout the zig-zag-implementations, inversion is taken into account when reading and writing the CFR register, which contains the derotator frequency. As swapping IQ signals changes the sign of that register for example, the idea is to compensate that sign change by multiplying the register value with the inversion enum value. The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON don't work in the case IQ_SWAP_OFF, due to the multiplication by zero (I've only found a single device which actually uses IQ_SWAP_OFF in it's config). I've changed the enum values to +1 and -1 to accommodate to the intended usage. 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>
* [media] stb0899: enable auto inversion handling unconditionallyReinhard Nißl2013-06-081-34/+29
| | | | | | | | | | | | | It seems that current inversion handling addresses only the signal routing on the PCB, i. e. IQ signals are either swapped or not. But when the device is operated in a Satellite Channel Router (SCR) environment, an additional inversion is required due to the way how the SCR works. Therefore it makes sense to me to always enable auto inversion handling and drop the enum value IQ_SWAP_AUTO. 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>
* [media] stb0899: sign extend raw CRL_FREQ valueReinhard Nißl2013-06-081-0/+4
| | | | | | | | | | Contrary to the chip's specs, the register's value is signed, so we need to sign extend the value before using it in calculations like when determining the offset frequency. 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>
* [media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab2012-08-131-0/+1525
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud