4 #ifndef MSP3400_DRIVER_H
5 #define MSP3400_DRIVER_H
7 #include <media/msp3400.h>
9 /* ---------------------------------------------------------------------- */
11 /* This macro is allowed for *constants* only, gcc must calculate it
12 at compile time. Remember -- no floats in kernel mode */
13 #define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
15 #define MSP_MODE_AM_DETECT 0
16 #define MSP_MODE_FM_RADIO 2
17 #define MSP_MODE_FM_TERRA 3
18 #define MSP_MODE_FM_SAT 4
19 #define MSP_MODE_FM_NICAM1 5
20 #define MSP_MODE_FM_NICAM2 6
21 #define MSP_MODE_AM_NICAM 7
22 #define MSP_MODE_BTSC 8
23 #define MSP_MODE_EXTERN 9
29 #define SCART_IN1_DA 4
30 #define SCART_IN2_DA 5
34 #define SCART_DSP_IN 0
38 #define OPMODE_AUTO -1
39 #define OPMODE_MANUAL 0
40 #define OPMODE_AUTODETECT 1 /* use autodetect (>= msp3410 only) */
41 #define OPMODE_AUTOSELECT 2 /* use autodetect & autoselect (>= msp34xxG) */
43 /* module parameters */
46 extern int msp_amsound;
47 extern int msp_standard;
49 extern int msp_stereo_thresh;
61 u8 has_scart2_out_volume;
64 u8 has_sound_processing;
65 u8 has_virtual_dolby_surround;
66 u8 has_dolby_pro_logic;
77 int main, second; /* sound carrier */
79 struct v4l2_routing routing;
86 int balance, loudness;
91 struct task_struct *kthread;
97 /* msp3400-driver.c */
98 int msp_write_dem(struct i2c_client *client, int addr, int val);
99 int msp_write_dsp(struct i2c_client *client, int addr, int val);
100 int msp_read_dem(struct i2c_client *client, int addr);
101 int msp_read_dsp(struct i2c_client *client, int addr);
102 int msp_reset(struct i2c_client *client);
103 void msp_set_scart(struct i2c_client *client, int in, int out);
104 void msp_set_audio(struct i2c_client *client);
105 int msp_sleep(struct msp_state *state, int timeout);
107 /* msp3400-kthreads.c */
108 const char *msp_standard_std_name(int std);
109 void msp_set_audmode(struct i2c_client *client);
110 int msp_detect_stereo(struct i2c_client *client);
111 int msp3400c_thread(void *data);
112 int msp3410d_thread(void *data);
113 int msp34xxg_thread(void *data);
114 void msp3400c_set_mode(struct i2c_client *client, int mode);
115 void msp3400c_set_carrier(struct i2c_client *client, int cdo1, int cdo2);
117 #endif /* MSP3400_DRIVER_H */