diff options
author | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-07-13 15:15:43 -0400 |
commit | 99ad25a313bda566a346b46a6015afa65bc0a02b (patch) | |
tree | b9443fed1ab74f320c4ee0791864ee96d7c069df /include/media | |
parent | f62c4a96f74d6c6dd56d1742697e94a5c2085e87 (diff) | |
parent | 9a556e89081b0c1c2f83cee915363b15a68a6f2d (diff) |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/audiochip.h | 3 | ||||
-rw-r--r-- | include/media/saa6752hs.h | 49 | ||||
-rw-r--r-- | include/media/tuner.h | 51 |
3 files changed, 22 insertions, 81 deletions
diff --git a/include/media/audiochip.h b/include/media/audiochip.h index f345a61c3bdb..cd831168fdc1 100644 --- a/include/media/audiochip.h +++ b/include/media/audiochip.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: audiochip.h,v 1.3 2005/06/12 04:19:19 mchehab Exp $ | 2 | * $Id: audiochip.h,v 1.5 2005/06/16 22:59:16 hhackmann Exp $ |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef AUDIOCHIP_H | 5 | #ifndef AUDIOCHIP_H |
@@ -35,5 +35,4 @@ | |||
35 | 35 | ||
36 | /* misc stuff to pass around config info to i2c chips */ | 36 | /* misc stuff to pass around config info to i2c chips */ |
37 | #define AUDC_CONFIG_PINNACLE _IOW('m',32,int) | 37 | #define AUDC_CONFIG_PINNACLE _IOW('m',32,int) |
38 | |||
39 | #endif /* AUDIOCHIP_H */ | 38 | #endif /* AUDIOCHIP_H */ |
diff --git a/include/media/saa6752hs.h b/include/media/saa6752hs.h index 791bad2b86e9..3b8686ead80d 100644 --- a/include/media/saa6752hs.h +++ b/include/media/saa6752hs.h | |||
@@ -18,55 +18,6 @@ | |||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #if 0 /* ndef _SAA6752HS_H */ | ||
22 | #define _SAA6752HS_H | ||
23 | |||
24 | enum mpeg_video_bitrate_mode { | ||
25 | MPEG_VIDEO_BITRATE_MODE_VBR = 0, /* Variable bitrate */ | ||
26 | MPEG_VIDEO_BITRATE_MODE_CBR = 1, /* Constant bitrate */ | ||
27 | |||
28 | MPEG_VIDEO_BITRATE_MODE_MAX | ||
29 | }; | ||
30 | |||
31 | enum mpeg_audio_bitrate { | ||
32 | MPEG_AUDIO_BITRATE_256 = 0, /* 256 kBit/sec */ | ||
33 | MPEG_AUDIO_BITRATE_384 = 1, /* 384 kBit/sec */ | ||
34 | |||
35 | MPEG_AUDIO_BITRATE_MAX | ||
36 | }; | ||
37 | |||
38 | enum mpeg_video_format { | ||
39 | MPEG_VIDEO_FORMAT_D1 = 0, | ||
40 | MPEG_VIDEO_FORMAT_2_3_D1 = 1, | ||
41 | MPEG_VIDEO_FORMAT_1_2_D1 = 2, | ||
42 | MPEG_VIDEO_FORMAT_SIF = 3, | ||
43 | |||
44 | MPEG_VIDEO_FORMAT_MAX | ||
45 | }; | ||
46 | |||
47 | #define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 | ||
48 | #define MPEG_VIDEO_MAX_BITRATE_MAX 27000 | ||
49 | #define MPEG_TOTAL_BITRATE_MAX 27000 | ||
50 | #define MPEG_PID_MAX ((1 << 14) - 1) | ||
51 | |||
52 | struct mpeg_params { | ||
53 | enum mpeg_video_bitrate_mode video_bitrate_mode; | ||
54 | unsigned int video_target_bitrate; | ||
55 | unsigned int video_max_bitrate; // only used for VBR | ||
56 | enum mpeg_audio_bitrate audio_bitrate; | ||
57 | unsigned int total_bitrate; | ||
58 | |||
59 | unsigned int pmt_pid; | ||
60 | unsigned int video_pid; | ||
61 | unsigned int audio_pid; | ||
62 | unsigned int pcr_pid; | ||
63 | |||
64 | enum mpeg_video_format video_format; | ||
65 | }; | ||
66 | |||
67 | #define MPEG_SETPARAMS _IOW('6',100,struct mpeg_params) | ||
68 | |||
69 | #endif // _SAA6752HS_H | ||
70 | 21 | ||
71 | /* | 22 | /* |
72 | * Local variables: | 23 | * Local variables: |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 4794c5632360..d8c0a5563289 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $Id: tuner.h,v 1.33 2005/06/21 14:58:08 mkrufky Exp $ | 2 | /* $Id: tuner.h,v 1.42 2005/07/06 09:42:19 mchehab Exp $ |
3 | * | 3 | * |
4 | tuner.h - definition for different tuners | 4 | tuner.h - definition for different tuners |
5 | 5 | ||
@@ -26,8 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/videodev2.h> | 27 | #include <linux/videodev2.h> |
28 | 28 | ||
29 | #include "id.h" | ||
30 | |||
31 | #define ADDR_UNSET (255) | 29 | #define ADDR_UNSET (255) |
32 | 30 | ||
33 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ | 31 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ |
@@ -111,8 +109,6 @@ | |||
111 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ | 109 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ |
112 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 | 110 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 |
113 | 111 | ||
114 | #define TEA5767_TUNER_NAME "Philips TEA5767HN FM Radio" | ||
115 | |||
116 | #define NOTUNER 0 | 112 | #define NOTUNER 0 |
117 | #define PAL 1 /* PAL_BG */ | 113 | #define PAL 1 /* PAL_BG */ |
118 | #define PAL_I 2 | 114 | #define PAL_I 2 |
@@ -135,19 +131,8 @@ | |||
135 | #define TCL 11 | 131 | #define TCL 11 |
136 | #define THOMSON 12 | 132 | #define THOMSON 12 |
137 | 133 | ||
138 | enum v4l_radio_tuner { | 134 | #define TUNER_SET_TYPE_ADDR _IOW('T',3,int) |
139 | TEA5767_LOW_LO_32768 = 0, | 135 | #define TDA9887_SET_CONFIG _IOW('t',5,int) |
140 | TEA5767_HIGH_LO_32768 = 1, | ||
141 | TEA5767_LOW_LO_13MHz = 2, | ||
142 | TEA5767_HIGH_LO_13MHz = 3, | ||
143 | }; | ||
144 | |||
145 | |||
146 | #define TUNER_SET_TYPE _IOW('t',1,int) /* set tuner type */ | ||
147 | #define TUNER_SET_TVFREQ _IOW('t',2,int) /* set tv freq */ | ||
148 | #define TUNER_SET_TYPE_ADDR _IOW('T',3,int) /* set tuner type and I2C addr */ | ||
149 | |||
150 | #define TDA9887_SET_CONFIG _IOW('t',5,int) | ||
151 | 136 | ||
152 | /* tv card specific */ | 137 | /* tv card specific */ |
153 | # define TDA9887_PRESENT (1<<0) | 138 | # define TDA9887_PRESENT (1<<0) |
@@ -169,25 +154,34 @@ enum v4l_radio_tuner { | |||
169 | #define I2C_ADDR_TDA8290 0x4b | 154 | #define I2C_ADDR_TDA8290 0x4b |
170 | #define I2C_ADDR_TDA8275 0x61 | 155 | #define I2C_ADDR_TDA8275 0x61 |
171 | 156 | ||
172 | struct tuner_addr { | 157 | enum tuner_mode { |
173 | enum v4l2_tuner_type v4l2_tuner; | 158 | T_UNINITIALIZED = 0, |
174 | unsigned int type; | 159 | T_RADIO = 1 << V4L2_TUNER_RADIO, |
160 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, | ||
161 | T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, | ||
162 | T_STANDBY = 1 << 31 | ||
163 | }; | ||
164 | |||
165 | struct tuner_setup { | ||
175 | unsigned short addr; | 166 | unsigned short addr; |
167 | unsigned int type; | ||
168 | unsigned int mode_mask; | ||
176 | }; | 169 | }; |
177 | 170 | ||
178 | struct tuner { | 171 | struct tuner { |
179 | /* device */ | 172 | /* device */ |
180 | struct i2c_client i2c; | 173 | struct i2c_client i2c; |
181 | 174 | ||
182 | /* state + config */ | ||
183 | unsigned int initialized; | ||
184 | unsigned int type; /* chip type */ | 175 | unsigned int type; /* chip type */ |
176 | |||
177 | unsigned int mode; | ||
178 | unsigned int mode_mask; /* Combination of allowable modes */ | ||
179 | |||
185 | unsigned int freq; /* keep track of the current settings */ | 180 | unsigned int freq; /* keep track of the current settings */ |
181 | unsigned int audmode; | ||
186 | v4l2_std_id std; | 182 | v4l2_std_id std; |
187 | int using_v4l2; | ||
188 | 183 | ||
189 | enum v4l2_tuner_type mode; | 184 | int using_v4l2; |
190 | unsigned int input; | ||
191 | 185 | ||
192 | /* used by MT2032 */ | 186 | /* used by MT2032 */ |
193 | unsigned int xogc; | 187 | unsigned int xogc; |
@@ -197,15 +191,11 @@ struct tuner { | |||
197 | unsigned char i2c_easy_mode[2]; | 191 | unsigned char i2c_easy_mode[2]; |
198 | unsigned char i2c_set_freq[8]; | 192 | unsigned char i2c_set_freq[8]; |
199 | 193 | ||
200 | /* used to keep track of audmode */ | ||
201 | unsigned int audmode; | ||
202 | |||
203 | /* function ptrs */ | 194 | /* function ptrs */ |
204 | void (*tv_freq)(struct i2c_client *c, unsigned int freq); | 195 | void (*tv_freq)(struct i2c_client *c, unsigned int freq); |
205 | void (*radio_freq)(struct i2c_client *c, unsigned int freq); | 196 | void (*radio_freq)(struct i2c_client *c, unsigned int freq); |
206 | int (*has_signal)(struct i2c_client *c); | 197 | int (*has_signal)(struct i2c_client *c); |
207 | int (*is_stereo)(struct i2c_client *c); | 198 | int (*is_stereo)(struct i2c_client *c); |
208 | int (*set_tuner)(struct i2c_client *c, struct v4l2_tuner *v); | ||
209 | }; | 199 | }; |
210 | 200 | ||
211 | extern unsigned int tuner_debug; | 201 | extern unsigned int tuner_debug; |
@@ -215,6 +205,7 @@ extern int microtune_init(struct i2c_client *c); | |||
215 | extern int tda8290_init(struct i2c_client *c); | 205 | extern int tda8290_init(struct i2c_client *c); |
216 | extern int tea5767_tuner_init(struct i2c_client *c); | 206 | extern int tea5767_tuner_init(struct i2c_client *c); |
217 | extern int default_tuner_init(struct i2c_client *c); | 207 | extern int default_tuner_init(struct i2c_client *c); |
208 | extern int tea5767_autodetection(struct i2c_client *c); | ||
218 | 209 | ||
219 | #define tuner_warn(fmt, arg...) \ | 210 | #define tuner_warn(fmt, arg...) \ |
220 | dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) | 211 | dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) |