• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef HDMI_INFOFRAME_H
10 #define HDMI_INFOFRAME_H
11 
12 #include "hdmi_common.h"
13 
14 #ifdef __cplusplus
15 #if __cplusplus
16 extern "C" {
17 #endif
18 #endif /* __cplusplus */
19 
20 /*
21  * An InfoFrame packet carries one InfoFrame. The InfoFrame provided by HDMI is limited to 30
22  * bytes plus a checksum byte. HDMI Sources are required, in some cases, to use the AVI InfoFrame and Audio InfoFrame
23  * and recommended in other cases. Other InfoFrames specified in CEA-861 Spec are optional.
24  *
25  * TMDS is used to carry all audio and video data as well as auxiliary data, including AVI(Auxiliary Video information)
26  * and Audio InfoFrames that describe the active audio and video streams.
27  *
28  */
29 #define HDMI_INFOFRAME_LEN 32
30 #define HDMI_INFOFRAME_PACKET_HEADER_LEN 4
31 #define HDMI_AVI_INFOFRAME_LEN 13
32 #define HDMI_AUDIO_INFOFRAME_LEN 10
33 #define HDMI_DRM_INFOFRAME_LEN 26
34 #define HDMI_SPD_INFOFRAME_LEN 25
35 #define HDMI_INFOFRAME_CHECKSUM 256
36 
37 #define UINT8_ARRAY_TELEMENT_0 0
38 #define UINT8_ARRAY_TELEMENT_1 1
39 #define UINT8_ARRAY_TELEMENT_2 2
40 #define UINT8_ARRAY_TELEMENT_3 3
41 #define UINT8_ARRAY_TELEMENT_4 4
42 #define UINT8_ARRAY_TELEMENT_5 5
43 #define UINT8_ARRAY_TELEMENT_6 6
44 #define UINT8_ARRAY_TELEMENT_7 7
45 #define UINT8_ARRAY_TELEMENT_8 8
46 #define UINT8_ARRAY_TELEMENT_9 9
47 #define UINT8_ARRAY_TELEMENT_10 10
48 #define UINT8_ARRAY_TELEMENT_11 11
49 #define UINT8_ARRAY_TELEMENT_12 12
50 #define UINT8_ARRAY_TELEMENT_13 13
51 #define UINT8_ARRAY_TELEMENT_14 14
52 #define UINT8_ARRAY_TELEMENT_15 15
53 #define UINT8_ARRAY_TELEMENT_16 16
54 #define UINT8_ARRAY_TELEMENT_17 17
55 #define UINT8_ARRAY_TELEMENT_18 18
56 #define UINT8_ARRAY_TELEMENT_19 19
57 #define UINT8_ARRAY_TELEMENT_20 20
58 #define UINT8_ARRAY_TELEMENT_21 21
59 #define UINT8_ARRAY_TELEMENT_22 22
60 #define UINT8_ARRAY_TELEMENT_23 23
61 #define UINT8_ARRAY_TELEMENT_24 24
62 #define UINT8_ARRAY_TELEMENT_25 25
63 
64 enum HdmiPacketType {
65     HDMI_PACKET_TYPE_NULL = 0x00,                      /* Null Packet */
66     HDMI_PACKET_TYPE_AUDIO_CLOCK_REGENERATION = 0x01,  /* Audio Clock Regeneration(N/CTS) */
67     HDMI_PACKET_TYPE_AUDIO_SAMPLE = 0x02,              /* Audio Samlpe(L-PCM and IEC 61937 compressed formats) */
68     HDMI_PACKET_TYPE_GENERAL_CONTROL = 0x03,           /* General Control Packet */
69     HDMI_PACKET_TYPE_ACP = 0x04,                       /* ACP(Audio Content Protection Packet) */
70     HDMI_PACKET_TYPE_ISRC1 = 0x05,                     /* ISRC(International Standard Recording Code) */
71     HDMI_PACKET_TYPE_ISRC2 = 0x06,
72     HDMI_PACKET_TYPE_ONE_BIT_AUDIO_SAMPLE = 0x07,      /* One Bit Audio Sample Packet */
73     HDMI_PACKET_TYPE_DST_AUDIO = 0x08,                 /* DST(Diret Stream Transport) Audio Packet */
74     HDMI_PACKET_TYPE_HBR_AUDIO_STREAM = 0x09,          /* HBR(High Bitrate) Audio Stream Packet */
75     HDMI_PACKET_TYPE_GAMUT_METADATA = 0x0a,            /* gamut metadata packet */
76     /* infoFrame type */
77     HDMI_INFOFRAME_PACKET_TYPE_VS = 0x81,              /* Verdor-Specific */
78     HDMI_INFOFRAME_PACKET_TYPE_AVI = 0x82,             /* Auxiliary Video Information */
79     HDMI_INFOFRAME_PACKET_TYPE_SPD = 0x83,             /* Source Product Description */
80     HDMI_INFOFRAME_PACKET_TYPE_AUDIO = 0x84,           /* Audio */
81     HDMI_INFOFRAME_PACKET_TYPE_MPEG = 0x85,            /* MPEG Source */
82     HDMI_INFOFRAME_PACKET_TYPE_GBD = 0x86,             /* gamut boundary description */
83     HDMI_INFOFRAME_PACKET_TYPE_DRM = 0x87,             /* Dynamic Range and Mastering */
84     HDMI_PACKET_TYPE_BUTT,
85 };
86 
87 struct HdmiInfoFrameHeader {
88     enum HdmiPacketType type;
89     uint8_t verNum;
90     uint8_t len;
91 };
92 
93 /* Verdor-Specific infoFrame details. */
94 #define HDMI_VENDOR_1_4_MAX_3D_METADAT_LEN 20
95 #define HDMI_VENDOR_USER_DATA_MAX_LEN 22
96 #define HDMI_VENDOR_1_4_FORMAT_MARK 0x07
97 #define HDMI_VENDOR_1_4_FORMAT_SHIFT 5
98 #define HDMI_VENDOR_3D_STRUCTURE_MARK 0x0f
99 #define HDMI_VENDOR_3D_STRUCTURE_SHIFT 4
100 #define HDMI_VENDOR_3D_EXT_DATA_MARK 0x0f
101 #define HDMI_VENDOR_3D_EXT_DATA_SHIFT 4
102 #define HDMI_VSIF_VERSION 1
103 
104 enum HdmiIeeeOui {
105     HDMI_IEEE_OUI_1_4 = 0x000c03,
106     HDMI_IEEE_OUI_2_0 = 0x045dd8,
107 };
108 
109 enum HdmiVsVideoFormat {
110     HDMI_VS_VIDEO_FORMAT_NULL = 0,
111     HDMI_VS_VIDEO_FORMAT_4K = 1,
112     HDMI_VS_VIDEO_FORMAT_3D = 2,
113     HDMI_VS_VIDEO_FORMAT_BUTT,
114 };
115 
116 enum HdmiVs3dExtData {
117     HDMI_3D_PICTURE_HORIZONTAL_ODD_LEFT_ODD_RIGHT = 0,
118     HDMI_3D_PICTURE_HORIZONTAL_ODD_LEFT_EVEN_RIGHT = 1,
119     HDMI_3D_PICTURE_HORIZONTAL_EVEN_LEFT_ODD_RIGHT = 2,
120     HDMI_3D_PICTURE_HORIZONTAL_EVEN_LEFT_EVEN_RIGHT = 3,
121     HDMI_3D_PICTURE_MATRIX_ODD_LEFT_ODD_RIGHT = 4,
122     HDMI_3D_PICTURE_MATRIX_ODD_LEFT_EVEN_RIGHT = 5,
123     HDMI_3D_PICTURE_MATRIX_EVEN_LEFT_ODD_RIGHT = 6,
124     HDMI_3D_PICTURE_MATRIX_EVEN_LEFT_EVEN_RIGHT = 7,
125     HDMI_3D_PICTURE_BUTT,
126 };
127 
128 struct HdmiVs14VsifContent {
129     enum HdmiIeeeOui oui;
130     enum HdmiVsVideoFormat format;
131     enum Hdmi4kVic vic;
132     bool _3dMetaPresent;
133     enum HdmiVideo3dStructure _3dStruct;
134     enum HdmiVs3dExtData _3dExtData;
135     uint8_t _3dMetadataType;
136     uint8_t _3dMetadataLen;
137     uint8_t _3dMetadata[HDMI_VENDOR_1_4_MAX_3D_METADAT_LEN];
138 };
139 
140 struct HdmiVsUserVsifContent {
141     enum HdmiIeeeOui oui;
142     enum HdmiVsVideoFormat format;
143     enum Hdmi4kVic vic;
144     bool _3dMetaPresent;
145     enum HdmiVideo3dStructure _3dStruct;
146     uint8_t len;
147     uint8_t data[HDMI_VENDOR_USER_DATA_MAX_LEN];
148 };
149 
150 struct HdmiForumVsifContent {
151     enum HdmiIeeeOui oui;
152     uint8_t version;
153     bool _3dValid;
154     uint8_t _3dFStructure;
155     bool _3dAdditionalInfoPresent;
156     bool _3dDisparityDataPresent;
157     bool _3dMetaPresent;
158     uint8_t _3dFExtData;
159     uint8_t _3dDualView;
160     uint8_t _3dViewDependency;
161     uint8_t _3dPreferred2dView;
162     uint8_t _3dDisparityDataVersion;
163     uint8_t _3dDisparityDataLen;
164     uint8_t _3dDisparityData[10];
165     uint8_t _3dMetadataType;
166     uint8_t _3dMetadataLen;
167     uint8_t _3dMetadata[10];
168 };
169 
170 struct HdmiVsInfoFrame {
171     enum HdmiPacketType type;
172     uint8_t verNum;
173     uint8_t len;
174     union {
175         struct HdmiVs14VsifContent vsif;
176         struct HdmiVsUserVsifContent userVsif;
177         struct HdmiForumVsifContent forumVsif;
178     } vsifContent;
179 };
180 
181 /* AVI infoFrame details. */
182 #define HDMI_AVI_COLOR_SPACE_MARK 0x03
183 #define HDMI_AVI_SCAN_MODE_MARK 0x03
184 #define HDMI_AVI_COLOR_SPACE_SHIFT 5
185 #define HDMI_AVI_ACTIVE_INFORMATION_SHIFT 4
186 #define HDMI_AVI_HORIZONTAL_BAR_SHIFT 3
187 #define HDMI_AVI_VERTICAL_BAR_SHIFT 2
188 
189 #define HDMI_AVI_COLORIMETRY_MARK 0x03
190 #define HDMI_AVI_PICTURE_ASPECT_RATE_MARK 0x03
191 #define HDMI_AVI_ACTIVE_FORMAT_ASPECT_RATE_MARK 0x0f
192 #define HDMI_AVI_COLORIMETRY_SHIFT 6
193 #define HDMI_AVI_PICTURE_ASPECT_RATE_SHIFT 4
194 
195 #define HDMI_AVI_EXT_COLORIMETRY_MARK 0x07
196 #define HDMI_AVI_EXT_QUANTIZATION_RANGE_MARK 0x03
197 #define HDMI_AVI_NUPS_RANGE_MARK 0x03
198 #define HDMI_AVI_IT_CONTENT_SHIFT 7
199 #define HDMI_AVI_EXT_COLORIMETRY_SHIFT 4
200 #define HDMI_AVI_EXT_QUANTIZATION_RANGE_SHIFT 2
201 
202 #define HDMI_AVI_YCC_QUANTIZATION_RANGE_MARK 0x03
203 #define HDMI_AVI_IT_CONTENT_TYPE_MARK 0x03
204 #define HDMI_AVI_PIXEL_REPETION_FACTOR_MARK 0x0f
205 #define HDMI_AVI_YCC_QUANTIZATION_RANGE_SHIFT 6
206 #define HDMI_AVI_IT_CONTENT_TYPE_SHIFT 4
207 
208 #define HDMI_AVI_BAR_MODE_MARK 0xff
209 #define HDMI_AVI_BAR_MODE_SHIFT 8
210 
211 #define HDMI_AVI_VERSION2 2
212 #define HDMI_AVI_VERSION3 3
213 #define HDMI_AVI_VERSION4 4
214 #define HDMI_AVI_Y2_MASK (0x1 << 2)
215 
216 enum HdmiScanMode {
217     HDMI_SCAN_MODE_NO_DATA = 0,
218     HDMI_SCAN_MODE_OVERSCAN = 1,
219     HDMI_SCAN_MODE_UNDERSCAN = 2,
220     HDMI_SCAN_MODE_FUTURE = 3,
221 };
222 
223 enum HdmiItContentType {
224     HDMI_IT_CONTENT_TYPE_GRAPHICS = 0,
225     HDMI_IT_CONTENT_TYPE_PHOTO = 1,
226     HDMI_IT_CONTENT_TYPE_CINEMA = 2,
227     HDMI_IT_CONTENT_TYPE_GAME = 3,
228 };
229 
230 struct HdmiAviInfoFrame {
231     enum HdmiPacketType type;
232     uint8_t verNum;
233     uint8_t len;
234     enum HdmiScanMode scanMode;
235     bool vertBarInfoPresent;
236     bool horizBarInfoPresent;
237     bool activeFormatInformationPresent;
238     enum HdmiColorSpace colorSpace;
239     enum HdmiActiveFormatAspectRatio activeAspect;
240     enum HdmiPictureAspectRatio pictureAspect;
241     enum HdmiColorimetry colorimetry;
242     enum HdmiNups nups;
243     enum HdmiQuantizationRange range;
244     enum HdmiExtendedColorimetry extColorimetry;
245     bool itc; /* IT content */
246     uint8_t vic;
247     uint8_t pixelRepetitionFactor;
248     enum HdmiItContentType itcType;
249     enum HdmiYccQuantizationRange yccRange;
250     uint16_t topBar;
251     uint16_t bottomBar;
252     uint16_t leftBar;
253     uint16_t rightBar;
254 };
255 
256 /* Audio infoFrame details. */
257 #define HDMI_AUDIO_INFOFRAME_VERSION 1
258 #define HDMI_AUDIO_CODING_TYPE_MARK 0x0f
259 #define HDMI_AUDIO_CHANNEL_COUNT_MARK 0x07
260 #define HDMI_AUDIO_CODING_TYPE_SHIFT 4
261 
262 #define HDMI_AUDIO_SAMPLE_FREQUENCY_MARK 0x07
263 #define HDMI_AUDIO_SAMPLE_SIZE_MARK 0x03
264 #define HDMI_AUDIO_SAMPLE_FREQUENCY_SHIFT 2
265 
266 #define HDMI_AUDIO_CXT_MARK 0x1f
267 
268 #define HDMI_AUDIO_LEVEL_SHIFT_VALUE_MARK 0x0f
269 #define HDMI_AUDIO_LEF_PLAYBACK_LEVEL_MARK 0x03
270 #define HDMI_AUDIO_DM_INH_SHIFT 7
271 #define HDMI_AUDIO_LEVEL_SHIFT_VALUE_SHIFT 3
272 
273 enum HdmiAudioSampleSize {
274     HDMI_AUDIO_SAMPLE_SIZE_STREAM = 0,
275     HDMI_AUDIO_SAMPLE_SIZE_16_BIT = 1,
276     HDMI_AUDIO_SAMPLE_SIZE_20_BIT = 2,
277     HDMI_AUDIO_SAMPLE_SIZE_24_BIT = 3,
278 };
279 
280 enum HdmiAudioSampleFrequency {
281     HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM = 0,
282     HDMI_AUDIO_SAMPLE_FREQUENCY_32K = 1,
283     HDMI_AUDIO_SAMPLE_FREQUENCY_44_1K = 2,
284     HDMI_AUDIO_SAMPLE_FREQUENCY_48K = 3,
285     HDMI_AUDIO_SAMPLE_FREQUENCY_88_2K = 4,
286     HDMI_AUDIO_SAMPLE_FREQUENCY_96K = 5,
287     HDMI_AUDIO_SAMPLE_FREQUENCY_176_4K = 6,
288     HDMI_AUDIO_SAMPLE_FREQUENCY_192K = 7,
289 };
290 
291 enum HdmiAudioCodingExtType {
292     /* Refer to Audio Coding Type (CT) field in Data Byte 1 */
293     HDMI_AUDIO_CODING_EXT_TYPET_CT = 0,
294 
295     /*
296      * The next three CXT values are defined in CEA-861-E only.
297      * They do not exist in older versions, and in CEA-861-F they are
298      * defined as 'Not in use'.
299      */
300     HDMI_AUDIO_CODING_EXT_TYPET_HE_AAC = 1,
301     HDMI_AUDIO_CODING_EXT_TYPET_HE_AAC_V2 = 2,
302     HDMI_AUDIO_CODING_EXT_TYPET_MPEG_SURROUND = 3,
303 
304     HDMI_AUDIO_CODING_EXT_TYPET_MPEG4_HE_AAC = 4,
305     HDMI_AUDIO_CODING_EXT_TYPET_MPEG4_HE_AAC_V2 = 5,
306     HDMI_AUDIO_CODING_EXT_TYPET_MPEG4_AAC_LC = 6,
307     HDMI_AUDIO_CODING_EXT_TYPET_DRA = 7,
308     HDMI_AUDIO_CODING_EXT_TYPET_MPEG4_HE_AAC_SURROUND = 8,
309     HDMI_AUDIO_CODING_EXT_TYPET_RESERVED = 9,
310     HDMI_AUDIO_CODING_EXT_TYPET_MPEG4_AAC_LC_SURROUND = 10,
311 
312     HDMI_AUDIO_CODING_EXT_TYPET_MPEGH_3D_AUDIO = 11,
313     HDMI_AUDIO_CODING_EXT_TYPET_AC4 = 12,
314     HDMI_AUDIO_CODING_EXT_TYPET_LPCM_3D_AUDIO = 13,
315     HDMI_AUDIO_CODING_EXT_TYPET_BUTT,
316 };
317 
318 /* LEF(Low Frequency Effects) playback level. */
319 enum HdmiAudioLfePlaybackLevel {
320     HDMI_AUDIO_LFE_PLAYBACK_NULL = 0,
321     HDMI_AUDIO_LFE_PLAYBACK_0DB = 1,
322     HDMI_AUDIO_LFE_PLAYBACK_10DB = 2,
323     HDMI_AUDIO_LFE_PLAYBAC_BUTT,
324 };
325 
326 struct HdmiAudioInfoFrame {
327     enum HdmiPacketType type;
328     uint8_t verNum;
329     uint8_t len;
330     uint8_t channelCount;
331     enum HdmiAudioCodingType codingType;
332     enum HdmiAudioSampleSize sampleSize;
333     enum HdmiAudioSampleFrequency sampleFreq;
334     enum HdmiAudioCodingExtType codingExtType;
335     uint8_t channelAllocation;
336     enum HdmiAudioLfePlaybackLevel playBackLevel;
337     uint8_t levelShiftValue;
338     bool dmInh; /* Down-mix Inhibit Flag */
339 };
340 
341 /* Source Product Description infoFrame details. */
342 #define HDMI_SPD_VENDOR_NAME_LEN 8
343 #define HDMI_SPD_PRODUCT_DESCRIPTION_LEN 16
344 #define HDMI_SPD_VERSION 1
345 
346 /* SDI(Source Device Information) */
347 enum HdmiSpdSdi {
348     HDMI_SPD_SDI_NULL = 0,
349     HDMI_SPD_SDI_DIGITAL_STB = 1,
350     HDMI_SPD_SDI_DVD_PLAYER = 2,
351     HDMI_SPD_SDI_D_VHS = 3,
352     HDMI_SPD_SDI_HDD_VIDEORECORDER = 4,
353     HDMI_SPD_SDI_DVC = 5,
354     HDMI_SPD_SDI_DSC = 6,
355     HDMI_SPD_SDI_VIDEO_CD = 7,
356     HDMI_SPD_SDI_GAME = 8,
357     HDMI_SPD_SDI_PC_GENERAL = 9,
358     HDMI_SPD_SDI_BLU_RAY_DIS = 10,
359     HDMI_SPD_SDI_SUPER_AUDIO_CD = 11,
360     HDMI_SPD_SDI_HDDVD = 12,
361     HDMI_SPD_SDI_PMP = 13,
362     HDMI_SPD_SDI_BUTT,
363 };
364 
365 struct HdmiSpdInfoFrame {
366     enum HdmiPacketType type;
367     uint8_t verNum;
368     uint8_t len;
369     char vendorName[HDMI_SPD_VENDOR_NAME_LEN];
370     char productDescription[HDMI_SPD_PRODUCT_DESCRIPTION_LEN];
371     enum HdmiSpdSdi sdi;
372 };
373 
374 /* Dynamic Range and Mastering infoFrame details. */
375 #define HDMI_DRM_METADATA_MARK 0xff
376 #define HDMI_DRM_METADATA_SHIFT 8
377 #define HDMI_DRM_INFOFRAME_VERSION 1
378 
379 struct HdmiDrmInfoFrame {
380     enum HdmiPacketType type;
381     uint8_t verNum;
382     uint8_t len;
383     enum HdmiEotfType eotfType;
384     enum HdmiStaticMetadataType metadataType;
385     union HdmiStaticMetadataDescriptor des;
386 };
387 
388 /* GBD(gamut boundary description) */
389 union HdmiGbdHb1 {
390     struct {
391         uint8_t affectedGamutSeqNum : 4;  /* [0:3] */
392         uint8_t gbdProfil : 3;  /* [4:5] */
393         uint8_t reserved : 1;   /* [6] */
394         uint8_t noCrntGbd : 1;  /* [7] */
395     } bits;
396     uint8_t val;
397 };
398 
399 union HdmiGbdHb2 {
400     struct {
401         uint8_t currentGamutSeqNum : 4;  /* [0:3] */
402         uint8_t packetSeq : 2;  /* [4:5] */
403         uint8_t nextField : 1;  /* [7] */
404     } bits;
405     uint8_t val;
406 };
407 
408 union HdmiGbdRangeData0 {
409     struct {
410         uint8_t gbdColorSpace : 3; /* [0:2] */
411         uint8_t gbdColorPercision : 2; /* [3:4] */
412         uint8_t rsvd : 2; /* [5:6] */
413         uint8_t formatFlag : 1; /* [7] */
414     } bits;
415     uint8_t val;
416 };
417 
418 struct HdmiGbdPacket {
419     uint8_t hb0;
420     union HdmiGbdHb1 hb1;
421     union HdmiGbdHb2 hb2;
422     union HdmiGbdRangeData0 data0;
423     uint8_t minRedDataH;
424     uint8_t midRedData;  /* Min_Red_Data_L | Max_Red_Data_H */
425     uint8_t maxRedDataL;
426     uint8_t minGreenDataH;
427     uint8_t midGreenData;  /* Min_Green_Data_L | Max_Green_Data_H */
428     uint8_t maxGreenDataL;
429     uint8_t minBlueDataH;
430     uint8_t midBlueData;  /* Min_Blue_Data_L | Max_Blue_Data_H */
431     uint8_t maxBlueDataL;
432 };
433 
434 union HdmiInfoFrameInfo {
435     struct HdmiInfoFrameHeader header;
436     struct HdmiVsInfoFrame vs;
437     struct HdmiAviInfoFrame avi;
438     struct HdmiAudioInfoFrame audio;
439     struct HdmiSpdInfoFrame spd;
440     struct HdmiDrmInfoFrame drm;
441     struct HdmiGbdPacket gbd;
442 };
443 
444 /*
445  * InfoFrame: A data structure defined in CEA-861-D that is designed to carry a variety of auxiliary data items
446  * regarding the audio or video streams or the source device and is carried from Source to Sink across HDMI.
447  */
448 struct HdmiInfoFrame {
449     enum HdmiPacketType infoFrameType;
450     bool hdrSupport;
451     struct HdmiVsInfoFrame vs;
452     struct HdmiAviInfoFrame avi;
453     struct HdmiAudioInfoFrame audio;
454     struct HdmiSpdInfoFrame spd;
455     struct HdmiDrmInfoFrame drm;
456     struct HdmiGbdPacket gbd;
457     struct HdmiVsUserVsifContent userVsif;
458     void *priv;
459 };
460 
461 struct HdmiInfoFrameStatus {
462     bool vsifEnable;
463     bool aviEnable;
464     bool audioEnable;
465     bool spdEnable;
466     bool drmEnable;
467     bool gdbEnable;
468     uint8_t avi[HDMI_INFOFRAME_LEN];
469     uint8_t audio[HDMI_INFOFRAME_LEN];
470     uint8_t vsif[HDMI_INFOFRAME_LEN];
471     uint8_t spd[HDMI_INFOFRAME_LEN];
472     uint8_t drm[HDMI_INFOFRAME_LEN];
473     uint8_t gdb[HDMI_INFOFRAME_LEN];
474 };
475 
476 int32_t HdmiAudioInfoFrameSend(struct HdmiInfoFrame *frame, bool enable);
477 int32_t HdmiAviInfoFrameSend(struct HdmiInfoFrame *frame, bool enable);
478 int32_t HdmiDrmInfoFrameSend(struct HdmiInfoFrame *frame, bool enable);
479 int32_t HdmiVsInfoFrameSend(struct HdmiInfoFrame *frame, bool enable, bool dolbyEnable);
480 int32_t HdmiSpdInfoFrameSend(struct HdmiInfoFrame *frame, bool enable,
481     const char *vendorName, const char *productName, enum HdmiSpdSdi sdi);
482 int32_t HdmiInfoFrameGetInfo(struct HdmiInfoFrame *frame, enum HdmiPacketType type,
483     union HdmiInfoFrameInfo *infoFrame);
484 int32_t HdmiInfoFrameSetInfo(struct HdmiInfoFrame *frame, enum HdmiPacketType type,
485     union HdmiInfoFrameInfo *infoFrame);
486 
487 #ifdef __cplusplus
488 #if __cplusplus
489 }
490 #endif
491 #endif /* __cplusplus */
492 
493 #endif /* HDMI_INFOFRAME_H */
494