linux/drivers/media/tuners/tea5767.c

// SPDX-License-Identifier: GPL-2.0
// For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview
// I2C address is always 0xC0.
//
// Copyright (c) 2005 Mauro Carvalho Chehab <[email protected]>
//
// tea5767 autodetection thanks to Torsten Seeboth and Atsushi Nakagawa
// from their contributions on DScaler.

#define pr_fmt(fmt)

#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include "tuner-i2c.h"
#include "tea5767.h"

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

/*****************************************************************************/

struct tea5767_priv {};

/*****************************************************************************/

/******************************
 * Write mode register values *
 ******************************/

/* First register */
#define TEA5767_MUTE
#define TEA5767_SEARCH
/* Bits 0-5 for divider MSB */

/* Second register */
/* Bits 0-7 for divider LSB */

/* Third register */

/* Station search from botton to up */
#define TEA5767_SEARCH_UP

/* Searches with ADC output = 10 */
#define TEA5767_SRCH_HIGH_LVL

/* Searches with ADC output = 10 */
#define TEA5767_SRCH_MID_LVL

/* Searches with ADC output = 5 */
#define TEA5767_SRCH_LOW_LVL

/* if on, div=4*(Frf+Fif)/Fref otherwise, div=4*(Frf-Fif)/Freq) */
#define TEA5767_HIGH_LO_INJECT

/* Disable stereo */
#define TEA5767_MONO

/* Disable right channel and turns to mono */
#define TEA5767_MUTE_RIGHT

/* Disable left channel and turns to mono */
#define TEA5767_MUTE_LEFT

#define TEA5767_PORT1_HIGH

/* Fourth register */
#define TEA5767_PORT2_HIGH
/* Chips stops working. Only I2C bus remains on */
#define TEA5767_STDBY

/* Japan freq (76-108 MHz. If disabled, 87.5-108 MHz */
#define TEA5767_JAPAN_BAND

/* Unselected means 32.768 KHz freq as reference. Otherwise Xtal at 13 MHz */
#define TEA5767_XTAL_32768

/* Cuts weak signals */
#define TEA5767_SOFT_MUTE

/* Activates high cut control */
#define TEA5767_HIGH_CUT_CTRL

/* Activates stereo noise control */
#define TEA5767_ST_NOISE_CTL

/* If activate PORT 1 indicates SEARCH or else it is used as PORT1 */
#define TEA5767_SRCH_IND

/* Fifth register */

/* By activating, it will use Xtal at 13 MHz as reference for divider */
#define TEA5767_PLLREF_ENABLE

/* By activating, deemphasis=50, or else, deemphasis of 50us */
#define TEA5767_DEEMPH_75

/*****************************
 * Read mode register values *
 *****************************/

/* First register */
#define TEA5767_READY_FLAG_MASK
#define TEA5767_BAND_LIMIT_MASK
/* Bits 0-5 for divider MSB after search or preset */

/* Second register */
/* Bits 0-7 for divider LSB after search or preset */

/* Third register */
#define TEA5767_STEREO_MASK
#define TEA5767_IF_CNTR_MASK

/* Fourth register */
#define TEA5767_ADC_LEVEL_MASK

/* should be 0 */
#define TEA5767_CHIP_ID_MASK

/* Fifth register */
/* Reserved for future extensions */
#define TEA5767_RESERVED_MASK

/*****************************************************************************/

static void tea5767_status_dump(struct tea5767_priv *priv,
				unsigned char *buffer)
{}

/* Freq should be specifyed at 62.5 Hz */
static int set_radio_freq(struct dvb_frontend *fe,
			  struct analog_parameters *params)
{}

static int tea5767_read_status(struct dvb_frontend *fe, char *buffer)
{}

static inline int tea5767_signal(struct dvb_frontend *fe, const char *buffer)
{}

static inline int tea5767_stereo(struct dvb_frontend *fe, const char *buffer)
{}

static int tea5767_get_status(struct dvb_frontend *fe, u32 *status)
{}

static int tea5767_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
{}

static int tea5767_standby(struct dvb_frontend *fe)
{}

int tea5767_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
{}

static void tea5767_release(struct dvb_frontend *fe)
{}

static int tea5767_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{}

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

static const struct dvb_tuner_ops tea5767_tuner_ops =;

struct dvb_frontend *tea5767_attach(struct dvb_frontend *fe,
				    struct i2c_adapter* i2c_adap,
				    u8 i2c_addr)
{}

EXPORT_SYMBOL_GPL();
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();