#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <linux/dvb/frontend.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/unaligned.h>
#include <media/dvb_frontend.h>
#include "xc4000.h"
#include "tuner-i2c.h"
#include "xc2028-types.h"
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
static int no_poweroff;
module_param(no_poweroff, int, 0644);
MODULE_PARM_DESC(…) …;
static int audio_std;
module_param(audio_std, int, 0644);
MODULE_PARM_DESC(…) …;
static char firmware_name[30];
module_param_string(…);
MODULE_PARM_DESC(…) …;
static DEFINE_MUTEX(xc4000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list);
#define dprintk(level, fmt, arg...) …
struct firmware_description { … };
struct firmware_properties { … };
struct xc4000_priv { … };
#define XC4000_AUDIO_STD_B …
#define XC4000_AUDIO_STD_A2 …
#define XC4000_AUDIO_STD_K3 …
#define XC4000_AUDIO_STD_L …
#define XC4000_AUDIO_STD_INPUT1 …
#define XC4000_AUDIO_STD_MONO …
#define XC4000_DEFAULT_FIRMWARE …
#define XC4000_DEFAULT_FIRMWARE_NEW …
#define MAX_TV_STANDARD …
#define XC_MAX_I2C_WRITE_LENGTH …
#define XC_POWERED_DOWN …
#define XC_RF_MODE_AIR …
#define XC_RF_MODE_CABLE …
#define XC_PRODUCT_ID_FW_NOT_LOADED …
#define XC_PRODUCT_ID_XC4000 …
#define XC_PRODUCT_ID_XC4100 …
#define XREG_INIT …
#define XREG_VIDEO_MODE …
#define XREG_AUDIO_MODE …
#define XREG_RF_FREQ …
#define XREG_D_CODE …
#define XREG_DIRECTSITTING_MODE …
#define XREG_SEEK_MODE …
#define XREG_POWER_DOWN …
#define XREG_SIGNALSOURCE …
#define XREG_SMOOTHEDCVBS …
#define XREG_AMPLITUDE …
#define XREG_ADC_ENV …
#define XREG_QUALITY …
#define XREG_FRAME_LINES …
#define XREG_HSYNC_FREQ …
#define XREG_LOCK …
#define XREG_FREQ_ERROR …
#define XREG_SNR …
#define XREG_VERSION …
#define XREG_PRODUCT_ID …
#define XREG_SIGNAL_LEVEL …
#define XREG_NOISE_LEVEL …
struct XC_TV_STANDARD { … };
#define XC4000_MN_NTSC_PAL_BTSC …
#define XC4000_MN_NTSC_PAL_A2 …
#define XC4000_MN_NTSC_PAL_EIAJ …
#define XC4000_MN_NTSC_PAL_Mono …
#define XC4000_BG_PAL_A2 …
#define XC4000_BG_PAL_NICAM …
#define XC4000_BG_PAL_MONO …
#define XC4000_I_PAL_NICAM …
#define XC4000_I_PAL_NICAM_MONO …
#define XC4000_DK_PAL_A2 …
#define XC4000_DK_PAL_NICAM …
#define XC4000_DK_PAL_MONO …
#define XC4000_DK_SECAM_A2DK1 …
#define XC4000_DK_SECAM_A2LDK3 …
#define XC4000_DK_SECAM_A2MONO …
#define XC4000_DK_SECAM_NICAM …
#define XC4000_L_SECAM_NICAM …
#define XC4000_LC_SECAM_NICAM …
#define XC4000_DTV6 …
#define XC4000_DTV8 …
#define XC4000_DTV7_8 …
#define XC4000_DTV7 …
#define XC4000_FM_Radio_INPUT2 …
#define XC4000_FM_Radio_INPUT1 …
static struct XC_TV_STANDARD xc4000_standard[MAX_TV_STANDARD] = …;
static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val);
static int xc4000_tuner_reset(struct dvb_frontend *fe);
static void xc_debug_dump(struct xc4000_priv *priv);
static int xc_send_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
{ … }
static int xc4000_tuner_reset(struct dvb_frontend *fe)
{ … }
static int xc_write_reg(struct xc4000_priv *priv, u16 regAddr, u16 i2cData)
{ … }
static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence)
{ … }
static int xc_set_tv_standard(struct xc4000_priv *priv,
u16 video_mode, u16 audio_mode)
{ … }
static int xc_set_signal_source(struct xc4000_priv *priv, u16 rf_mode)
{ … }
static const struct dvb_tuner_ops xc4000_tuner_ops;
static int xc_set_rf_frequency(struct xc4000_priv *priv, u32 freq_hz)
{ … }
static int xc_get_adc_envelope(struct xc4000_priv *priv, u16 *adc_envelope)
{ … }
static int xc_get_frequency_error(struct xc4000_priv *priv, u32 *freq_error_hz)
{ … }
static int xc_get_lock_status(struct xc4000_priv *priv, u16 *lock_status)
{ … }
static int xc_get_version(struct xc4000_priv *priv,
u8 *hw_majorversion, u8 *hw_minorversion,
u8 *fw_majorversion, u8 *fw_minorversion)
{ … }
static int xc_get_hsync_freq(struct xc4000_priv *priv, u32 *hsync_freq_hz)
{ … }
static int xc_get_frame_lines(struct xc4000_priv *priv, u16 *frame_lines)
{ … }
static int xc_get_quality(struct xc4000_priv *priv, u16 *quality)
{ … }
static int xc_get_signal_level(struct xc4000_priv *priv, u16 *signal)
{ … }
static int xc_get_noise_level(struct xc4000_priv *priv, u16 *noise)
{ … }
static u16 xc_wait_for_lock(struct xc4000_priv *priv)
{ … }
static int xc_tune_channel(struct xc4000_priv *priv, u32 freq_hz)
{ … }
static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val)
{ … }
#define dump_firm_type(t) …
static void dump_firm_type_and_int_freq(unsigned int type, u16 int_freq)
{ … }
static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id)
{ … }
static int load_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id)
{ … }
static int xc4000_fwupload(struct dvb_frontend *fe)
{ … }
static int load_scode(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id, __u16 int_freq, int scode)
{ … }
static int check_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id std, __u16 int_freq)
{ … }
static void xc_debug_dump(struct xc4000_priv *priv)
{ … }
static int xc4000_set_params(struct dvb_frontend *fe)
{ … }
static int xc4000_set_analog_params(struct dvb_frontend *fe,
struct analog_parameters *params)
{ … }
static int xc4000_get_signal(struct dvb_frontend *fe, u16 *strength)
{ … }
static int xc4000_get_frequency(struct dvb_frontend *fe, u32 *freq)
{ … }
static int xc4000_get_bandwidth(struct dvb_frontend *fe, u32 *bw)
{ … }
static int xc4000_get_status(struct dvb_frontend *fe, u32 *status)
{ … }
static int xc4000_sleep(struct dvb_frontend *fe)
{ … }
static int xc4000_init(struct dvb_frontend *fe)
{ … }
static void xc4000_release(struct dvb_frontend *fe)
{ … }
static const struct dvb_tuner_ops xc4000_tuner_ops = …;
struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c,
struct xc4000_config *cfg)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);