7 /* ---------------------------------------------------------------------- */
9 /* This macro is allowed for *constants* only, gcc must calculate it
10 at compile time. Remember -- no floats in kernel mode */
11 #define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
13 #define MSP_MODE_AM_DETECT 0
14 #define MSP_MODE_FM_RADIO 2
15 #define MSP_MODE_FM_TERRA 3
16 #define MSP_MODE_FM_SAT 4
17 #define MSP_MODE_FM_NICAM1 5
18 #define MSP_MODE_FM_NICAM2 6
19 #define MSP_MODE_AM_NICAM 7
20 #define MSP_MODE_BTSC 8
21 #define MSP_MODE_EXTERN 9
26 #define SCART_IN1_DA 3
27 #define SCART_IN2_DA 4
33 #define SCART_DSP_IN 0
37 #define OPMODE_AUTO -1
38 #define OPMODE_MANUAL 0
39 #define OPMODE_AUTODETECT 1 /* use autodetect (>= msp3410 only) */
40 #define OPMODE_AUTOSELECT 2 /* use autodetect & autoselect (>= msp34xxG) */
42 /* module parameters */
45 extern int msp_amsound
;
46 extern int msp_standard
;
48 extern int msp_stereo_thresh
;
57 u8 has_scart23_in_scart2_out
;
58 u8 has_scart2_out_volume
;
61 u8 has_sound_processing
;
62 u8 has_virtual_dolby_surround
;
63 u8 has_dolby_pro_logic
;
74 int main
, second
; /* sound carrier */
76 int source
; /* see msp34xxg_set_source */
83 int balance
, loudness
;
87 struct task_struct
*kthread
;
93 /* msp3400-driver.c */
94 int msp_write_dem(struct i2c_client
*client
, int addr
, int val
);
95 int msp_write_dsp(struct i2c_client
*client
, int addr
, int val
);
96 int msp_read_dem(struct i2c_client
*client
, int addr
);
97 int msp_read_dsp(struct i2c_client
*client
, int addr
);
98 int msp_reset(struct i2c_client
*client
);
99 void msp_set_scart(struct i2c_client
*client
, int in
, int out
);
100 void msp_set_mute(struct i2c_client
*client
);
101 void msp_set_audio(struct i2c_client
*client
);
102 int msp_modus(struct i2c_client
*client
);
103 int msp_sleep(struct msp_state
*state
, int timeout
);
105 /* msp3400-kthreads.c */
106 const char *msp_standard_std_name(int std
);
107 void msp_set_audmode(struct i2c_client
*client
);
108 void msp_detect_stereo(struct i2c_client
*client
);
109 int msp3400c_thread(void *data
);
110 int msp3410d_thread(void *data
);
111 int msp34xxg_thread(void *data
);
112 void msp3400c_set_mode(struct i2c_client
*client
, int mode
);
113 void msp3400c_set_carrier(struct i2c_client
*client
, int cdo1
, int cdo2
);
115 #endif /* MSP3400_H */