linux/drivers/media/tuners/tda9887.c

// SPDX-License-Identifier: GPL-2.0-only
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include "tuner-i2c.h"
#include "tda9887.h"


/* Chips:
   TDA9885 (PAL, NTSC)
   TDA9886 (PAL, SECAM, NTSC)
   TDA9887 (PAL, SECAM, NTSC, FM Radio)

   Used as part of several tuners
*/

static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC();

static DEFINE_MUTEX(tda9887_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list);

struct tda9887_priv {};

/* ---------------------------------------------------------------------- */

#define UNSET

struct tvnorm {};

/* ---------------------------------------------------------------------- */

//
// TDA defines
//

//// first reg (b)
#define cVideoTrapBypassOFF
#define cVideoTrapBypassON

#define cAutoMuteFmInactive
#define cAutoMuteFmActive

#define cIntercarrier
#define cQSS

#define cPositiveAmTV
#define cFmRadio
#define cNegativeFmTV


#define cForcedMuteAudioON
#define cForcedMuteAudioOFF

#define cOutputPort1Active
#define cOutputPort1Inactive

#define cOutputPort2Active
#define cOutputPort2Inactive


//// second reg (c)
#define cDeemphasisOFF
#define cDeemphasisON

#define cDeemphasis75
#define cDeemphasis50

#define cAudioGain0
#define cAudioGain6

#define cTopMask
#define cTopDefault

//// third reg (e)
#define cAudioIF_4_5
#define cAudioIF_5_5
#define cAudioIF_6_0
#define cAudioIF_6_5


#define cVideoIFMask
/* Video IF selection in TV Mode (bit B3=0) */
#define cVideoIF_58_75
#define cVideoIF_45_75
#define cVideoIF_38_90
#define cVideoIF_38_00
#define cVideoIF_33_90
#define cVideoIF_33_40
#define cRadioIF_45_75
#define cRadioIF_38_90

/* IF1 selection in Radio Mode (bit B3=1) */
#define cRadioIF_33_30
#define cRadioIF_41_30

/* Output of AFC pin in radio mode when bit E7=1 */
#define cRadioAGC_SIF
#define cRadioAGC_FM

#define cTunerGainNormal
#define cTunerGainLow

#define cGating_18
#define cGating_36

#define cAgcOutON
#define cAgcOutOFF

/* ---------------------------------------------------------------------- */

static struct tvnorm tvnorms[] =;

static struct tvnorm radio_stereo =;

static struct tvnorm radio_mono =;

/* ---------------------------------------------------------------------- */

static void dump_read_message(struct dvb_frontend *fe, unsigned char *buf)
{}

static void dump_write_message(struct dvb_frontend *fe, unsigned char *buf)
{}

/* ---------------------------------------------------------------------- */

static int tda9887_set_tvnorm(struct dvb_frontend *fe)
{}

static unsigned int port1  =;
static unsigned int port2  =;
static unsigned int qss    =;
static unsigned int adjust =;

module_param(port1, int, 0644);
module_param(port2, int, 0644);
module_param(qss, int, 0644);
module_param(adjust, int, 0644);

static int tda9887_set_insmod(struct dvb_frontend *fe)
{}

static int tda9887_do_config(struct dvb_frontend *fe)
{}

/* ---------------------------------------------------------------------- */

static int tda9887_status(struct dvb_frontend *fe)
{}

static void tda9887_configure(struct dvb_frontend *fe)
{}

/* ---------------------------------------------------------------------- */

static void tda9887_tuner_status(struct dvb_frontend *fe)
{}

static int tda9887_get_afc(struct dvb_frontend *fe, s32 *afc)
{}

static void tda9887_standby(struct dvb_frontend *fe)
{}

static void tda9887_set_params(struct dvb_frontend *fe,
			       struct analog_parameters *params)
{}

static int tda9887_set_config(struct dvb_frontend *fe, void *priv_cfg)
{}

static void tda9887_release(struct dvb_frontend *fe)
{}

static const struct analog_demod_ops tda9887_ops =;

struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe,
				    struct i2c_adapter *i2c_adap,
				    u8 i2c_addr)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();