1 /* vim: set et fde fdm=syntax ft=c.doxygen ts=4 sts=4 sw=4 : */ 2 /* 3 * Copyright © 2010-2011 Saleem Abdulrasool <compnerd@compnerd.org>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * 9 * 1. Redistributions of source code must retain the above copyright notice, 10 * this list of conditions and the following disclaimer. 11 * 12 * 2. Redistributions in binary form must reproduce the above copyright notice, 13 * this list of conditions and the following disclaimer in the documentation 14 * and/or other materials provided with the distribution. 15 * 16 * 3. The name of the author may not be used to endorse or promote products 17 * derived from this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 22 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 #ifndef eds_hdmi_h 32 #define eds_hdmi_h 33 34 #include "cea861.h" 35 36 /*! \todo figure out a better way to determine the offsets */ 37 #define HDMI_VSDB_EXTENSION_FLAGS_OFFSET (0x06) 38 #define HDMI_VSDB_MAX_TMDS_OFFSET (0x07) 39 #define HDMI_VSDB_LATENCY_FIELDS_OFFSET (0x08) 40 41 static const uint8_t HDMI_OUI[] = { 0x00, 0x0C, 0x03 }; 42 43 struct __attribute__ (( packed )) hdmi_vendor_specific_data_block { 44 struct cea861_data_block_header header; 45 46 uint8_t ieee_registration_id[3]; /* LSB */ 47 48 unsigned port_configuration_b : 4; 49 unsigned port_configuration_a : 4; 50 unsigned port_configuration_d : 4; 51 unsigned port_configuration_c : 4; 52 53 /* extension fields */ 54 unsigned dvi_dual_link : 1; 55 unsigned : 2; 56 unsigned yuv_444_supported : 1; 57 unsigned colour_depth_30_bit : 1; 58 unsigned colour_depth_36_bit : 1; 59 unsigned colour_depth_48_bit : 1; 60 unsigned audio_info_frame : 1; 61 62 uint8_t max_tmds_clock; /* = value * 5 */ 63 64 unsigned : 6; 65 unsigned interlaced_latency_fields : 1; 66 unsigned latency_fields : 1; 67 68 uint8_t video_latency; /* = (value - 1) * 2 */ 69 uint8_t audio_latency; /* = (value - 1) * 2 */ 70 uint8_t interlaced_video_latency; 71 uint8_t interlaced_audio_latency; 72 73 uint8_t reserved[]; 74 }; 75 76 #endif 77 78