Lines Matching +full:aac +full:- +full:mode
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
43 return 256 - csum; in hdmi_infoframe_checksum()
54 * hdmi_avi_infoframe_init() - initialize an HDMI AVI infoframe
61 frame->type = HDMI_INFOFRAME_TYPE_AVI; in hdmi_avi_infoframe_init()
62 frame->version = 2; in hdmi_avi_infoframe_init()
63 frame->length = HDMI_AVI_INFOFRAME_SIZE; in hdmi_avi_infoframe_init()
69 if (frame->type != HDMI_INFOFRAME_TYPE_AVI || in hdmi_avi_infoframe_check_only()
70 frame->version != 2 || in hdmi_avi_infoframe_check_only()
71 frame->length != HDMI_AVI_INFOFRAME_SIZE) in hdmi_avi_infoframe_check_only()
72 return -EINVAL; in hdmi_avi_infoframe_check_only()
74 if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9) in hdmi_avi_infoframe_check_only()
75 return -EINVAL; in hdmi_avi_infoframe_check_only()
81 * hdmi_avi_infoframe_check() - check a HDMI AVI infoframe
96 * hdmi_avi_infoframe_pack_only() - write HDMI AVI infoframe to binary buffer
120 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_avi_infoframe_pack_only()
123 return -ENOSPC; in hdmi_avi_infoframe_pack_only()
127 ptr[0] = frame->type; in hdmi_avi_infoframe_pack_only()
128 ptr[1] = frame->version; in hdmi_avi_infoframe_pack_only()
129 ptr[2] = frame->length; in hdmi_avi_infoframe_pack_only()
135 ptr[0] = ((frame->colorspace & 0x3) << 5) | (frame->scan_mode & 0x3); in hdmi_avi_infoframe_pack_only()
141 if (frame->active_aspect & 0xf) in hdmi_avi_infoframe_pack_only()
145 if (frame->top_bar || frame->bottom_bar) in hdmi_avi_infoframe_pack_only()
148 if (frame->left_bar || frame->right_bar) in hdmi_avi_infoframe_pack_only()
151 ptr[1] = ((frame->colorimetry & 0x3) << 6) | in hdmi_avi_infoframe_pack_only()
152 ((frame->picture_aspect & 0x3) << 4) | in hdmi_avi_infoframe_pack_only()
153 (frame->active_aspect & 0xf); in hdmi_avi_infoframe_pack_only()
155 ptr[2] = ((frame->extended_colorimetry & 0x7) << 4) | in hdmi_avi_infoframe_pack_only()
156 ((frame->quantization_range & 0x3) << 2) | in hdmi_avi_infoframe_pack_only()
157 (frame->nups & 0x3); in hdmi_avi_infoframe_pack_only()
159 if (frame->itc) in hdmi_avi_infoframe_pack_only()
162 ptr[3] = frame->video_code & 0x7f; in hdmi_avi_infoframe_pack_only()
164 ptr[4] = ((frame->ycc_quantization_range & 0x3) << 6) | in hdmi_avi_infoframe_pack_only()
165 ((frame->content_type & 0x3) << 4) | in hdmi_avi_infoframe_pack_only()
166 (frame->pixel_repeat & 0xf); in hdmi_avi_infoframe_pack_only()
168 ptr[5] = frame->top_bar & 0xff; in hdmi_avi_infoframe_pack_only()
169 ptr[6] = (frame->top_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
170 ptr[7] = frame->bottom_bar & 0xff; in hdmi_avi_infoframe_pack_only()
171 ptr[8] = (frame->bottom_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
172 ptr[9] = frame->left_bar & 0xff; in hdmi_avi_infoframe_pack_only()
173 ptr[10] = (frame->left_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
174 ptr[11] = frame->right_bar & 0xff; in hdmi_avi_infoframe_pack_only()
175 ptr[12] = (frame->right_bar >> 8) & 0xff; in hdmi_avi_infoframe_pack_only()
184 * hdmi_avi_infoframe_pack() - check a HDMI AVI infoframe,
214 * hdmi_spd_infoframe_init() - initialize an HDMI SPD infoframe
226 frame->type = HDMI_INFOFRAME_TYPE_SPD; in hdmi_spd_infoframe_init()
227 frame->version = 1; in hdmi_spd_infoframe_init()
228 frame->length = HDMI_SPD_INFOFRAME_SIZE; in hdmi_spd_infoframe_init()
230 strncpy(frame->vendor, vendor, sizeof(frame->vendor)); in hdmi_spd_infoframe_init()
231 strncpy(frame->product, product, sizeof(frame->product)); in hdmi_spd_infoframe_init()
239 if (frame->type != HDMI_INFOFRAME_TYPE_SPD || in hdmi_spd_infoframe_check_only()
240 frame->version != 1 || in hdmi_spd_infoframe_check_only()
241 frame->length != HDMI_SPD_INFOFRAME_SIZE) in hdmi_spd_infoframe_check_only()
242 return -EINVAL; in hdmi_spd_infoframe_check_only()
248 * hdmi_spd_infoframe_check() - check a HDMI SPD infoframe
263 * hdmi_spd_infoframe_pack_only() - write HDMI SPD infoframe to binary buffer
287 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_spd_infoframe_pack_only()
290 return -ENOSPC; in hdmi_spd_infoframe_pack_only()
294 ptr[0] = frame->type; in hdmi_spd_infoframe_pack_only()
295 ptr[1] = frame->version; in hdmi_spd_infoframe_pack_only()
296 ptr[2] = frame->length; in hdmi_spd_infoframe_pack_only()
302 memcpy(ptr, frame->vendor, sizeof(frame->vendor)); in hdmi_spd_infoframe_pack_only()
303 memcpy(ptr + 8, frame->product, sizeof(frame->product)); in hdmi_spd_infoframe_pack_only()
305 ptr[24] = frame->sdi; in hdmi_spd_infoframe_pack_only()
314 * hdmi_spd_infoframe_pack() - check a HDMI SPD infoframe,
344 * hdmi_audio_infoframe_init() - initialize an HDMI audio infoframe
353 frame->type = HDMI_INFOFRAME_TYPE_AUDIO; in hdmi_audio_infoframe_init()
354 frame->version = 1; in hdmi_audio_infoframe_init()
355 frame->length = HDMI_AUDIO_INFOFRAME_SIZE; in hdmi_audio_infoframe_init()
363 if (frame->type != HDMI_INFOFRAME_TYPE_AUDIO || in hdmi_audio_infoframe_check_only()
364 frame->version != 1 || in hdmi_audio_infoframe_check_only()
365 frame->length != HDMI_AUDIO_INFOFRAME_SIZE) in hdmi_audio_infoframe_check_only()
366 return -EINVAL; in hdmi_audio_infoframe_check_only()
372 * hdmi_audio_infoframe_check() - check a HDMI audio infoframe
387 * hdmi_audio_infoframe_pack_only() - write HDMI audio infoframe to binary buffer
412 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_audio_infoframe_pack_only()
415 return -ENOSPC; in hdmi_audio_infoframe_pack_only()
419 if (frame->channels >= 2) in hdmi_audio_infoframe_pack_only()
420 channels = frame->channels - 1; in hdmi_audio_infoframe_pack_only()
424 ptr[0] = frame->type; in hdmi_audio_infoframe_pack_only()
425 ptr[1] = frame->version; in hdmi_audio_infoframe_pack_only()
426 ptr[2] = frame->length; in hdmi_audio_infoframe_pack_only()
432 ptr[0] = ((frame->coding_type & 0xf) << 4) | (channels & 0x7); in hdmi_audio_infoframe_pack_only()
433 ptr[1] = ((frame->sample_frequency & 0x7) << 2) | in hdmi_audio_infoframe_pack_only()
434 (frame->sample_size & 0x3); in hdmi_audio_infoframe_pack_only()
435 ptr[2] = frame->coding_type_ext & 0x1f; in hdmi_audio_infoframe_pack_only()
436 ptr[3] = frame->channel_allocation; in hdmi_audio_infoframe_pack_only()
437 ptr[4] = (frame->level_shift_value & 0xf) << 3; in hdmi_audio_infoframe_pack_only()
439 if (frame->downmix_inhibit) in hdmi_audio_infoframe_pack_only()
449 * hdmi_audio_infoframe_pack() - check a HDMI Audio infoframe,
479 * hdmi_vendor_infoframe_init() - initialize an HDMI vendor infoframe
488 frame->type = HDMI_INFOFRAME_TYPE_VENDOR; in hdmi_vendor_infoframe_init()
489 frame->version = 1; in hdmi_vendor_infoframe_init()
491 frame->oui = HDMI_IEEE_OUI; in hdmi_vendor_infoframe_init()
497 frame->s3d_struct = HDMI_3D_STRUCTURE_INVALID; in hdmi_vendor_infoframe_init()
498 frame->length = HDMI_VENDOR_INFOFRAME_SIZE; in hdmi_vendor_infoframe_init()
507 if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) in hdmi_vendor_infoframe_length()
509 else if (frame->vic != 0 || frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) in hdmi_vendor_infoframe_length()
517 if (frame->type != HDMI_INFOFRAME_TYPE_VENDOR || in hdmi_vendor_infoframe_check_only()
518 frame->version != 1 || in hdmi_vendor_infoframe_check_only()
519 frame->oui != HDMI_IEEE_OUI) in hdmi_vendor_infoframe_check_only()
520 return -EINVAL; in hdmi_vendor_infoframe_check_only()
523 if (frame->vic != 0 && frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) in hdmi_vendor_infoframe_check_only()
524 return -EINVAL; in hdmi_vendor_infoframe_check_only()
526 if (frame->length != hdmi_vendor_infoframe_length(frame)) in hdmi_vendor_infoframe_check_only()
527 return -EINVAL; in hdmi_vendor_infoframe_check_only()
533 * hdmi_vendor_infoframe_check() - check a HDMI vendor infoframe
543 frame->length = hdmi_vendor_infoframe_length(frame); in hdmi_vendor_infoframe_check()
550 * hdmi_vendor_infoframe_pack_only() - write a HDMI vendor infoframe to binary buffer
574 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_vendor_infoframe_pack_only()
577 return -ENOSPC; in hdmi_vendor_infoframe_pack_only()
581 ptr[0] = frame->type; in hdmi_vendor_infoframe_pack_only()
582 ptr[1] = frame->version; in hdmi_vendor_infoframe_pack_only()
583 ptr[2] = frame->length; in hdmi_vendor_infoframe_pack_only()
591 if (frame->s3d_struct != HDMI_3D_STRUCTURE_INVALID) { in hdmi_vendor_infoframe_pack_only()
593 ptr[8] = (frame->s3d_struct & 0xf) << 4; in hdmi_vendor_infoframe_pack_only()
594 if (frame->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) in hdmi_vendor_infoframe_pack_only()
595 ptr[9] = (frame->s3d_ext_data & 0xf) << 4; in hdmi_vendor_infoframe_pack_only()
596 } else if (frame->vic) { in hdmi_vendor_infoframe_pack_only()
598 ptr[8] = frame->vic; in hdmi_vendor_infoframe_pack_only()
610 * hdmi_vendor_infoframe_pack() - check a HDMI Vendor infoframe,
642 if (frame->any.type != HDMI_INFOFRAME_TYPE_VENDOR || in hdmi_vendor_any_infoframe_check_only()
643 frame->any.version != 1) in hdmi_vendor_any_infoframe_check_only()
644 return -EINVAL; in hdmi_vendor_any_infoframe_check_only()
650 * hdmi_drm_infoframe_init() - initialize an HDMI Dynaminc Range and
660 frame->type = HDMI_INFOFRAME_TYPE_DRM; in hdmi_drm_infoframe_init()
661 frame->version = 1; in hdmi_drm_infoframe_init()
662 frame->length = HDMI_DRM_INFOFRAME_SIZE; in hdmi_drm_infoframe_init()
670 if (frame->type != HDMI_INFOFRAME_TYPE_DRM || in hdmi_drm_infoframe_check_only()
671 frame->version != 1) in hdmi_drm_infoframe_check_only()
672 return -EINVAL; in hdmi_drm_infoframe_check_only()
674 if (frame->length != HDMI_DRM_INFOFRAME_SIZE) in hdmi_drm_infoframe_check_only()
675 return -EINVAL; in hdmi_drm_infoframe_check_only()
681 * hdmi_drm_infoframe_check() - check a HDMI DRM infoframe
694 * hdmi_drm_infoframe_pack_only() - write HDMI DRM infoframe to binary buffer
714 length = HDMI_INFOFRAME_HEADER_SIZE + frame->length; in hdmi_drm_infoframe_pack_only()
717 return -ENOSPC; in hdmi_drm_infoframe_pack_only()
721 ptr[0] = frame->type; in hdmi_drm_infoframe_pack_only()
722 ptr[1] = frame->version; in hdmi_drm_infoframe_pack_only()
723 ptr[2] = frame->length; in hdmi_drm_infoframe_pack_only()
729 *ptr++ = frame->eotf; in hdmi_drm_infoframe_pack_only()
730 *ptr++ = frame->metadata_type; in hdmi_drm_infoframe_pack_only()
733 *ptr++ = frame->display_primaries[i].x; in hdmi_drm_infoframe_pack_only()
734 *ptr++ = frame->display_primaries[i].x >> 8; in hdmi_drm_infoframe_pack_only()
735 *ptr++ = frame->display_primaries[i].y; in hdmi_drm_infoframe_pack_only()
736 *ptr++ = frame->display_primaries[i].y >> 8; in hdmi_drm_infoframe_pack_only()
739 *ptr++ = frame->white_point.x; in hdmi_drm_infoframe_pack_only()
740 *ptr++ = frame->white_point.x >> 8; in hdmi_drm_infoframe_pack_only()
742 *ptr++ = frame->white_point.y; in hdmi_drm_infoframe_pack_only()
743 *ptr++ = frame->white_point.y >> 8; in hdmi_drm_infoframe_pack_only()
745 *ptr++ = frame->max_display_mastering_luminance; in hdmi_drm_infoframe_pack_only()
746 *ptr++ = frame->max_display_mastering_luminance >> 8; in hdmi_drm_infoframe_pack_only()
748 *ptr++ = frame->min_display_mastering_luminance; in hdmi_drm_infoframe_pack_only()
749 *ptr++ = frame->min_display_mastering_luminance >> 8; in hdmi_drm_infoframe_pack_only()
751 *ptr++ = frame->max_cll; in hdmi_drm_infoframe_pack_only()
752 *ptr++ = frame->max_cll >> 8; in hdmi_drm_infoframe_pack_only()
754 *ptr++ = frame->max_fall; in hdmi_drm_infoframe_pack_only()
755 *ptr++ = frame->max_fall >> 8; in hdmi_drm_infoframe_pack_only()
764 * hdmi_drm_infoframe_pack() - check a HDMI DRM infoframe,
794 * hdmi_vendor_any_infoframe_check() - check a vendor infoframe
806 if (frame->any.oui != HDMI_IEEE_OUI) in hdmi_vendor_any_infoframe_check()
807 return -EINVAL; in hdmi_vendor_any_infoframe_check()
809 return hdmi_vendor_infoframe_check(&frame->hdmi); in hdmi_vendor_any_infoframe_check()
813 * hdmi_vendor_any_infoframe_pack_only() - write a vendor infoframe to binary buffer
826 if (frame->any.oui != HDMI_IEEE_OUI) in hdmi_vendor_any_infoframe_pack_only()
827 return -EINVAL; in hdmi_vendor_any_infoframe_pack_only()
829 return hdmi_vendor_infoframe_pack_only(&frame->hdmi, buffer, size); in hdmi_vendor_any_infoframe_pack_only()
833 * hdmi_vendor_any_infoframe_pack() - check a vendor infoframe,
850 * hdmi_infoframe_check() - check a HDMI infoframe
861 switch (frame->any.type) { in hdmi_infoframe_check()
863 return hdmi_avi_infoframe_check(&frame->avi); in hdmi_infoframe_check()
865 return hdmi_spd_infoframe_check(&frame->spd); in hdmi_infoframe_check()
867 return hdmi_audio_infoframe_check(&frame->audio); in hdmi_infoframe_check()
869 return hdmi_vendor_any_infoframe_check(&frame->vendor); in hdmi_infoframe_check()
871 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_check()
872 return -EINVAL; in hdmi_infoframe_check()
878 * hdmi_infoframe_pack_only() - write a HDMI infoframe to binary buffer
896 switch (frame->any.type) { in hdmi_infoframe_pack_only()
898 length = hdmi_avi_infoframe_pack_only(&frame->avi, in hdmi_infoframe_pack_only()
902 length = hdmi_drm_infoframe_pack_only(&frame->drm, in hdmi_infoframe_pack_only()
906 length = hdmi_spd_infoframe_pack_only(&frame->spd, in hdmi_infoframe_pack_only()
910 length = hdmi_audio_infoframe_pack_only(&frame->audio, in hdmi_infoframe_pack_only()
914 length = hdmi_vendor_any_infoframe_pack_only(&frame->vendor, in hdmi_infoframe_pack_only()
918 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_pack_only()
919 length = -EINVAL; in hdmi_infoframe_pack_only()
927 * hdmi_infoframe_pack() - check a HDMI infoframe,
949 switch (frame->any.type) { in hdmi_infoframe_pack()
951 length = hdmi_avi_infoframe_pack(&frame->avi, buffer, size); in hdmi_infoframe_pack()
954 length = hdmi_drm_infoframe_pack(&frame->drm, buffer, size); in hdmi_infoframe_pack()
957 length = hdmi_spd_infoframe_pack(&frame->spd, buffer, size); in hdmi_infoframe_pack()
960 length = hdmi_audio_infoframe_pack(&frame->audio, buffer, size); in hdmi_infoframe_pack()
963 length = hdmi_vendor_any_infoframe_pack(&frame->vendor, in hdmi_infoframe_pack()
967 WARN(1, "Bad infoframe type %d\n", frame->any.type); in hdmi_infoframe_pack()
968 length = -EINVAL; in hdmi_infoframe_pack()
999 hdmi_infoframe_type_get_name(frame->type), in hdmi_infoframe_log_header()
1000 frame->version, frame->length); in hdmi_infoframe_log_header()
1151 return "Unknown Non-uniform Scaling"; in hdmi_nups_get_name()
1198 hdmi_colorspace_get_name(frame->colorspace)); in hdmi_avi_infoframe_log()
1199 hdmi_log(" scan mode: %s\n", in hdmi_avi_infoframe_log()
1200 hdmi_scan_mode_get_name(frame->scan_mode)); in hdmi_avi_infoframe_log()
1202 hdmi_colorimetry_get_name(frame->colorimetry)); in hdmi_avi_infoframe_log()
1204 hdmi_picture_aspect_get_name(frame->picture_aspect)); in hdmi_avi_infoframe_log()
1206 hdmi_active_aspect_get_name(frame->active_aspect)); in hdmi_avi_infoframe_log()
1207 hdmi_log(" itc: %s\n", frame->itc ? "IT Content" : "No Data"); in hdmi_avi_infoframe_log()
1209 hdmi_extended_colorimetry_get_name(frame->extended_colorimetry)); in hdmi_avi_infoframe_log()
1211 hdmi_quantization_range_get_name(frame->quantization_range)); in hdmi_avi_infoframe_log()
1212 hdmi_log(" nups: %s\n", hdmi_nups_get_name(frame->nups)); in hdmi_avi_infoframe_log()
1213 hdmi_log(" video code: %u\n", frame->video_code); in hdmi_avi_infoframe_log()
1215 hdmi_ycc_quantization_range_get_name(frame->ycc_quantization_range)); in hdmi_avi_infoframe_log()
1217 hdmi_content_type_get_name(frame->content_type)); in hdmi_avi_infoframe_log()
1218 hdmi_log(" pixel repeat: %u\n", frame->pixel_repeat); in hdmi_avi_infoframe_log()
1220 frame->top_bar, frame->bottom_bar, in hdmi_avi_infoframe_log()
1221 frame->left_bar, frame->right_bar); in hdmi_avi_infoframe_log()
1236 return "D-VHS"; in hdmi_spd_sdi_get_name()
1250 return "Blu-Ray Disc (BD)"; in hdmi_spd_sdi_get_name()
1272 strncpy(buf, frame->vendor, 8); in hdmi_spd_infoframe_log()
1274 strncpy(buf, frame->product, 16); in hdmi_spd_infoframe_log()
1277 hdmi_spd_sdi_get_name(frame->sdi), frame->sdi); in hdmi_spd_infoframe_log()
1289 return "AC-3"; in hdmi_audio_coding_type_get_name()
1297 return "AAC"; in hdmi_audio_coding_type_get_name()
1307 return "DTS-HD"; in hdmi_audio_coding_type_get_name()
1370 return "HE AAC"; in hdmi_audio_coding_type_ext_get_name()
1372 return "HE AAC v2"; in hdmi_audio_coding_type_ext_get_name()
1376 return "MPEG-4 HE AAC"; in hdmi_audio_coding_type_ext_get_name()
1378 return "MPEG-4 HE AAC v2"; in hdmi_audio_coding_type_ext_get_name()
1380 return "MPEG-4 AAC LC"; in hdmi_audio_coding_type_ext_get_name()
1384 return "MPEG-4 HE AAC + MPEG Surround"; in hdmi_audio_coding_type_ext_get_name()
1386 return "MPEG-4 AAC LC + MPEG Surround"; in hdmi_audio_coding_type_ext_get_name()
1398 if (frame->channels) in hdmi_audio_infoframe_log()
1399 hdmi_log(" channels: %u\n", frame->channels - 1); in hdmi_audio_infoframe_log()
1403 hdmi_audio_coding_type_get_name(frame->coding_type)); in hdmi_audio_infoframe_log()
1405 hdmi_audio_sample_size_get_name(frame->sample_size)); in hdmi_audio_infoframe_log()
1407 hdmi_audio_sample_frequency_get_name(frame->sample_frequency)); in hdmi_audio_infoframe_log()
1409 hdmi_audio_coding_type_ext_get_name(frame->coding_type_ext)); in hdmi_audio_infoframe_log()
1411 frame->channel_allocation); in hdmi_audio_infoframe_log()
1413 frame->level_shift_value); in hdmi_audio_infoframe_log()
1415 frame->downmix_inhibit ? "Yes" : "No"); in hdmi_audio_infoframe_log()
1426 hdmi_log("length: %d\n", frame->length); in hdmi_drm_infoframe_log()
1427 hdmi_log("metadata type: %d\n", frame->metadata_type); in hdmi_drm_infoframe_log()
1428 hdmi_log("eotf: %d\n", frame->eotf); in hdmi_drm_infoframe_log()
1430 hdmi_log("x[%d]: %d\n", i, frame->display_primaries[i].x); in hdmi_drm_infoframe_log()
1431 hdmi_log("y[%d]: %d\n", i, frame->display_primaries[i].y); in hdmi_drm_infoframe_log()
1434 hdmi_log("white point x: %d\n", frame->white_point.x); in hdmi_drm_infoframe_log()
1435 hdmi_log("white point y: %d\n", frame->white_point.y); in hdmi_drm_infoframe_log()
1438 frame->max_display_mastering_luminance); in hdmi_drm_infoframe_log()
1440 frame->min_display_mastering_luminance); in hdmi_drm_infoframe_log()
1442 hdmi_log("max_cll: %d\n", frame->max_cll); in hdmi_drm_infoframe_log()
1443 hdmi_log("max_fall: %d\n", frame->max_fall); in hdmi_drm_infoframe_log()
1460 return "Side-by-side (Full)"; in hdmi_3d_structure_get_name()
1464 return "L + Depth + Graphics + Graphics-depth"; in hdmi_3d_structure_get_name()
1466 return "Top-and-Bottom"; in hdmi_3d_structure_get_name()
1468 return "Side-by-side (Half)"; in hdmi_3d_structure_get_name()
1480 const struct hdmi_vendor_infoframe *hvf = &frame->hdmi; in hdmi_vendor_any_infoframe_log()
1485 if (frame->any.oui != HDMI_IEEE_OUI) { in hdmi_vendor_any_infoframe_log()
1489 if (hvf->vic == 0 && hvf->s3d_struct == HDMI_3D_STRUCTURE_INVALID) { in hdmi_vendor_any_infoframe_log()
1494 if (hvf->vic) in hdmi_vendor_any_infoframe_log()
1495 hdmi_log(" HDMI VIC: %u\n", hvf->vic); in hdmi_vendor_any_infoframe_log()
1496 if (hvf->s3d_struct != HDMI_3D_STRUCTURE_INVALID) { in hdmi_vendor_any_infoframe_log()
1498 hdmi_3d_structure_get_name(hvf->s3d_struct)); in hdmi_vendor_any_infoframe_log()
1499 if (hvf->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) in hdmi_vendor_any_infoframe_log()
1501 hvf->s3d_ext_data); in hdmi_vendor_any_infoframe_log()
1506 * hdmi_infoframe_log() - log info of HDMI infoframe
1515 switch (frame->any.type) { in hdmi_infoframe_log()
1517 hdmi_avi_infoframe_log(level, dev, &frame->avi); in hdmi_infoframe_log()
1520 hdmi_spd_infoframe_log(level, dev, &frame->spd); in hdmi_infoframe_log()
1523 hdmi_audio_infoframe_log(level, dev, &frame->audio); in hdmi_infoframe_log()
1526 hdmi_vendor_any_infoframe_log(level, dev, &frame->vendor); in hdmi_infoframe_log()
1529 hdmi_drm_infoframe_log(level, dev, &frame->drm); in hdmi_infoframe_log()
1536 * hdmi_avi_infoframe_unpack() - unpack binary buffer to a HDMI AVI infoframe
1554 return -EINVAL; in hdmi_avi_infoframe_unpack()
1559 return -EINVAL; in hdmi_avi_infoframe_unpack()
1562 return -EINVAL; in hdmi_avi_infoframe_unpack()
1568 frame->colorspace = (ptr[0] >> 5) & 0x3; in hdmi_avi_infoframe_unpack()
1570 frame->active_aspect = ptr[1] & 0xf; in hdmi_avi_infoframe_unpack()
1572 frame->top_bar = (ptr[6] << 8) | ptr[5]; in hdmi_avi_infoframe_unpack()
1573 frame->bottom_bar = (ptr[8] << 8) | ptr[7]; in hdmi_avi_infoframe_unpack()
1576 frame->left_bar = (ptr[10] << 8) | ptr[9]; in hdmi_avi_infoframe_unpack()
1577 frame->right_bar = (ptr[12] << 8) | ptr[11]; in hdmi_avi_infoframe_unpack()
1579 frame->scan_mode = ptr[0] & 0x3; in hdmi_avi_infoframe_unpack()
1581 frame->colorimetry = (ptr[1] >> 6) & 0x3; in hdmi_avi_infoframe_unpack()
1582 frame->picture_aspect = (ptr[1] >> 4) & 0x3; in hdmi_avi_infoframe_unpack()
1583 frame->active_aspect = ptr[1] & 0xf; in hdmi_avi_infoframe_unpack()
1585 frame->itc = ptr[2] & 0x80 ? true : false; in hdmi_avi_infoframe_unpack()
1586 frame->extended_colorimetry = (ptr[2] >> 4) & 0x7; in hdmi_avi_infoframe_unpack()
1587 frame->quantization_range = (ptr[2] >> 2) & 0x3; in hdmi_avi_infoframe_unpack()
1588 frame->nups = ptr[2] & 0x3; in hdmi_avi_infoframe_unpack()
1590 frame->video_code = ptr[3] & 0x7f; in hdmi_avi_infoframe_unpack()
1591 frame->ycc_quantization_range = (ptr[4] >> 6) & 0x3; in hdmi_avi_infoframe_unpack()
1592 frame->content_type = (ptr[4] >> 4) & 0x3; in hdmi_avi_infoframe_unpack()
1594 frame->pixel_repeat = ptr[4] & 0xf; in hdmi_avi_infoframe_unpack()
1600 * hdmi_spd_infoframe_unpack() - unpack binary buffer to a HDMI SPD infoframe
1619 return -EINVAL; in hdmi_spd_infoframe_unpack()
1624 return -EINVAL; in hdmi_spd_infoframe_unpack()
1628 return -EINVAL; in hdmi_spd_infoframe_unpack()
1636 frame->sdi = ptr[24]; in hdmi_spd_infoframe_unpack()
1642 * hdmi_audio_infoframe_unpack() - unpack binary buffer to a HDMI AUDIO infoframe
1661 return -EINVAL; in hdmi_audio_infoframe_unpack()
1666 return -EINVAL; in hdmi_audio_infoframe_unpack()
1670 return -EINVAL; in hdmi_audio_infoframe_unpack()
1678 frame->channels = ptr[0] & 0x7; in hdmi_audio_infoframe_unpack()
1679 frame->coding_type = (ptr[0] >> 4) & 0xf; in hdmi_audio_infoframe_unpack()
1680 frame->sample_size = ptr[1] & 0x3; in hdmi_audio_infoframe_unpack()
1681 frame->sample_frequency = (ptr[1] >> 2) & 0x7; in hdmi_audio_infoframe_unpack()
1682 frame->coding_type_ext = ptr[2] & 0x1f; in hdmi_audio_infoframe_unpack()
1683 frame->channel_allocation = ptr[3]; in hdmi_audio_infoframe_unpack()
1684 frame->level_shift_value = (ptr[4] >> 3) & 0xf; in hdmi_audio_infoframe_unpack()
1685 frame->downmix_inhibit = ptr[4] & 0x80 ? true : false; in hdmi_audio_infoframe_unpack()
1691 * hdmi_vendor_infoframe_unpack() - unpack binary buffer to a HDMI vendor infoframe
1711 struct hdmi_vendor_infoframe *hvf = &frame->hdmi; in hdmi_vendor_any_infoframe_unpack()
1714 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1719 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1724 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1728 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1736 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1741 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1747 hvf->length = length; in hdmi_vendor_any_infoframe_unpack()
1751 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1752 hvf->s3d_struct = ptr[4] >> 4; in hdmi_vendor_any_infoframe_unpack()
1753 if (hvf->s3d_struct >= HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF) { in hdmi_vendor_any_infoframe_unpack()
1755 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1756 hvf->s3d_ext_data = ptr[5] >> 4; in hdmi_vendor_any_infoframe_unpack()
1760 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1761 hvf->vic = ptr[4]; in hdmi_vendor_any_infoframe_unpack()
1764 return -EINVAL; in hdmi_vendor_any_infoframe_unpack()
1771 * hdmi_drm_infoframe_unpack_only() - unpack binary buffer of CTA-861-G DRM
1778 * Unpacks CTA-861-G DRM infoframe DataBytes contained in the binary @buffer
1795 return -EINVAL; in hdmi_drm_infoframe_unpack_only()
1801 frame->eotf = ptr[0] & 0x7; in hdmi_drm_infoframe_unpack_only()
1802 frame->metadata_type = ptr[1] & 0x7; in hdmi_drm_infoframe_unpack_only()
1808 frame->display_primaries[i].x = (x_msb << 8) | x_lsb; in hdmi_drm_infoframe_unpack_only()
1811 frame->display_primaries[i].y = (y_msb << 8) | y_lsb; in hdmi_drm_infoframe_unpack_only()
1814 frame->white_point.x = (ptr[15] << 8) | ptr[14]; in hdmi_drm_infoframe_unpack_only()
1815 frame->white_point.y = (ptr[17] << 8) | ptr[16]; in hdmi_drm_infoframe_unpack_only()
1817 frame->max_display_mastering_luminance = (ptr[19] << 8) | ptr[18]; in hdmi_drm_infoframe_unpack_only()
1818 frame->min_display_mastering_luminance = (ptr[21] << 8) | ptr[20]; in hdmi_drm_infoframe_unpack_only()
1819 frame->max_cll = (ptr[23] << 8) | ptr[22]; in hdmi_drm_infoframe_unpack_only()
1820 frame->max_fall = (ptr[25] << 8) | ptr[24]; in hdmi_drm_infoframe_unpack_only()
1827 * hdmi_drm_infoframe_unpack() - unpack binary buffer to a HDMI DRM infoframe
1832 * Unpacks the CTA-861-G DRM infoframe contained in the binary @buffer into
1846 return -EINVAL; in hdmi_drm_infoframe_unpack()
1851 return -EINVAL; in hdmi_drm_infoframe_unpack()
1854 return -EINVAL; in hdmi_drm_infoframe_unpack()
1857 size - HDMI_INFOFRAME_HEADER_SIZE); in hdmi_drm_infoframe_unpack()
1862 * hdmi_infoframe_unpack() - unpack binary buffer to a HDMI infoframe
1881 return -EINVAL; in hdmi_infoframe_unpack()
1885 ret = hdmi_avi_infoframe_unpack(&frame->avi, buffer, size); in hdmi_infoframe_unpack()
1888 ret = hdmi_drm_infoframe_unpack(&frame->drm, buffer, size); in hdmi_infoframe_unpack()
1891 ret = hdmi_spd_infoframe_unpack(&frame->spd, buffer, size); in hdmi_infoframe_unpack()
1894 ret = hdmi_audio_infoframe_unpack(&frame->audio, buffer, size); in hdmi_infoframe_unpack()
1897 ret = hdmi_vendor_any_infoframe_unpack(&frame->vendor, buffer, size); in hdmi_infoframe_unpack()
1900 ret = -EINVAL; in hdmi_infoframe_unpack()