]> git.baikalelectronics.ru Git - kernel.git/commit
[media] stb0899: fix inversion enum values to match usage with CFR
authorReinhard Nißl <rnissl@gmx.de>
Sun, 2 Jun 2013 17:52:43 +0000 (14:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 8 Jun 2013 23:13:29 +0000 (20:13 -0300)
commit4704bf52ff3fe6101b1b44775738bebcc9f6840b
tree2b342a89226fa90e7c14568ac0d702e4afb61695
parent5f61d6ef1a6a6444a6d2270584bbaf53f744f544
[media] stb0899: fix inversion enum values to match usage with CFR

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>
drivers/media/dvb-frontends/stb0899_algo.c
drivers/media/dvb-frontends/stb0899_drv.h