13. Frontend drivers¶
13.1. Frontend attach headers¶
-
struct
a8293_platform_data¶ Platform data for the a8293 driver
Definition
struct a8293_platform_data {
struct dvb_frontend *dvb_frontend;
};
Members
dvb_frontendDVB frontend.
-
struct
af9013_platform_data¶ Platform data for the af9013 driver
Definition
struct af9013_platform_data {
u32 clk;
#define AF9013_TUNER_MXL5003D 3 ;
#define AF9013_TUNER_MXL5005D 13 ;
#define AF9013_TUNER_MXL5005R 30 ;
#define AF9013_TUNER_ENV77H11D5 129 ;
#define AF9013_TUNER_MT2060 130 ;
#define AF9013_TUNER_MC44S803 133 ;
#define AF9013_TUNER_QT1010 134 ;
#define AF9013_TUNER_UNKNOWN 140 ;
#define AF9013_TUNER_MT2060_2 147 ;
#define AF9013_TUNER_TDA18271 156 ;
#define AF9013_TUNER_QT1010A 162 ;
#define AF9013_TUNER_MXL5007T 177 ;
#define AF9013_TUNER_TDA18218 179 ;
u8 tuner;
u32 if_frequency;
#define AF9013_TS_MODE_USB 0;
#define AF9013_TS_MODE_PARALLEL 1;
#define AF9013_TS_MODE_SERIAL 2;
u8 ts_mode;
u8 ts_output_pin;
bool spec_inv;
u8 api_version[4];
#define AF9013_GPIO_ON (1 << 0);
#define AF9013_GPIO_EN (1 << 1);
#define AF9013_GPIO_O (1 << 2);
#define AF9013_GPIO_I (1 << 3);
#define AF9013_GPIO_LO (AF9013_GPIO_ON|AF9013_GPIO_EN);
#define AF9013_GPIO_HI (AF9013_GPIO_ON|AF9013_GPIO_EN|AF9013_GPIO_O);
#define AF9013_GPIO_TUNER_ON (AF9013_GPIO_ON|AF9013_GPIO_EN);
#define AF9013_GPIO_TUNER_OFF (AF9013_GPIO_ON|AF9013_GPIO_EN|AF9013_GPIO_O);
u8 gpio[4];
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
int (*pid_filter_ctrl)(struct dvb_frontend *, int);
int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
};
Members
clkClock frequency.
tunerUsed tuner model.
if_frequencyIF frequency.
ts_modeTS mode.
ts_output_pinTS output pin.
spec_invInput spectrum inverted.
api_versionFirmware API version.
gpioGPIOs.
get_dvb_frontendGet DVB frontend callback.
get_i2c_adapterGet I2C adapter.
pid_filter_ctrlControl PID filter.
pid_filterSet PID to PID filter.
-
struct
ascot2e_config¶ the configuration of Ascot2E tuner driver
Definition
struct ascot2e_config {
u8 i2c_address;
u8 xtal_freq_mhz;
void *set_tuner_priv;
int (*set_tuner_callback)(void *, int);
};
Members
i2c_addressI2C address of the tuner
xtal_freq_mhzOscillator frequency, MHz
set_tuner_privCallback function private context
set_tuner_callbackCallback function that notifies the parent driver which tuner is active now
-
struct dvb_frontend *
ascot2e_attach(struct dvb_frontend * fe, const struct ascot2e_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * fefrontend to be attached
const struct ascot2e_config * configpointer to
struct ascot2e_configwith tuner configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct
cxd2820r_platform_data¶ Platform data for the cxd2820r driver
Definition
struct cxd2820r_platform_data {
u8 ts_mode;
bool ts_clk_inv;
bool if_agc_polarity;
bool spec_inv;
int **gpio_chip_base;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
};
Members
ts_modeTS mode.
ts_clk_invTS clock inverted.
if_agc_polarityIF AGC polarity.
spec_invInput spectrum inverted.
gpio_chip_baseGPIO.
get_dvb_frontendGet DVB frontend.
-
struct
cxd2820r_config¶ configuration for cxd2020r demod
Definition
struct cxd2820r_config {
u8 i2c_address;
u8 ts_mode;
bool ts_clock_inv;
bool if_agc_polarity;
bool spec_inv;
};
Members
i2c_addressDemodulator I2C address. Driver determines DVB-C slave I2C address automatically from master address. Default: none, must set. Values: 0x6c, 0x6d.
ts_modeTS output mode. Default: none, must set. Values: FIXME?
ts_clock_invTS clock inverted. Default: 0. Values: 0, 1.
if_agc_polarityDefault: 0. Values: 0, 1
spec_invSpectrum inversion. Default: 0. Values: 0, 1.
-
struct dvb_frontend *
cxd2820r_attach(const struct cxd2820r_config * config, struct i2c_adapter * i2c, int * gpio_chip_base)¶
Parameters
const struct cxd2820r_config * configpointer to
struct cxd2820r_configwith demod configuration.struct i2c_adapter * i2ci2c adapter to use.
int * gpio_chip_baseif zero, disables GPIO setting. Otherwise, if CONFIG_GPIOLIB is set dynamically allocate gpio base; if is not set, use its value to setup the GPIO pins.
Return
FE pointer on success, NULL on failure.
-
struct
drxk_config¶ Configure the initial parameters for DRX-K
Definition
struct drxk_config {
u8 adr;
bool single_master;
bool no_i2c_bridge;
bool parallel_ts;
bool dynamic_clk;
bool enable_merr_cfg;
bool antenna_dvbt;
u16 antenna_gpio;
u8 mpeg_out_clk_strength;
int chunk_size;
const char *microcode_name;
int qam_demod_parameter_count;
};
Members
adrI2C address of the DRX-K
single_masterDevice is on the single master mode
no_i2c_bridgeDon’t switch the I2C bridge to talk with tuner
parallel_tsTrue means that the device uses parallel TS, Serial otherwise.
dynamic_clkTrue means that the clock will be dynamically adjusted. Static clock otherwise.
enable_merr_cfgEnable SIO_PDR_PERR_CFG/SIO_PDR_MVAL_CFG.
antenna_dvbtGPIO bit for changing antenna to DVB-C. A value of 1 means that 1=DVBC, 0 = DVBT. Zero means the opposite.
antenna_gpioGPIO bit used to control the antenna
mpeg_out_clk_strengthDRXK Mpeg output clock drive strength.
chunk_sizemaximum size for I2C messages
microcode_nameName of the firmware file with the microcode
qam_demod_parameter_countThe number of parameters used for the command to set the demodulator parameters. All firmwares are using the 2-parameter commmand. An exception is the
drxk_a3.mcfirmware, which uses the 4-parameter command. A value of 0 (default) or lower indicates that the correct number of parameters will be automatically detected.
Description
On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
UIO-3.
-
struct dvb_frontend *
drxk_attach(const struct drxk_config * config, struct i2c_adapter * i2c)¶
Parameters
const struct drxk_config * configpointer to
struct drxk_configwith demod configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct dvb_frontend *
dvb_pll_attach(struct dvb_frontend * fe, int pll_addr, struct i2c_adapter * i2c, unsigned int pll_desc_id)¶ pll to the supplied frontend structure.
Parameters
struct dvb_frontend * feFrontend to attach to.
int pll_addri2c address of the PLL (if used).
struct i2c_adapter * i2ci2c adapter to use (set to NULL if not used).
unsigned int pll_desc_iddvb_pll_desc to use.
Return
Frontend pointer on success, NULL on failure
-
struct
helene_config¶ the configuration of ‘Helene’ tuner driver
Definition
struct helene_config {
u8 i2c_address;
u8 xtal_freq_mhz;
void *set_tuner_priv;
int (*set_tuner_callback)(void *, int);
enum helene_xtal xtal;
struct dvb_frontend *fe;
};
Members
i2c_addressI2C address of the tuner
xtal_freq_mhzOscillator frequency, MHz
set_tuner_privCallback function private context
set_tuner_callbackCallback function that notifies the parent driver which tuner is active now
xtalCristal frequency as described by
enum helene_xtalfeFrontend for which connects this tuner
-
struct dvb_frontend *
helene_attach(struct dvb_frontend * fe, const struct helene_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * fefrontend to be attached
const struct helene_config * configpointer to
struct helene_configwith tuner configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct dvb_frontend *
helene_attach_s(struct dvb_frontend * fe, const struct helene_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * fefrontend to be attached
const struct helene_config * configpointer to
struct helene_configwith tuner configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct
horus3a_config¶ the configuration of Horus3A tuner driver
Definition
struct horus3a_config {
u8 i2c_address;
u8 xtal_freq_mhz;
void *set_tuner_priv;
int (*set_tuner_callback)(void *, int);
};
Members
i2c_addressI2C address of the tuner
xtal_freq_mhzOscillator frequency, MHz
set_tuner_privCallback function private context
set_tuner_callbackCallback function that notifies the parent driver which tuner is active now
-
struct dvb_frontend *
horus3a_attach(struct dvb_frontend * fe, const struct horus3a_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * fefrontend to be attached
const struct horus3a_config * configpointer to
struct helene_configwith tuner configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
DVB_IX2505V_H()¶ S silicon tuner
Parameters
Description
Copyright (C) 2010 Malcolm Priestley
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
struct
ix2505v_config¶ ix2505 attachment configuration
Definition
struct ix2505v_config {
u8 tuner_address;
u8 tuner_gain;
u8 tuner_chargepump;
int min_delay_ms;
u8 tuner_write_only;
};
Members
tuner_addresstuner address
tuner_gainBaseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB
tuner_chargepumpCharge pump output +/- 0=120 1=260 2=555 3=1200(default)
min_delay_msdelay after tune
tuner_write_onlydisables reads
-
struct dvb_frontend *
ix2505v_attach(struct dvb_frontend * fe, const struct ix2505v_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * feFrontend to attach to.
const struct ix2505v_config * configpointer to
struct ix2505v_configstruct i2c_adapter * i2cpointer to
struct i2c_adapter.
Return
FE pointer on success, NULL on failure.
-
enum
m88ds3103_ts_mode¶ TS connection mode
Constants
M88DS3103_TS_SERIALTS output pin D0, normal
M88DS3103_TS_SERIAL_D7TS output pin D7
M88DS3103_TS_PARALLELTS Parallel mode
M88DS3103_TS_CITS CI Mode
-
enum
m88ds3103_clock_out¶
Constants
M88DS3103_CLOCK_OUT_DISABLEDClock output is disabled
M88DS3103_CLOCK_OUT_ENABLEDClock output is enabled with crystal clock.
M88DS3103_CLOCK_OUT_ENABLED_DIV2Clock output is enabled with half crystal clock.
-
struct
m88ds3103_platform_data¶ Platform data for the m88ds3103 driver
Definition
struct m88ds3103_platform_data {
u32 clk;
u16 i2c_wr_max;
enum m88ds3103_ts_mode ts_mode;
u32 ts_clk;
enum m88ds3103_clock_out clk_out;
u8 ts_clk_pol:1;
u8 spec_inv:1;
u8 agc;
u8 agc_inv:1;
u8 envelope_mode:1;
u8 lnb_hv_pol:1;
u8 lnb_en_pol:1;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
};
Members
clkClock frequency.
i2c_wr_maxMax bytes I2C adapter can write at once.
ts_modeTS mode.
ts_clkTS clock (KHz).
clk_outClock output.
ts_clk_polTS clk polarity. 1-active at falling edge; 0-active at rising edge.
spec_invInput spectrum inversion.
agcAGC configuration.
agc_invAGC polarity.
envelope_modeDiSEqC envelope mode.
lnb_hv_polLNB H/V pin polarity. 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13. 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18.
lnb_en_polLNB enable pin polarity. 0: pin high to disable, pin low to enable. 1: pin high to enable, pin low to disable.
get_dvb_frontendGet DVB frontend.
get_i2c_adapterGet I2C adapter.
-
struct
m88ds3103_config¶ m88ds3102 configuration
Definition
struct m88ds3103_config {
u8 i2c_addr;
u32 clock;
u16 i2c_wr_max;
u8 ts_mode;
u32 ts_clk;
u8 ts_clk_pol:1;
u8 spec_inv:1;
u8 agc_inv:1;
u8 clock_out;
u8 envelope_mode:1;
u8 agc;
u8 lnb_hv_pol:1;
u8 lnb_en_pol:1;
};
Members
i2c_addrI2C address. Default: none, must set. Example: 0x68, …
clockDevice’s clock. Default: none, must set. Example: 27000000
i2c_wr_maxMax bytes I2C provider is asked to write at once. Default: none, must set. Example: 33, 65, …
ts_modeTS output mode, as defined by
enum m88ds3103_ts_mode. Default: M88DS3103_TS_SERIAL.ts_clkTS clk in KHz. Default: 0.
ts_clk_polTS clk polarity.Default: 0. 1-active at falling edge; 0-active at rising edge.
spec_invSpectrum inversion. Default: 0.
agc_invAGC polarity. Default: 0.
clock_outClock output, as defined by
enum m88ds3103_clock_out. Default: M88DS3103_CLOCK_OUT_DISABLED.envelope_modeDiSEqC envelope mode. Default: 0.
agcAGC configuration. Default: none, must set.
lnb_hv_polLNB H/V pin polarity. Default: 0. Values: 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18; 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13.
lnb_en_polLNB enable pin polarity. Default: 0. Values: 1: pin high to enable, pin low to disable; 0: pin high to disable, pin low to enable.
-
struct dvb_frontend *
m88ds3103_attach(const struct m88ds3103_config * config, struct i2c_adapter * i2c, struct i2c_adapter ** tuner_i2c)¶
Parameters
const struct m88ds3103_config * configpointer to
struct m88ds3103_configwith demod configuration.struct i2c_adapter * i2ci2c adapter to use.
struct i2c_adapter ** tuner_i2con success, returns the I2C adapter associated with m88ds3103 tuner.
Return
FE pointer on success, NULL on failure.
Note
Do not add new m88ds3103_attach() users! Use I2C bindings instead.
-
struct
mb86a20s_config¶ Define the per-device attributes of the frontend
Definition
struct mb86a20s_config {
u32 fclk;
u8 demod_address;
bool is_serial;
};
Members
fclkClock frequency. If zero, assumes the default (32.57142 Mhz)
demod_addressthe demodulator’s i2c address
is_serialif true, TS is serial. Otherwise, TS is parallel
-
struct dvb_frontend *
mb86a20s_attach(const struct mb86a20s_config * config, struct i2c_adapter * i2c)¶
Parameters
const struct mb86a20s_config * configpointer to
struct mb86a20s_configwith demod configuration.struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct
mn88472_config¶ Platform data for the mn88472 driver
Definition
struct mn88472_config {
unsigned int xtal;
#define MN88472_TS_MODE_SERIAL 0;
#define MN88472_TS_MODE_PARALLEL 1;
int ts_mode;
#define MN88472_TS_CLK_FIXED 0;
#define MN88472_TS_CLK_VARIABLE 1;
int ts_clock;
u16 i2c_wr_max;
struct dvb_frontend **fe;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
};
Members
xtalClock frequency.
ts_modeTS mode.
ts_clockTS clock config.
i2c_wr_maxMax number of bytes driver writes to I2C at once.
fepointer to a frontend pointer
get_dvb_frontendGet DVB frontend callback.
-
struct
rtl2830_platform_data¶ Platform data for the rtl2830 driver
Definition
struct rtl2830_platform_data {
u32 clk;
bool spec_inv;
u8 vtop;
u8 krf;
u8 agc_targ_val;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
int (*pid_filter_ctrl)(struct dvb_frontend *, int);
};
Members
clkClock frequency (4000000, 16000000, 25000000, 28800000).
spec_invSpectrum inversion.
vtopAGC take-over point.
krfAGC ratio.
agc_targ_valAGC.
get_dvb_frontendGet DVB frontend.
get_i2c_adapterGet I2C adapter.
pid_filterSet PID to PID filter.
pid_filter_ctrlControl PID filter.
-
struct
rtl2832_platform_data¶ Platform data for the rtl2832 driver
Definition
struct rtl2832_platform_data {
u32 clk;
#define RTL2832_TUNER_FC2580 0x21;
#define RTL2832_TUNER_TUA9001 0x24;
#define RTL2832_TUNER_FC0012 0x26;
#define RTL2832_TUNER_E4000 0x27;
#define RTL2832_TUNER_FC0013 0x29;
#define RTL2832_TUNER_R820T 0x2a;
#define RTL2832_TUNER_R828D 0x2b;
#define RTL2832_TUNER_SI2157 0x2c;
u8 tuner;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
int (*slave_ts_ctrl)(struct i2c_client *, bool);
int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
int (*pid_filter_ctrl)(struct dvb_frontend *, int);
};
Members
clkClock frequency (4000000, 16000000, 25000000, 28800000).
tunerUsed tuner model.
get_dvb_frontendGet DVB frontend.
get_i2c_adapterGet I2C adapter.
slave_ts_ctrlControl slave TS interface.
pid_filterSet PID to PID filter.
pid_filter_ctrlControl PID filter.
-
struct
rtl2832_sdr_platform_data¶ Platform data for the rtl2832_sdr driver
Definition
struct rtl2832_sdr_platform_data {
u32 clk;
#define RTL2832_SDR_TUNER_FC2580 0x21;
#define RTL2832_SDR_TUNER_TUA9001 0x24;
#define RTL2832_SDR_TUNER_FC0012 0x26;
#define RTL2832_SDR_TUNER_E4000 0x27;
#define RTL2832_SDR_TUNER_FC0013 0x29;
#define RTL2832_SDR_TUNER_R820T 0x2a;
#define RTL2832_SDR_TUNER_R828D 0x2b;
u8 tuner;
struct regmap *regmap;
struct dvb_frontend *dvb_frontend;
struct v4l2_subdev *v4l2_subdev;
struct dvb_usb_device *dvb_usb_device;
};
Members
clkClock frequency (4000000, 16000000, 25000000, 28800000).
tunerUsed tuner model.
regmappointer to
struct regmap.dvb_frontendrtl2832 DVB frontend.
v4l2_subdevTuner v4l2 controls.
dvb_usb_deviceDVB USB interface for USB streaming.
-
struct dvb_frontend *
stb6000_attach(struct dvb_frontend * fe, int addr, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * feFrontend to attach to.
int addri2c address of the tuner.
struct i2c_adapter * i2ci2c adapter to use.
Return
FE pointer on success, NULL on failure.
-
struct
tda10071_platform_data¶ Platform data for the tda10071 driver
Definition
struct tda10071_platform_data {
u32 clk;
u16 i2c_wr_max;
#define TDA10071_TS_SERIAL 0;
#define TDA10071_TS_PARALLEL 1;
u8 ts_mode;
bool spec_inv;
u8 pll_multiplier;
u8 tuner_i2c_addr;
struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
};
Members
clkClock frequency.
i2c_wr_maxMax bytes I2C adapter can write at once.
ts_modeTS mode.
spec_invInput spectrum inversion.
pll_multiplierPLL multiplier.
tuner_i2c_addrCX24118A tuner I2C address (0x14, 0x54, …).
get_dvb_frontendGet DVB frontend.
-
struct dvb_frontend*
tda826x_attach(struct dvb_frontend * fe, int addr, struct i2c_adapter * i2c, int has_loopthrough)¶
Parameters
struct dvb_frontend * feFrontend to attach to.
int addri2c address of the tuner.
struct i2c_adapter * i2ci2c adapter to use.
int has_loopthroughSet to 1 if the card has a loopthrough RF connector.
Return
FE pointer on success, NULL on failure.
-
struct
zd1301_demod_platform_data¶ Platform data for the zd1301_demod driver
Definition
struct zd1301_demod_platform_data {
void *reg_priv;
int (*reg_read)(void *, u16, u8 *);
int (*reg_write)(void *, u16, u8);
};
Members
reg_privFirst argument of reg_read and reg_write callbacks.
reg_readRegister read callback.
reg_writeRegister write callback.
-
struct dvb_frontend *
zd1301_demod_get_dvb_frontend(struct platform_device * pdev)¶ Get pointer to DVB frontend
Parameters
struct platform_device * pdevPointer to platform device
Return
Pointer to DVB frontend which given platform device owns.
-
struct i2c_adapter *
zd1301_demod_get_i2c_adapter(struct platform_device * pdev)¶ Get pointer to I2C adapter
Parameters
struct platform_device * pdevPointer to platform device
Return
Pointer to I2C adapter which given platform device owns.
-
struct dvb_frontend *
zd1301_demod_get_dvb_frontend(struct platform_device * dev) Attach a zd1301 frontend
Parameters
struct platform_device * devPointer to platform device
Return
Pointer to struct dvb_frontend or NULL if attach fails.
-
DVB_ZL10036_H()¶ S silicon tuner
Parameters
Description
Copyright (C) 2006 Tino Reichardt Copyright (C) 2007-2009 Matthias Schwarzott <zzam**gentoo.de**>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
struct dvb_frontend *
zl10036_attach(struct dvb_frontend * fe, const struct zl10036_config * config, struct i2c_adapter * i2c)¶
Parameters
struct dvb_frontend * feFrontend to attach to.
const struct zl10036_config * configzl10036_config structure.
struct i2c_adapter * i2cpointer to struct i2c_adapter.
Return
FE pointer on success, NULL on failure.