/* ---------------------------------------------------------------------- */
-#define msp_err(fmt, arg...) \
- printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->driver.name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg)
-#define msp_warn(fmt, arg...) \
- printk(KERN_WARNING "%s %d-%04x: " fmt, client->driver->driver.name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg)
-#define msp_info(fmt, arg...) \
- printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->driver.name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg)
-
-/* level 1 debug. */
-#define msp_dbg1(fmt, arg...) \
- do { \
- if (debug) \
- printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->driver.name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg); \
- } while (0)
-
-/* level 2 debug. */
-#define msp_dbg2(fmt, arg...) \
- do { \
- if (debug >= 2) \
- printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg); \
- } while (0)
-
-/* level 3 debug. Use with care. */
-#define msp_dbg3(fmt, arg...) \
- do { \
- if (debug >= 16) \
- printk(KERN_INFO "%s debug %d-%04x: " fmt, client->driver->name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg); \
- } while (0)
-
-struct msp_matrix {
- int input;
- int output;
-};
-
-/* ioctl for MSP_SET_MATRIX will have to be registered */
-#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)
-
/* This macro is allowed for *constants* only, gcc must calculate it
at compile time. Remember -- no floats in kernel mode */
#define MSP_CARRIER(freq) ((int)((float)(freq / 18.432) * (1 << 24)))
#define OPMODE_AUTOSELECT 2 /* use autodetect & autoselect (>= msp34xxG) */
/* module parameters */
-extern int debug;
-extern int once;
-extern int amsound;
-extern int standard;
-extern int dolby;
-extern int stereo_threshold;
+extern int msp_debug;
+extern int msp_once;
+extern int msp_amsound;
+extern int msp_standard;
+extern int msp_dolby;
+extern int msp_stereo_thresh;
struct msp_state {
int rev1, rev2;
-
+ u8 has_nicam;
+ u8 has_radio;
+ u8 has_headphones;
+ u8 has_ntsc_jp_d_k3;
+ u8 has_scart4;
+ u8 has_scart23_in_scart2_out;
+ u8 has_scart2_out_volume;
+ u8 has_i2s_conf;
+ u8 has_subwoofer;
+ u8 has_sound_processing;
+ u8 has_virtual_dolby_surround;
+ u8 has_dolby_pro_logic;
+
+ int radio;
int opmode;
+ int std;
int mode;
- int norm;
- int stereo;
+ v4l2_std_id v4l2_std;
int nicam_on;
int acb;
int in_scart;
int audmode;
int rxsubchans;
- int muted;
- int volume, balance;
+ int volume, muted;
+ int balance, loudness;
int bass, treble;
/* thread */
int watch_stereo:1;
};
-#define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */
-
-#define HAVE_NICAM(state) (((state->rev2 >> 8) & 0xff) != 0)
-#define HAVE_RADIO(state) ((state->rev1 & 0x0f) >= 'G'-'@')
-
/* msp3400-driver.c */
int msp_write_dem(struct i2c_client *client, int addr, int val);
int msp_write_dsp(struct i2c_client *client, int addr, int val);
void msp_set_scart(struct i2c_client *client, int in, int out);
void msp_set_mute(struct i2c_client *client);
void msp_set_audio(struct i2c_client *client);
-int msp_modus(struct i2c_client *client, int norm);
-int msp_standard(int norm);
+int msp_modus(struct i2c_client *client);
int msp_sleep(struct msp_state *state, int timeout);
/* msp3400-kthreads.c */
-const char *msp_standard_mode_name(int mode);
-void msp3400c_setcarrier(struct i2c_client *client, int cdo1, int cdo2);
-void msp3400c_setmode(struct i2c_client *client, int type);
-void msp3400c_setstereo(struct i2c_client *client, int mode);
-int autodetect_stereo(struct i2c_client *client);
+const char *msp_standard_std_name(int std);
+void msp_set_audmode(struct i2c_client *client);
+void msp_detect_stereo(struct i2c_client *client);
int msp3400c_thread(void *data);
int msp3410d_thread(void *data);
int msp34xxg_thread(void *data);
-void msp34xxg_detect_stereo(struct i2c_client *client);
-void msp34xxg_set_audmode(struct i2c_client *client, int audmode);
+void msp3400c_set_mode(struct i2c_client *client, int mode);
+void msp3400c_set_carrier(struct i2c_client *client, int cdo1, int cdo2);
#endif /* MSP3400_H */