···6677/* ---------------------------------------------------------------------- */8899-struct msp_matrix {1010- int input;1111- int output;1212-};1313-1414-/* ioctl for MSP_SET_MATRIX will have to be registered */1515-#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)1616-179/* This macro is allowed for *constants* only, gcc must calculate it1810 at compile time. Remember -- no floats in kernel mode */1911#define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
···19192020struct tuner_params {2121 enum param_type type;2222+ /* Many Philips based tuners have a comment like this in their2323+ * datasheet:2424+ *2525+ * For channel selection involving band switching, and to ensure2626+ * smooth tuning to the desired channel without causing2727+ * unnecessary charge pump action, it is recommended to consider2828+ * the difference between wanted channel frequency and the2929+ * current channel frequency. Unnecessary charge pump action3030+ * will result in very low tuning voltage which may drive the3131+ * oscillator to extreme conditions.3232+ *3333+ * Set cb_first_if_lower_freq to 1, if this check is3434+ * required for this tuner.3535+ *3636+ * I tested this for PAL by first setting the TV frequency to3737+ * 203 MHz and then switching to 96.6 MHz FM radio. The result was3838+ * static unless the control byte was sent first.3939+ */4040+ unsigned int cb_first_if_lower_freq:1;2241 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */23422443 unsigned int count;···46274728struct tunertype {4829 char *name;4949- unsigned int has_tda988x:1;5030 struct tuner_params *params;5131};5232
+5-3
include/media/tuner.h
···179179 unsigned int mode;180180 unsigned int mode_mask; /* Combination of allowable modes */181181182182- unsigned int freq; /* keep track of the current settings */182182+ unsigned int tv_freq; /* keep track of the current settings */183183+ unsigned int radio_freq;184184+ u16 last_div;183185 unsigned int audmode;184186 v4l2_std_id std;185187···199197 unsigned int sgIF;200198201199 /* function ptrs */202202- void (*tv_freq)(struct i2c_client *c, unsigned int freq);203203- void (*radio_freq)(struct i2c_client *c, unsigned int freq);200200+ void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);201201+ void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);204202 int (*has_signal)(struct i2c_client *c);205203 int (*is_stereo)(struct i2c_client *c);206204 void (*standby)(struct i2c_client *c);
+7
include/media/v4l2-common.h
···120120/* select from TV,radio,extern,MUTE */121121#define AUDC_SET_INPUT _IOW('d',89,int)122122123123+/* msp3400 ioctl: will be removed in the near future */124124+struct msp_matrix {125125+ int input;126126+ int output;127127+};128128+#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)129129+123130/* tuner ioctls */124131/* Sets tuner type and its I2C addr */125132#define TUNER_SET_TYPE_ADDR _IOW('d',90,int)