• Reinhard Nißl's avatar
    [media] stb0899: fix inversion enum values to match usage with CFR · 069ebbfc
    Reinhard Nißl authored
    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: default avatarReinhard Nißl <rnissl@gmx.de>
    Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    069ebbfc
stb0899_drv.h 4.08 KB