diff options
author | Simon Ser <simon.ser@intel.com> | 2019-05-15 10:29:16 +0300 |
---|---|---|
committer | Simon Ser <simon.ser@intel.com> | 2019-05-16 13:28:52 +0300 |
commit | 0d31a4da4f91b912a773ac19af6096aec23b5bd5 (patch) | |
tree | fe8322fe58b908969aee9ce8685b6bb8a12fc216 /lib/igt_edid.h | |
parent | 52f8b0d16f0bd5d59d028877c5f1e23ba878ed79 (diff) |
lib/igt_edid: add support for Vendor Specific Data blocks
For some reason HDMI audio won't work unless you cast a magic IEEE Registration
Identifier alongside with its appropriate Components of Source Physical
Address. The easiest way to do this is to capture a wild HDMI EDID, study it,
and blindly copy bytes because you don't understand anything about their
possible meaning (if any).
This commit also changes the SAD API exposed by igt_edid, to allow for both a
SAD block and a VSD block to be included in the same CEA block.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_edid.h')
-rw-r--r-- | lib/igt_edid.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/igt_edid.h b/lib/igt_edid.h index 3668d733..7edd7e38 100644 --- a/lib/igt_edid.h +++ b/lib/igt_edid.h @@ -189,6 +189,12 @@ struct cea_sad { uint8_t bitrate; } __attribute__((packed)); +/* Vendor Specific Data */ +struct cea_vsd { + uint8_t ieee_oui[3]; + char data[]; +}; + enum edid_cea_data_type { EDID_CEA_DATA_AUDIO = 1, EDID_CEA_DATA_VIDEO = 2, @@ -200,9 +206,17 @@ struct edid_cea_data_block { uint8_t type_len; /* type is from enum edid_cea_data_type */ union { struct cea_sad sads[0]; + struct cea_vsd vsds[0]; } data; } __attribute__((packed)); +enum edid_cea_flag { + EDID_CEA_YCBCR422 = 1 << 4, + EDID_CEA_YCBCR444 = 1 << 5, + EDID_CEA_BASIC_AUDIO = 1 << 6, + EDID_CEA_UNDERSCAN = 1 << 7, +}; + struct edid_cea { uint8_t revision; uint8_t dtd_start; @@ -275,8 +289,13 @@ void detailed_timing_set_string(struct detailed_timing *dt, void cea_sad_init_pcm(struct cea_sad *sad, int channels, uint8_t sampling_rates, uint8_t sample_sizes); -void edid_ext_set_cea_sad(struct edid_ext *ext, const struct cea_sad *sads, - size_t sads_len); void edid_ext_update_cea_checksum(struct edid_ext *ext); +const struct cea_vsd *cea_vsd_get_hdmi_default(size_t *size); +size_t edid_cea_data_block_set_sad(struct edid_cea_data_block *block, + const struct cea_sad *sads, size_t sads_len); +size_t edid_cea_data_block_set_vsd(struct edid_cea_data_block *block, + const struct cea_vsd *vsd, size_t vsd_size); +void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size, + uint8_t flags); #endif |