diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-19 06:45:38 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-24 14:26:57 -0500 |
commit | 49965a80a4c4f5cbe15fb3bb1f8f8b0ec4ef02bc (patch) | |
tree | aaf7409eb7c44da7527b08d63bdab87e34471fce /drivers/media/video/msp3400-driver.h | |
parent | de533ccf8dd51f38ef3c1751f9eb5ad3f2fcfad9 (diff) |
V4L/DVB (3581): Add new media/msp3400.h header containing the routing macros
Moved msp3400.h to msp3400-driver.h.
Created media/msp3400.h with the new routing defines and lots of comments.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/msp3400-driver.h')
-rw-r--r-- | drivers/media/video/msp3400-driver.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/video/msp3400-driver.h new file mode 100644 index 000000000000..04821ebfe04a --- /dev/null +++ b/drivers/media/video/msp3400-driver.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | */ | ||
3 | |||
4 | #ifndef MSP3400_DRIVER_H | ||
5 | #define MSP3400_DRIVER_H | ||
6 | |||
7 | /* ---------------------------------------------------------------------- */ | ||
8 | |||
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))) | ||
12 | |||
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 | ||
22 | |||
23 | #define SCART_IN1 0 | ||
24 | #define SCART_IN2 1 | ||
25 | #define SCART_IN3 2 | ||
26 | #define SCART_IN4 3 | ||
27 | #define SCART_IN1_DA 4 | ||
28 | #define SCART_IN2_DA 5 | ||
29 | #define SCART_MONO 6 | ||
30 | #define SCART_MUTE 7 | ||
31 | |||
32 | #define SCART_DSP_IN 0 | ||
33 | #define SCART1_OUT 1 | ||
34 | #define SCART2_OUT 2 | ||
35 | |||
36 | #define OPMODE_AUTO -1 | ||
37 | #define OPMODE_MANUAL 0 | ||
38 | #define OPMODE_AUTODETECT 1 /* use autodetect (>= msp3410 only) */ | ||
39 | #define OPMODE_AUTOSELECT 2 /* use autodetect & autoselect (>= msp34xxG) */ | ||
40 | |||
41 | /* module parameters */ | ||
42 | extern int msp_debug; | ||
43 | extern int msp_once; | ||
44 | extern int msp_amsound; | ||
45 | extern int msp_standard; | ||
46 | extern int msp_dolby; | ||
47 | extern int msp_stereo_thresh; | ||
48 | |||
49 | struct msp_state { | ||
50 | int rev1, rev2; | ||
51 | u8 has_nicam; | ||
52 | u8 has_radio; | ||
53 | u8 has_headphones; | ||
54 | u8 has_ntsc_jp_d_k3; | ||
55 | u8 has_scart4; | ||
56 | u8 has_scart23_in_scart2_out; | ||
57 | u8 has_scart2_out_volume; | ||
58 | u8 has_i2s_conf; | ||
59 | u8 has_subwoofer; | ||
60 | u8 has_sound_processing; | ||
61 | u8 has_virtual_dolby_surround; | ||
62 | u8 has_dolby_pro_logic; | ||
63 | |||
64 | int radio; | ||
65 | int opmode; | ||
66 | int std; | ||
67 | int mode; | ||
68 | v4l2_std_id v4l2_std; | ||
69 | int nicam_on; | ||
70 | int acb; | ||
71 | int in_scart; | ||
72 | int i2s_mode; | ||
73 | int main, second; /* sound carrier */ | ||
74 | int input; | ||
75 | int source; /* see msp34xxg_set_source */ | ||
76 | |||
77 | /* v4l2 */ | ||
78 | int audmode; | ||
79 | int rxsubchans; | ||
80 | |||
81 | int volume, muted; | ||
82 | int balance, loudness; | ||
83 | int bass, treble; | ||
84 | |||
85 | /* thread */ | ||
86 | struct task_struct *kthread; | ||
87 | wait_queue_head_t wq; | ||
88 | int restart:1; | ||
89 | int watch_stereo:1; | ||
90 | }; | ||
91 | |||
92 | /* msp3400-driver.c */ | ||
93 | int msp_write_dem(struct i2c_client *client, int addr, int val); | ||
94 | int msp_write_dsp(struct i2c_client *client, int addr, int val); | ||
95 | int msp_read_dem(struct i2c_client *client, int addr); | ||
96 | int msp_read_dsp(struct i2c_client *client, int addr); | ||
97 | int msp_reset(struct i2c_client *client); | ||
98 | void msp_set_scart(struct i2c_client *client, int in, int out); | ||
99 | void msp_set_mute(struct i2c_client *client); | ||
100 | void msp_set_audio(struct i2c_client *client); | ||
101 | int msp_sleep(struct msp_state *state, int timeout); | ||
102 | |||
103 | /* msp3400-kthreads.c */ | ||
104 | const char *msp_standard_std_name(int std); | ||
105 | void msp_set_audmode(struct i2c_client *client); | ||
106 | int msp_detect_stereo(struct i2c_client *client); | ||
107 | int msp3400c_thread(void *data); | ||
108 | int msp3410d_thread(void *data); | ||
109 | int msp34xxg_thread(void *data); | ||
110 | void msp3400c_set_mode(struct i2c_client *client, int mode); | ||
111 | void msp3400c_set_carrier(struct i2c_client *client, int cdo1, int cdo2); | ||
112 | |||
113 | #endif /* MSP3400_DRIVER_H */ | ||