1 /********************************************************************
2  * Copyright(c) 2006-2009 Broadcom Corporation.
3  *
4  *  Name: bc_dts_defs.h
5  *
6  *  Description: Common definitions for all components. Only types
7  *		 is allowed to be included from this file.
8  *
9  *  AU
10  *
11  *  HISTORY:
12  *
13  ********************************************************************
14  * This header is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU Lesser General Public License as published
16  * by the Free Software Foundation, either version 2.1 of the License.
17  *
18  * This header is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU Lesser General Public License for more details.
22  * You should have received a copy of the GNU Lesser General Public License
23  * along with this header.  If not, see <http://www.gnu.org/licenses/>.
24  *******************************************************************/
25 
26 #ifndef _BC_DTS_DEFS_H_
27 #define _BC_DTS_DEFS_H_
28 
29 #include <linux/types.h>
30 
31 /* BIT Mask */
32 #define BC_BIT(_x)		(1 << (_x))
33 
34 enum BC_STATUS {
35 	BC_STS_SUCCESS		= 0,
36 	BC_STS_INV_ARG		= 1,
37 	BC_STS_BUSY		= 2,
38 	BC_STS_NOT_IMPL		= 3,
39 	BC_STS_PGM_QUIT		= 4,
40 	BC_STS_NO_ACCESS	= 5,
41 	BC_STS_INSUFF_RES	= 6,
42 	BC_STS_IO_ERROR		= 7,
43 	BC_STS_NO_DATA		= 8,
44 	BC_STS_VER_MISMATCH	= 9,
45 	BC_STS_TIMEOUT		= 10,
46 	BC_STS_FW_CMD_ERR	= 11,
47 	BC_STS_DEC_NOT_OPEN	= 12,
48 	BC_STS_ERR_USAGE	= 13,
49 	BC_STS_IO_USER_ABORT	= 14,
50 	BC_STS_IO_XFR_ERROR	= 15,
51 	BC_STS_DEC_NOT_STARTED	= 16,
52 	BC_STS_FWHEX_NOT_FOUND	= 17,
53 	BC_STS_FMT_CHANGE	= 18,
54 	BC_STS_HIF_ACCESS	= 19,
55 	BC_STS_CMD_CANCELLED	= 20,
56 	BC_STS_FW_AUTH_FAILED	= 21,
57 	BC_STS_BOOTLOADER_FAILED = 22,
58 	BC_STS_CERT_VERIFY_ERROR = 23,
59 	BC_STS_DEC_EXIST_OPEN	= 24,
60 	BC_STS_PENDING		= 25,
61 	BC_STS_CLK_NOCHG	= 26,
62 
63 	/* Must be the last one.*/
64 	BC_STS_ERROR		= -1
65 };
66 
67 /*------------------------------------------------------*
68  *    Registry Key Definitions				*
69  *------------------------------------------------------*/
70 #define BC_REG_KEY_MAIN_PATH	"Software\\Broadcom\\MediaPC\\70010"
71 #define BC_REG_KEY_FWPATH		"FirmwareFilePath"
72 #define BC_REG_KEY_SEC_OPT		"DbgOptions"
73 
74 /*
75  * Options:
76  *
77  *  b[5] = Enable RSA KEY in EEPROM Support
78  *  b[6] = Enable Old PIB scheme. (0 = Use PIB with video scheme)
79  *
80  *  b[12] = Enable send message to NotifyIcon
81  *
82  */
83 
84 enum BC_SW_OPTIONS {
85 	BC_OPT_DOSER_OUT_ENCRYPT	= BC_BIT(3),
86 	BC_OPT_LINK_OUT_ENCRYPT		= BC_BIT(29),
87 };
88 
89 struct BC_REG_CONFIG {
90 	uint32_t		DbgOptions;
91 };
92 
93 #if defined(__KERNEL__) || defined(__LINUX_USER__)
94 #else
95 /* Align data structures */
96 #define ALIGN(x)	__declspec(align(x))
97 #endif
98 
99 /* mode
100  * b[0]..b[7]	= _DtsDeviceOpenMode
101  * b[8]		=  Load new FW
102  * b[9]		=  Load file play back FW
103  * b[10]	=  Disk format (0 for HD DVD and 1 for BLU ray)
104  * b[11]-b[15]	=  default output resolution
105  * b[16]	=  Skip TX CPB Buffer Check
106  * b[17]	=  Adaptive Output Encrypt/Scramble Scheme
107  * b[18]-b[31]	=  reserved for future use
108  */
109 
110 /* To allow multiple apps to open the device. */
111 enum DtsDeviceOpenMode {
112 	DTS_PLAYBACK_MODE = 0,
113 	DTS_DIAG_MODE,
114 	DTS_MONITOR_MODE,
115 	DTS_HWINIT_MODE
116 };
117 
118 /* To enable the filter to selectively enable/disable fixes or erratas */
119 enum DtsDeviceFixMode {
120 	DTS_LOAD_NEW_FW		= BC_BIT(8),
121 	DTS_LOAD_FILE_PLAY_FW	= BC_BIT(9),
122 	DTS_DISK_FMT_BD		= BC_BIT(10),
123 	/* b[11]-b[15] : Default output resolution */
124 	DTS_SKIP_TX_CHK_CPB	= BC_BIT(16),
125 	DTS_ADAPTIVE_OUTPUT_PER	= BC_BIT(17),
126 	DTS_INTELLIMAP		= BC_BIT(18),
127 	/* b[19]-b[21] : select clock frequency */
128 	DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22)
129 };
130 
131 #define DTS_DFLT_RESOLUTION(x)	(x<<11)
132 
133 #define DTS_DFLT_CLOCK(x) (x<<19)
134 
135 /* F/W File Version corresponding to S/W Releases */
136 enum FW_FILE_VER {
137 	/* S/W release: 02.04.02	F/W release 2.12.2.0 */
138 	BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0))
139 };
140 
141 /*------------------------------------------------------*
142  *    Stream Types for DtsOpenDecoder()			*
143  *------------------------------------------------------*/
144 enum DtsOpenDecStreamTypes {
145 	BC_STREAM_TYPE_ES		= 0,
146 	BC_STREAM_TYPE_PES		= 1,
147 	BC_STREAM_TYPE_TS		= 2,
148 	BC_STREAM_TYPE_ES_TSTAMP	= 6,
149 };
150 
151 /*------------------------------------------------------*
152  *    Video Algorithms for DtsSetVideoParams()		*
153  *------------------------------------------------------*/
154 enum DtsSetVideoParamsAlgo {
155 	BC_VID_ALGO_H264		= 0,
156 	BC_VID_ALGO_MPEG2		= 1,
157 	BC_VID_ALGO_VC1			= 4,
158 	BC_VID_ALGO_VC1MP		= 7,
159 };
160 
161 /*------------------------------------------------------*
162  *    MPEG Extension to the PPB				*
163  *------------------------------------------------------*/
164 #define BC_MPEG_VALID_PANSCAN		(1)
165 
166 struct BC_PIB_EXT_MPEG {
167 	uint32_t	valid;
168 	/* Always valid,  defaults to picture size if no
169 	 * sequence display extension in the stream. */
170 	uint32_t	display_horizontal_size;
171 	uint32_t	display_vertical_size;
172 
173 	/* MPEG_VALID_PANSCAN
174 	 * Offsets are a copy values from the MPEG stream. */
175 	uint32_t	offset_count;
176 	int32_t		horizontal_offset[3];
177 	int32_t		vertical_offset[3];
178 };
179 
180 /*------------------------------------------------------*
181  *    H.264 Extension to the PPB			*
182  *------------------------------------------------------*/
183 /* Bit definitions for 'other.h264.valid' field */
184 #define H264_VALID_PANSCAN		(1)
185 #define H264_VALID_SPS_CROP		(2)
186 #define H264_VALID_VUI			(4)
187 
188 struct BC_PIB_EXT_H264 {
189 	/* 'valid' specifies which fields (or sets of
190 	 * fields) below are valid.  If the corresponding
191 	 * bit in 'valid' is NOT set then that field(s)
192 	 * is (are) not initialized. */
193 	uint32_t	valid;
194 
195 	/* H264_VALID_PANSCAN */
196 	uint32_t	pan_scan_count;
197 	int32_t		pan_scan_left[3];
198 	int32_t		pan_scan_right[3];
199 	int32_t		pan_scan_top[3];
200 	int32_t		pan_scan_bottom[3];
201 
202 	/* H264_VALID_SPS_CROP */
203 	int32_t		sps_crop_left;
204 	int32_t		sps_crop_right;
205 	int32_t		sps_crop_top;
206 	int32_t		sps_crop_bottom;
207 
208 	/* H264_VALID_VUI */
209 	uint32_t	chroma_top;
210 	uint32_t	chroma_bottom;
211 };
212 
213 /*------------------------------------------------------*
214  *    VC1 Extension to the PPB				*
215  *------------------------------------------------------*/
216 #define VC1_VALID_PANSCAN		(1)
217 
218 struct BC_PIB_EXT_VC1 {
219 	uint32_t	valid;
220 
221 	/* Always valid, defaults to picture size if no
222 	 * sequence display extension in the stream. */
223 	uint32_t	display_horizontal_size;
224 	uint32_t	display_vertical_size;
225 
226 	/* VC1 pan scan windows */
227 	uint32_t	num_panscan_windows;
228 	int32_t		ps_horiz_offset[4];
229 	int32_t		ps_vert_offset[4];
230 	int32_t		ps_width[4];
231 	int32_t		ps_height[4];
232 };
233 
234 /*------------------------------------------------------*
235  *    Picture Information Block				*
236  *------------------------------------------------------*/
237 #if defined(__LINUX_USER__)
238 /* Values for 'pulldown' field.  '0' means no pulldown information
239  * was present for this picture. */
240 enum {
241 	vdecNoPulldownInfo	= 0,
242 	vdecTop			= 1,
243 	vdecBottom		= 2,
244 	vdecTopBottom		= 3,
245 	vdecBottomTop		= 4,
246 	vdecTopBottomTop	= 5,
247 	vdecBottomTopBottom	= 6,
248 	vdecFrame_X2		= 7,
249 	vdecFrame_X3		= 8,
250 	vdecFrame_X1		= 9,
251 	vdecFrame_X4		= 10,
252 };
253 
254 /* Values for the 'frame_rate' field. */
255 enum {
256 	vdecFrameRateUnknown = 0,
257 	vdecFrameRate23_97,
258 	vdecFrameRate24,
259 	vdecFrameRate25,
260 	vdecFrameRate29_97,
261 	vdecFrameRate30,
262 	vdecFrameRate50,
263 	vdecFrameRate59_94,
264 	vdecFrameRate60,
265 };
266 
267 /* Values for the 'aspect_ratio' field. */
268 enum {
269 	vdecAspectRatioUnknown = 0,
270 	vdecAspectRatioSquare,
271 	vdecAspectRatio12_11,
272 	vdecAspectRatio10_11,
273 	vdecAspectRatio16_11,
274 	vdecAspectRatio40_33,
275 	vdecAspectRatio24_11,
276 	vdecAspectRatio20_11,
277 	vdecAspectRatio32_11,
278 	vdecAspectRatio80_33,
279 	vdecAspectRatio18_11,
280 	vdecAspectRatio15_11,
281 	vdecAspectRatio64_33,
282 	vdecAspectRatio160_99,
283 	vdecAspectRatio4_3,
284 	vdecAspectRatio16_9,
285 	vdecAspectRatio221_1,
286 	vdecAspectRatioOther = 255,
287 };
288 
289 /* Values for the 'colour_primaries' field. */
290 enum {
291 	vdecColourPrimariesUnknown = 0,
292 	vdecColourPrimariesBT709,
293 	vdecColourPrimariesUnspecified,
294 	vdecColourPrimariesReserved,
295 	vdecColourPrimariesBT470_2M = 4,
296 	vdecColourPrimariesBT470_2BG,
297 	vdecColourPrimariesSMPTE170M,
298 	vdecColourPrimariesSMPTE240M,
299 	vdecColourPrimariesGenericFilm,
300 };
301 /**
302  * @vdecRESOLUTION_CUSTOM: custom
303  * @vdecRESOLUTION_480i: 480i
304  * @vdecRESOLUTION_1080i: 1080i (1920x1080, 60i)
305  * @vdecRESOLUTION_NTSC: NTSC (720x483, 60i)
306  * @vdecRESOLUTION_480p: 480p (720x480, 60p)
307  * @vdecRESOLUTION_720p: 720p (1280x720, 60p)
308  * @vdecRESOLUTION_PAL1: PAL_1 (720x576, 50i)
309  * @vdecRESOLUTION_1080i25: 1080i25 (1920x1080, 50i)
310  * @vdecRESOLUTION_720p50: 720p50 (1280x720, 50p)
311  * @vdecRESOLUTION_576p: 576p (720x576, 50p)
312  * @vdecRESOLUTION_1080i29_97: 1080i (1920x1080, 59.94i)
313  * @vdecRESOLUTION_720p59_94: 720p (1280x720, 59.94p)
314  * @vdecRESOLUTION_SD_DVD: SD DVD (720x483, 60i)
315  * @vdecRESOLUTION_480p656: 480p (720x480, 60p),
316  *	output bus width 8 bit, clock 74.25MHz
317  * @vdecRESOLUTION_1080p23_976: 1080p23_976 (1920x1080, 23.976p)
318  * @vdecRESOLUTION_720p23_976: 720p23_976 (1280x720p, 23.976p)
319  * @vdecRESOLUTION_240p29_97: 240p (1440x240, 29.97p )
320  * @vdecRESOLUTION_240p30: 240p (1440x240, 30p)
321  * @vdecRESOLUTION_288p25: 288p (1440x288p, 25p)
322  * @vdecRESOLUTION_1080p29_97: 1080p29_97 (1920x1080, 29.97p)
323  * @vdecRESOLUTION_1080p30: 1080p30 (1920x1080, 30p)
324  * @vdecRESOLUTION_1080p24: 1080p24 (1920x1080, 24p)
325  * @vdecRESOLUTION_1080p25: 1080p25 (1920x1080, 25p)
326  * @vdecRESOLUTION_720p24: 720p24 (1280x720, 25p)
327  * @vdecRESOLUTION_720p29_97: 720p29.97 (1280x720, 29.97p)
328  * @vdecRESOLUTION_480p23_976: 480p23.976 (720*480, 23.976)
329  * @vdecRESOLUTION_480p29_97: 480p29.976 (720*480, 29.97p)
330  * @vdecRESOLUTION_576p25: 576p25 (720*576, 25p)
331  * @vdecRESOLUTION_480p0: 480p (720x480, 0p)
332  * @vdecRESOLUTION_480i0: 480i (720x480, 0i)
333  * @vdecRESOLUTION_576p0: 576p (720x576, 0p)
334  * @vdecRESOLUTION_720p0: 720p (1280x720, 0p)
335  * @vdecRESOLUTION_1080p0: 1080p (1920x1080, 0p)
336  * @vdecRESOLUTION_1080i0: 1080i (1920x1080, 0i)
337  */
338 enum {
339 	vdecRESOLUTION_CUSTOM	= 0x00000000,
340 	vdecRESOLUTION_480i	= 0x00000001,
341 	vdecRESOLUTION_1080i	= 0x00000002,
342 	vdecRESOLUTION_NTSC	= 0x00000003,
343 	vdecRESOLUTION_480p	= 0x00000004,
344 	vdecRESOLUTION_720p	= 0x00000005,
345 	vdecRESOLUTION_PAL1	= 0x00000006,
346 	vdecRESOLUTION_1080i25	= 0x00000007,
347 	vdecRESOLUTION_720p50	= 0x00000008,
348 	vdecRESOLUTION_576p	= 0x00000009,
349 	vdecRESOLUTION_1080i29_97 = 0x0000000A,
350 	vdecRESOLUTION_720p59_94  = 0x0000000B,
351 	vdecRESOLUTION_SD_DVD	= 0x0000000C,
352 	vdecRESOLUTION_480p656	= 0x0000000D,
353 	vdecRESOLUTION_1080p23_976 = 0x0000000E,
354 	vdecRESOLUTION_720p23_976  = 0x0000000F,
355 	vdecRESOLUTION_240p29_97   = 0x00000010,
356 	vdecRESOLUTION_240p30	= 0x00000011,
357 	vdecRESOLUTION_288p25	= 0x00000012,
358 	vdecRESOLUTION_1080p29_97 = 0x00000013,
359 	vdecRESOLUTION_1080p30	= 0x00000014,
360 	vdecRESOLUTION_1080p24	= 0x00000015,
361 	vdecRESOLUTION_1080p25	= 0x00000016,
362 	vdecRESOLUTION_720p24	= 0x00000017,
363 	vdecRESOLUTION_720p29_97  = 0x00000018,
364 	vdecRESOLUTION_480p23_976 = 0x00000019,
365 	vdecRESOLUTION_480p29_97  = 0x0000001A,
366 	vdecRESOLUTION_576p25	= 0x0000001B,
367 	/* For Zero Frame Rate */
368 	vdecRESOLUTION_480p0	= 0x0000001C,
369 	vdecRESOLUTION_480i0	= 0x0000001D,
370 	vdecRESOLUTION_576p0	= 0x0000001E,
371 	vdecRESOLUTION_720p0	= 0x0000001F,
372 	vdecRESOLUTION_1080p0	= 0x00000020,
373 	vdecRESOLUTION_1080i0	= 0x00000021,
374 };
375 
376 /* Bit definitions for 'flags' field */
377 #define VDEC_FLAG_EOS				(0x0004)
378 
379 #define VDEC_FLAG_FRAME				(0x0000)
380 #define VDEC_FLAG_FIELDPAIR			(0x0008)
381 #define VDEC_FLAG_TOPFIELD			(0x0010)
382 #define VDEC_FLAG_BOTTOMFIELD			(0x0018)
383 
384 #define VDEC_FLAG_PROGRESSIVE_SRC		(0x0000)
385 #define VDEC_FLAG_INTERLACED_SRC		(0x0020)
386 #define VDEC_FLAG_UNKNOWN_SRC			(0x0040)
387 
388 #define VDEC_FLAG_BOTTOM_FIRST			(0x0080)
389 #define VDEC_FLAG_LAST_PICTURE			(0x0100)
390 
391 #define VDEC_FLAG_PICTURE_META_DATA_PRESENT	(0x40000)
392 
393 #endif /* __LINUX_USER__ */
394 
395 enum _BC_OUTPUT_FORMAT {
396 	MODE420				= 0x0,
397 	MODE422_YUY2			= 0x1,
398 	MODE422_UYVY			= 0x2,
399 };
400 /**
401  * struct BC_PIC_INFO_BLOCK
402  * @timeStam;: Timestamp
403  * @picture_number: Ordinal display number
404  * @width:  pixels
405  * @height:  pixels
406  * @chroma_format:  0x420, 0x422 or 0x444
407  * @n_drop;:  number of non-reference frames
408  *	remaining to be dropped
409  */
410 struct BC_PIC_INFO_BLOCK {
411 	/* Common fields. */
412 	uint64_t	timeStamp;
413 	uint32_t	picture_number;
414 	uint32_t	width;
415 	uint32_t	height;
416 	uint32_t	chroma_format;
417 	uint32_t	pulldown;
418 	uint32_t	flags;
419 	uint32_t	frame_rate;
420 	uint32_t	aspect_ratio;
421 	uint32_t	colour_primaries;
422 	uint32_t	picture_meta_payload;
423 	uint32_t	sess_num;
424 	uint32_t	ycom;
425 	uint32_t	custom_aspect_ratio_width_height;
426 	uint32_t	n_drop;	/* number of non-reference frames
427 					remaining to be dropped */
428 
429 	/* Protocol-specific extensions. */
430 	union {
431 		struct BC_PIB_EXT_H264	h264;
432 		struct BC_PIB_EXT_MPEG	mpeg;
433 		struct BC_PIB_EXT_VC1	 vc1;
434 	} other;
435 
436 };
437 
438 /*------------------------------------------------------*
439  *    ProcOut Info					*
440  *------------------------------------------------------*/
441 
442 /**
443  * enum POUT_OPTIONAL_IN_FLAGS - Optional flags for ProcOut Interface.
444  * @BC_POUT_FLAGS_YV12:  Copy Data in YV12 format
445  * @BC_POUT_FLAGS_STRIDE:  Stride size is valid.
446  * @BC_POUT_FLAGS_SIZE:  Take size information from Application
447  * @BC_POUT_FLAGS_INTERLACED:  copy only half the bytes
448  * @BC_POUT_FLAGS_INTERLEAVED:  interleaved frame
449  * @:  * @BC_POUT_FLAGS_FMT_CHANGE:  Data is not VALID when this flag is set
450  * @BC_POUT_FLAGS_PIB_VALID:  PIB Information valid
451  * @BC_POUT_FLAGS_ENCRYPTED:  Data is encrypted.
452  * @BC_POUT_FLAGS_FLD_BOT:  Bottom Field data
453  */
454 enum POUT_OPTIONAL_IN_FLAGS_ {
455 	/* Flags from App to Device */
456 	BC_POUT_FLAGS_YV12	  = 0x01,
457 	BC_POUT_FLAGS_STRIDE	  = 0x02,
458 	BC_POUT_FLAGS_SIZE	  = 0x04,
459 	BC_POUT_FLAGS_INTERLACED  = 0x08,
460 	BC_POUT_FLAGS_INTERLEAVED = 0x10,
461 
462 	/* Flags from Device to APP */
463 	BC_POUT_FLAGS_FMT_CHANGE  = 0x10000,
464 	BC_POUT_FLAGS_PIB_VALID	  = 0x20000,
465 	BC_POUT_FLAGS_ENCRYPTED	  = 0x40000,
466 	BC_POUT_FLAGS_FLD_BOT	  = 0x80000,
467 };
468 
469 typedef enum BC_STATUS(*dts_pout_callback)(void  *shnd, uint32_t width,
470 			uint32_t height, uint32_t stride, void *pOut);
471 
472 /* Line 21 Closed Caption */
473 /* User Data */
474 #define MAX_UD_SIZE		1792	/* 1920 - 128 */
475 
476 /**
477  * struct BC_DTS_PROC_OUT
478  * @Ybuff: Caller Supplied buffer for Y data
479  * @YbuffSz: Caller Supplied Y buffer size
480  * @YBuffDoneSz: Transferred Y datasize
481  * @*UVbuff: Caller Supplied buffer for UV data
482  * @UVbuffSz: Caller Supplied UV buffer size
483  * @UVBuffDoneSz: Transferred UV data size
484  * @StrideSz: Caller supplied Stride Size
485  * @PoutFlags: Call IN Flags
486  * @discCnt: Picture discontinuity count
487  * @PicInfo: Picture Information Block Data
488  * @b422Mode: Picture output Mode
489  * @bPibEnc: PIB encrypted
490  */
491 struct BC_DTS_PROC_OUT {
492 	uint8_t		*Ybuff;
493 	uint32_t	YbuffSz;
494 	uint32_t	YBuffDoneSz;
495 
496 	uint8_t		*UVbuff;
497 	uint32_t	UVbuffSz;
498 	uint32_t	UVBuffDoneSz;
499 
500 	uint32_t	StrideSz;
501 	uint32_t	PoutFlags;
502 
503 	uint32_t	discCnt;
504 
505 	struct BC_PIC_INFO_BLOCK PicInfo;
506 
507 	/* Line 21 Closed Caption */
508 	/* User Data */
509 	uint32_t	UserDataSz;
510 	uint8_t		UserData[MAX_UD_SIZE];
511 
512 	void		*hnd;
513 	dts_pout_callback AppCallBack;
514 	uint8_t		DropFrames;
515 	uint8_t		b422Mode;
516 	uint8_t		bPibEnc;
517 	uint8_t		bRevertScramble;
518 
519 };
520 /**
521  * struct BC_DTS_STATUS
522  * @ReadyListCount: Number of frames in ready list (reported by driver)
523  * @PowerStateChange: Number of active state power
524  *	transitions (reported by driver)
525  * @FramesDropped:  Number of frames dropped.  (reported by DIL)
526  * @FramesCaptured: Number of frames captured. (reported by DIL)
527  * @FramesRepeated: Number of frames repeated. (reported by DIL)
528  * @InputCount:	Times compressed video has been sent to the HW.
529  *	i.e. Successful DtsProcInput() calls (reported by DIL)
530  * @InputTotalSize: Amount of compressed video that has been sent to the HW.
531  *	(reported by DIL)
532  * @InputBusyCount: Times compressed video has attempted to be sent to the HW
533  *	but the input FIFO was full. (reported by DIL)
534  * @PIBMissCount: Amount of times a PIB is invalid. (reported by DIL)
535  * @cpbEmptySize: supported only for H.264, specifically changed for
536  *	Adobe. Report size of CPB buffer available. (reported by DIL)
537  * @NextTimeStamp: TimeStamp of the next picture that will be returned
538  *	by a call to ProcOutput. Added for Adobe. Reported
539  *	back from the driver
540  */
541 struct BC_DTS_STATUS {
542 	uint8_t		ReadyListCount;
543 	uint8_t		FreeListCount;
544 	uint8_t		PowerStateChange;
545 	uint8_t		reserved_[1];
546 	uint32_t	FramesDropped;
547 	uint32_t	FramesCaptured;
548 	uint32_t	FramesRepeated;
549 	uint32_t	InputCount;
550 	uint64_t	InputTotalSize;
551 	uint32_t	InputBusyCount;
552 	uint32_t	PIBMissCount;
553 	uint32_t	cpbEmptySize;
554 	uint64_t	NextTimeStamp;
555 	uint8_t		reserved__[16];
556 };
557 
558 #define BC_SWAP32(_v)			\
559 	((((_v) & 0xFF000000)>>24)|	\
560 	  (((_v) & 0x00FF0000)>>8)|	\
561 	  (((_v) & 0x0000FF00)<<8)|	\
562 	  (((_v) & 0x000000FF)<<24))
563 
564 #define WM_AGENT_TRAYICON_DECODER_OPEN	10001
565 #define WM_AGENT_TRAYICON_DECODER_CLOSE	10002
566 #define WM_AGENT_TRAYICON_DECODER_START	10003
567 #define WM_AGENT_TRAYICON_DECODER_STOP	10004
568 #define WM_AGENT_TRAYICON_DECODER_RUN	10005
569 #define WM_AGENT_TRAYICON_DECODER_PAUSE	10006
570 
571 
572 #endif	/* _BC_DTS_DEFS_H_ */
573