diff options
author | Simon Ser <simon.ser@intel.com> | 2019-05-15 10:29:18 +0300 |
---|---|---|
committer | Simon Ser <simon.ser@intel.com> | 2019-05-16 13:28:52 +0300 |
commit | 160dd0ff463375b7ff026871c2e55dee47cf10ae (patch) | |
tree | 55b9b363d02c27eb85582ab08a00fad40144e1ae /lib/igt_chamelium.c | |
parent | 3928be962d800cf817539d134135ec14429e4d89 (diff) |
tests/kms_chamelium: generate an EDID with audio support
The default Chamelium EDID works great with DisplayPort but has issues with
HDMI. The EDID advertises itself as a DisplayPort-only device, which causes
issues with HDMI audio. Additionally, the EDID doesn't contain a magic
incantation within a vendor-specific data block that is needed for audio to
work.
This patch makes it so an EDID is generated and set by IGT. The EDID is the
base IGT EDID patched to append a Short Audio Descriptor and Vendor Specific
Data block extension.
This generated EDID is suitable for HDMI audio. For DisplayPort audio, we keep
using the Chamelium's default EDID.
A new enum test_edid has been introduced to prevent mismatches between the
Chamelium EDID ID and the raw EDID.
The global variable holding the test frequencies has been renamed to prevent
shadowing by local variables.
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_chamelium.c')
-rw-r--r-- | lib/igt_chamelium.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c index 649d807a..cfdf7617 100644 --- a/lib/igt_chamelium.c +++ b/lib/igt_chamelium.c @@ -38,6 +38,7 @@ #include "igt_chamelium.h" #include "igt_core.h" #include "igt_aux.h" +#include "igt_edid.h" #include "igt_frame.h" #include "igt_list.h" #include "igt_kms.h" @@ -530,14 +531,18 @@ void chamelium_schedule_hpd_toggle(struct chamelium *chamelium, * * Returns: The ID of the EDID uploaded to the chamelium. */ -int chamelium_new_edid(struct chamelium *chamelium, const unsigned char *edid) +int chamelium_new_edid(struct chamelium *chamelium, + const unsigned char *raw_edid) { xmlrpc_value *res; struct chamelium_edid *allocated_edid; int edid_id; + struct edid *edid = (struct edid *) raw_edid; + size_t edid_size = sizeof(struct edid) + + edid->extensions_len * sizeof(struct edid_ext); res = chamelium_rpc(chamelium, NULL, "CreateEdid", "(6)", - edid, EDID_LENGTH); + raw_edid, edid_size); xmlrpc_read_int(&chamelium->env, res, &edid_id); xmlrpc_DECREF(res); |