• Daniel Scheller's avatar
    [media] dvb-frontends/stv0367: add Digital Devices compatibility · dbbac11e
    Daniel Scheller authored
    This - in conjunction with the previous changes - makes it possible to use
    the STV0367 DVB-C/T demodulator driver with Digital Devices hardware having
    this demodulator soldered on them (namely CineCTv6 bridges and some earlier
    DuoFlex CT addon modules).
    
    The changes do the following:
    
    - add a third *_attach function which will make use of a third frontend_ops
      struct which announces both -C and -T support (the same as with DD's own
      driver stv0367dd). This is necessary to support both delivery systems
      on one FE without having to do large conversions to VB2 or the need to
      select either -C or -T mode via modparams and the like. Additionally,
      the frontend_ops point to new "glue" functions which will then call into
      the existing functionality depending on the active delivery system/demod
      state (all used functionality works almost OOTB).
    - Demod initialisation has been ported from stv0367dd. DD's driver always
      does a full init of both OFDM and QAM cores, with some additional things.
      The active delivery system is remembered and upon switch, the Demod will
      be reconfigured to work in OFDM or QAM mode (that's what the ddb_setup_XX
      functions are used for). Note that in QAM mode, the DD demods work with
      an IC speed of 58Mhz. It's not very good to perform full reinits upon
      Demod mode changes since in very rare occasions this can lead to the I2C
      interface or the whole Demod to crash, requiring a powercycle, thus the
      flag to perform full reinit is set to disabled.
    - A little enum is added for named identifiers of the current Demod state.
    
    Initialisation code/register writes originate from stv0367dd. Permission
    to reuse was formally granted by Ralph Metzler <rjkm@metzlerbros.de>.
    Signed-off-by: default avatarDaniel Scheller <d.scheller@gmx.net>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    dbbac11e
stv0367.h 2 KB