upstream: [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)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:48:08 +0000 (11:48 +0900)
commit04fd65a43d553b41042fc304ed7565786616bd0d
tree20aaa8d980aad4a6605adff9ac3e9fb40c372317
parenta1c3d469483505d3f8b0363859149339f1dec2f8
upstream: [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