···67/* ---------------------------------------------------------------------- */89-struct msp_matrix {10- int input;11- int output;12-};13-14-/* ioctl for MSP_SET_MATRIX will have to be registered */15-#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)16-17/* This macro is allowed for *constants* only, gcc must calculate it18 at compile time. Remember -- no floats in kernel mode */19#define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
···67/* ---------------------------------------------------------------------- */8000000009/* This macro is allowed for *constants* only, gcc must calculate it10 at compile time. Remember -- no floats in kernel mode */11#define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
···1920struct tuner_params {21 enum param_type type;000000000000000000022 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */2324 unsigned int count;···4647struct tunertype {48 char *name;49- unsigned int has_tda988x:1;50 struct tuner_params *params;51};52
···1920struct tuner_params {21 enum param_type type;22+ /* Many Philips based tuners have a comment like this in their23+ * datasheet:24+ *25+ * For channel selection involving band switching, and to ensure26+ * smooth tuning to the desired channel without causing27+ * unnecessary charge pump action, it is recommended to consider28+ * the difference between wanted channel frequency and the29+ * current channel frequency. Unnecessary charge pump action30+ * will result in very low tuning voltage which may drive the31+ * oscillator to extreme conditions.32+ *33+ * Set cb_first_if_lower_freq to 1, if this check is34+ * required for this tuner.35+ *36+ * I tested this for PAL by first setting the TV frequency to37+ * 203 MHz and then switching to 96.6 MHz FM radio. The result was38+ * static unless the control byte was sent first.39+ */40+ unsigned int cb_first_if_lower_freq:1;41 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */4243 unsigned int count;···2728struct tunertype {29 char *name;030 struct tuner_params *params;31};32
+5-3
include/media/tuner.h
···179 unsigned int mode;180 unsigned int mode_mask; /* Combination of allowable modes */181182- unsigned int freq; /* keep track of the current settings */00183 unsigned int audmode;184 v4l2_std_id std;185···199 unsigned int sgIF;200201 /* function ptrs */202- void (*tv_freq)(struct i2c_client *c, unsigned int freq);203- void (*radio_freq)(struct i2c_client *c, unsigned int freq);204 int (*has_signal)(struct i2c_client *c);205 int (*is_stereo)(struct i2c_client *c);206 void (*standby)(struct i2c_client *c);
···179 unsigned int mode;180 unsigned int mode_mask; /* Combination of allowable modes */181182+ unsigned int tv_freq; /* keep track of the current settings */183+ unsigned int radio_freq;184+ u16 last_div;185 unsigned int audmode;186 v4l2_std_id std;187···197 unsigned int sgIF;198199 /* function ptrs */200+ void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);201+ void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);202 int (*has_signal)(struct i2c_client *c);203 int (*is_stereo)(struct i2c_client *c);204 void (*standby)(struct i2c_client *c);
+7
include/media/v4l2-common.h
···120/* select from TV,radio,extern,MUTE */121#define AUDC_SET_INPUT _IOW('d',89,int)1220000000123/* tuner ioctls */124/* Sets tuner type and its I2C addr */125#define TUNER_SET_TYPE_ADDR _IOW('d',90,int)
···120/* select from TV,radio,extern,MUTE */121#define AUDC_SET_INPUT _IOW('d',89,int)122123+/* msp3400 ioctl: will be removed in the near future */124+struct msp_matrix {125+ int input;126+ int output;127+};128+#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)129+130/* tuner ioctls */131/* Sets tuner type and its I2C addr */132#define TUNER_SET_TYPE_ADDR _IOW('d',90,int)