diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-07-31 13:41:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:54:32 -0400 |
commit | 335961ca2e5098e222fdfbde93de3714899128fd (patch) | |
tree | 5b6ba7a30893e6cc623ab927751e5182bb81c025 | |
parent | 9b8b0199b86eaa595e3ccacb413e955a193f1962 (diff) |
[media] saa7164: Add some encoder firmwares message types and structs
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/saa7164/saa7164-reg.h | 47 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-types.h | 114 |
2 files changed, 160 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-reg.h b/drivers/media/video/saa7164/saa7164-reg.h index 89af6d0ccbec..a4ad55907b91 100644 --- a/drivers/media/video/saa7164/saa7164-reg.h +++ b/drivers/media/video/saa7164/saa7164-reg.h | |||
@@ -162,5 +162,50 @@ | |||
162 | #define SAA_DMASTATE_PAUSE 0x02 | 162 | #define SAA_DMASTATE_PAUSE 0x02 |
163 | #define SAA_DMASTATE_RUN 0x03 | 163 | #define SAA_DMASTATE_RUN 0x03 |
164 | 164 | ||
165 | /* Hardware registers */ | 165 | /* A/V Mux Input Selector */ |
166 | #define SU_INPUT_SELECT_CONTROL 0x01 | ||
167 | |||
168 | /* Encoder Profiles */ | ||
169 | #define EU_PROFILE_PS_DVD 0x06 | ||
170 | #define EU_PROFILE_TS_HQ 0x09 | ||
171 | #define EU_VIDEO_FORMAT_MPEG_2 0x02 | ||
172 | |||
173 | /* Tuner */ | ||
174 | #define TU_AUDIO_MODE_CONTROL 0x17 | ||
175 | |||
176 | /* Video Formats */ | ||
177 | #define TU_STANDARD_CONTROL 0x00 | ||
178 | #define TU_STANDARD_AUTO_CONTROL 0x01 | ||
179 | #define TU_STANDARD_NONE 0x00 | ||
180 | #define TU_STANDARD_NTSC_M 0x01 | ||
181 | #define TU_STANDARD_PAL_I 0x08 | ||
182 | #define TU_STANDARD_MANUAL 0x00 | ||
183 | #define TU_STANDARD_AUTO 0x01 | ||
184 | |||
185 | /* Video Controls */ | ||
186 | #define PU_BRIGHTNESS_CONTROL 0x02 | ||
187 | #define PU_CONTRAST_CONTROL 0x03 | ||
188 | #define PU_HUE_CONTROL 0x06 | ||
189 | #define PU_SATURATION_CONTROL 0x07 | ||
190 | #define PU_SHARPNESS_CONTROL 0x08 | ||
191 | |||
192 | /* Audio Controls */ | ||
193 | #define MUTE_CONTROL 0x01 | ||
194 | #define VOLUME_CONTROL 0x02 | ||
195 | #define AUDIO_DEFAULT_CONTROL 0x0D | ||
196 | |||
197 | /* Default Volume Levels */ | ||
198 | #define TMHW_LEV_ADJ_DECLEV_DEFAULT 0x00 | ||
199 | #define TMHW_LEV_ADJ_MONOLEV_DEFAULT 0x00 | ||
200 | #define TMHW_LEV_ADJ_NICLEV_DEFAULT 0x00 | ||
201 | #define TMHW_LEV_ADJ_SAPLEV_DEFAULT 0x00 | ||
202 | #define TMHW_LEV_ADJ_ADCLEV_DEFAULT 0x00 | ||
203 | |||
204 | /* Encoder Related Commands */ | ||
205 | #define EU_PROFILE_CONTROL 0x00 | ||
206 | #define EU_VIDEO_FORMAT_CONTROL 0x01 | ||
207 | #define EU_VIDEO_BIT_RATE_CONTROL 0x02 | ||
208 | #define EU_VIDEO_INPUT_ASPECT_CONTROL 0x0A | ||
209 | #define EU_AUDIO_FORMAT_CONTROL 0x0C | ||
210 | #define EU_AUDIO_BIT_RATE_CONTROL 0x0D | ||
166 | 211 | ||
diff --git a/drivers/media/video/saa7164/saa7164-types.h b/drivers/media/video/saa7164/saa7164-types.h index 294ec35f1819..5340404059b3 100644 --- a/drivers/media/video/saa7164/saa7164-types.h +++ b/drivers/media/video/saa7164/saa7164-types.h | |||
@@ -285,3 +285,117 @@ typedef struct { | |||
285 | u8 guidStrideFormat[16]; | 285 | u8 guidStrideFormat[16]; |
286 | } __attribute__((packed)) tmComResTSFormatDescrHeader_t; | 286 | } __attribute__((packed)) tmComResTSFormatDescrHeader_t; |
287 | 287 | ||
288 | /* Encoder related structures */ | ||
289 | |||
290 | /* A/V Mux Selector */ | ||
291 | typedef struct | ||
292 | { | ||
293 | u8 len; | ||
294 | u8 type; | ||
295 | u8 subtype; | ||
296 | u8 unitid; | ||
297 | u8 nrinpins; | ||
298 | u8 sourceid; | ||
299 | } __attribute__((packed)) tmComResSelDescrHeader_t; | ||
300 | |||
301 | /* A/V Audio processor definitions */ | ||
302 | typedef struct | ||
303 | { | ||
304 | u8 len; | ||
305 | u8 type; | ||
306 | u8 subtype; | ||
307 | u8 unitid; | ||
308 | u8 sourceid; | ||
309 | u16 wreserved; | ||
310 | u8 controlsize; | ||
311 | } __attribute__((packed)) tmComResProcDescrHeader_t; | ||
312 | |||
313 | /* Video bitrate control message */ | ||
314 | typedef struct | ||
315 | { | ||
316 | u8 ucVideoBitRateMode; | ||
317 | u32 dwVideoBitRate; | ||
318 | u32 dwVideoBitRatePeak; | ||
319 | } __attribute__((packed)) tmComResEncVideoBitRate_t; | ||
320 | |||
321 | /* Video Encoder Aspect Ratio message */ | ||
322 | typedef struct | ||
323 | { | ||
324 | u8 width; | ||
325 | u8 height; | ||
326 | } __attribute__((packed)) tmComResEncVideoInputAspectRatio_t; | ||
327 | |||
328 | /* Encoder processor definition */ | ||
329 | typedef struct | ||
330 | { | ||
331 | u8 len; | ||
332 | u8 type; | ||
333 | u8 subtype; | ||
334 | u8 unitid; | ||
335 | u8 vsourceid; | ||
336 | u8 asourceid; | ||
337 | u8 iunit; | ||
338 | u32 dwmControlCap; | ||
339 | u32 dwmProfileCap; | ||
340 | u32 dwmVidFormatCap; | ||
341 | u8 bmVidBitrateCap; | ||
342 | u16 wmVidResolutionsCap; | ||
343 | u16 wmVidFrmRateCap; | ||
344 | u32 dwmAudFormatCap; | ||
345 | u8 bmAudBitrateCap; | ||
346 | } __attribute__((packed)) tmComResEncoderDescrHeader_t; | ||
347 | |||
348 | /* Audio processor definition */ | ||
349 | typedef struct | ||
350 | { | ||
351 | u8 len; | ||
352 | u8 type; | ||
353 | u8 subtype; | ||
354 | u8 unitid; | ||
355 | u8 sourceid; | ||
356 | u8 controlsize; | ||
357 | } __attribute__((packed)) tmComResAFeatureDescrHeader_t; | ||
358 | |||
359 | /* Audio control messages */ | ||
360 | typedef struct | ||
361 | { | ||
362 | u8 ucDecoderLevel; | ||
363 | u8 ucDecoderFM_Level; | ||
364 | u8 ucMonoLevel; | ||
365 | u8 ucNICAM_Level; | ||
366 | u8 ucSAP_Level; | ||
367 | u8 ucADC_Level; | ||
368 | } __attribute__((packed)) tmComResAudioDefaults_t; | ||
369 | |||
370 | /* Audio bitrate control message */ | ||
371 | typedef struct | ||
372 | { | ||
373 | u8 ucAudioBitRateMode; | ||
374 | u32 dwAudioBitRate; | ||
375 | u32 dwAudioBitRatePeak; | ||
376 | } __attribute__((packed)) tmComResEncAudioBitRate_t; | ||
377 | |||
378 | /* Tuner / AV Decoder messages */ | ||
379 | typedef struct | ||
380 | { | ||
381 | u8 std; | ||
382 | u32 country; | ||
383 | } __attribute__((packed)) tmComResTunerStandard_t; | ||
384 | |||
385 | typedef struct | ||
386 | { | ||
387 | u8 mode; | ||
388 | } __attribute__((packed)) tmComResTunerStandardAuto_t; | ||
389 | |||
390 | /* EEPROM definition for PS stream types */ | ||
391 | typedef struct | ||
392 | { | ||
393 | u8 len; | ||
394 | u8 type; | ||
395 | u8 subtype; | ||
396 | u8 bFormatIndex; | ||
397 | u16 wPacketLength; | ||
398 | u16 wPackLength; | ||
399 | u8 bPackDataType; | ||
400 | } __attribute__((packed)) tmComResPSFormatDescrHeader_t; | ||
401 | |||