Commit graph

32 commits

Author SHA1 Message Date
Sebastian Wick
c0c0c8acc5 cta: HDMI Audio: Add a failure when NonMixed is supported without MS
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-06-06 10:58:48 +02:00
Sebastian Wick
08a4d543c8 cta: Add support for the HDMI Audio Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-05-29 11:29:37 +02:00
Sebastian Wick
bedd81f1b6 displayid: Handle Type II timings in di_displayid_type_i_ii_vii_timing
Type II timings are exactly the same as Type I except more tightly
packed and no information on the aspect ratio. As such, they fit neatly
into the Type I and Type VII structure.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 18:02:47 +01:00
Sebastian Wick
0eb10bda9e cta: Parse DisplayID Type VII Video Timing Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-03-19 17:13:30 +01:00
Sebastian Wick
1388f16e71 cta: add support for Video Format Preference
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-15 11:02:47 +01:00
Sebastian Wick
75b21671d0 cta: add support for Speaker Location data blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 20:56:17 +01:00
Sebastian Wick
3edb81e68d cta: add support for Room Configuration data blocks
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 20:56:17 +01:00
Sebastian Wick
63b483cd46 cta: Pull out speaker allocation struct
The speaker allocation format is reused in multiple CTA data blocks.
This commit pulls it into its own struct so it can be embedded into
other data block structs.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2024-02-14 17:27:28 +01:00
Sebastian Wick
5142866ee7 cta: be more lenient about data block parsing
If the data block sizes start overlapping the DTD we cannot continue
parsing this or further data blocks but the ones we parsed already
should be valid.

Similarily if we fail parsing a specific data block the previous ones
should still be valid and the next ones might be as well.

Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/36
Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/37
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-10-31 12:43:37 +01:00
Sebastian Wick
506925a66b cta: add support for InfoFrame Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-31 14:58:50 +01:00
Sebastian Wick
4698004913 cta: Add new data blocks from CTA-861.6
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-30 16:53:47 +01:00
Simon Ser
b439985324 cta: add VIC table
Add a small Python tool to extract VIC information from the spec.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-13 02:37:01 +01:00
Sebastian Wick
5c2255047b cta: add support for YCbCr 4:2:0 Capability Map
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 22:02:20 +00:00
Sebastian Wick
f7bd527557 cta: add support for YCbCr 4:2:0 Video
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 21:21:27 +01:00
Simon Ser
2ebc104594 cta: add support for speaker allocation data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-11 21:04:48 +01:00
Sebastian Wick
a55e759f7c cta: parse HDR Dynamic Metadata Data Block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-01-11 19:11:37 +00:00
Simon Ser
67b5d67a64 cta: add support for VESA DDDB
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-01-10 12:23:38 +00:00
Sebastian Wick
8fbc366c7c cta: parse short audio descriptors
Co-authored-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-12-14 15:19:27 +01:00
Sebastian Wick
11f48480d8 cta: add support for VESA Display Transfer Characteristic data block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-09-28 23:56:46 +02:00
Simon Ser
6f7dc0bcf7 Add safety assertions when inserting into array
Make sure we didn't mess up the array size. Abort instead of
corrupting memory.

Found the array insert operations via:

    git grep '++]'

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-12 06:21:12 +00:00
Simon Ser
407b309904 cta: add support for video capability data block
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-05 18:11:56 +00:00
Simon Ser
edb952756d cta: rename di_edid_cta_flags.underscan to it_underscan
Make it clear this is only about IT video formats.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-09-05 18:11:56 +00:00
Simon Ser
0c8673af02 cta: add support for video data blocks
Report the SVDs inside the video data block.

We'll need to add additional APIs to get detailed SVD mode info
in the future (with a SVD table).

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-31 13:18:34 +00:00
Sebastian Wick
9806eb214e cta: make HDR eotfs and descriptors directly accessible from the block
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-08-30 15:17:57 +02:00
Sebastian Wick
44e1810f2b edid: split the detailed timing signal union into separate structs
Nested structs makes it impossible to extend the nested struct after
extending the base struct. The union acts as a single struct in this
case but the nesting is still an issue. Use pointers to those structs instead
to keep all of them extensible. Only the struct which is applicable for the
signal type is not a null pointer to make sure only valid data is accessed.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2022-08-30 12:24:46 +02:00
Simon Ser
355a3aca80 cta: parse HDR static metadata blocks
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-29 13:52:50 +02:00
Simon Ser
c784d978fb cta: parse detailed timing definitions
After the data blocks, the CTA extension contains a list of DTDs.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-08 18:41:18 +02:00
Simon Ser
06a05c83c0 cta: log failures
Use the newly-introduced di_logger to report CTA failures.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-04 08:40:36 +02:00
Simon Ser
44963edc4c cta: parse colorimetry data blocks
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-02 22:21:19 +02:00
Simon Ser
e047d89f94 cta: add support for enumerating data blocks
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-01 16:41:59 +02:00
Simon Ser
67af3033ee cta: add support for misc flags
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-01 16:41:59 +02:00
Simon Ser
afdacff9f8 cta: introduce new API for CTA-861
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-08-01 16:41:33 +02:00