diff options
author | Simon Ser <simon.ser@intel.com> | 2019-04-25 17:05:24 +0300 |
---|---|---|
committer | Simon Ser <simon.ser@intel.com> | 2019-06-04 14:59:38 +0300 |
commit | fc60a75f74792d772ee4f544add1777c260faaaf (patch) | |
tree | 8e31dc2aa8caeaf6e7a1934a3b6241fe9b434a0b /lib/igt_edid.h | |
parent | 569870e16055c7d731814234a67d88382331b3e0 (diff) |
lib/igt_edid: add support for Speaker Allocation Data blocks
Speaker Allocation Data blocks describe which speakers are present in the
display device.
This block is required to make DisplayPort audio work.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'lib/igt_edid.h')
-rw-r--r-- | lib/igt_edid.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/igt_edid.h b/lib/igt_edid.h index 7edd7e38..39d1842d 100644 --- a/lib/igt_edid.h +++ b/lib/igt_edid.h @@ -195,6 +195,21 @@ struct cea_vsd { char data[]; }; +enum cea_speaker_alloc_item { + CEA_SPEAKER_FRONT_LEFT_RIGHT = 1 << 0, + CEA_SPEAKER_LFE = 1 << 1, + CEA_SPEAKER_FRONT_CENTER = 1 << 2, + CEA_SPEAKER_REAR_LEFT_RIGHT = 1 << 3, + CEA_SPEAKER_REAR_CENTER = 1 << 4, + CEA_SPEAKER_FRONT_LEFT_RIGHT_CENTER = 1 << 5, + CEA_SPEAKER_REAR_LEFT_RIGHT_CENTER = 1 << 6, +}; + +struct cea_speaker_alloc { + uint8_t speakers; /* enum cea_speaker_alloc_item */ + uint8_t reserved[2]; +} __attribute__((packed)); + enum edid_cea_data_type { EDID_CEA_DATA_AUDIO = 1, EDID_CEA_DATA_VIDEO = 2, @@ -207,6 +222,7 @@ struct edid_cea_data_block { union { struct cea_sad sads[0]; struct cea_vsd vsds[0]; + struct cea_speaker_alloc speakers[0]; } data; } __attribute__((packed)); @@ -295,6 +311,8 @@ 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); +size_t edid_cea_data_block_set_speaker_alloc(struct edid_cea_data_block *block, + const struct cea_speaker_alloc *speakers); void edid_ext_set_cea(struct edid_ext *ext, size_t data_blocks_size, uint8_t flags); |