Skip to contentSkip to conversation

chamelium: Add work in progress test for HDMI audio

PATCH New Paul Kocialkowski 2 participants 3 messages Aug 31, 2017 Library code

lore
Share & tools
lore
#0 lore raw

cover chamelium: Add work in progress test for HDMI audio

This patch contains a work in progress test for HDMI audio integrity testing. It is currently not working and should not be merged.

It is sent as-is for reference, in hope that work in this area will be resumed later on. It is the latest version at the time of my final summer internship day at Intel, after which I will not have access to a Chamelium anymore.

The test is currently failing as the Chamelium does not detect any audio, failing with the following:
No audio data was captured. Perhaps this input is not plugged

The Chamelium logs indicate that no audio page is received:
Current page count: 0x0. Last page count: 0x0. Page count in this period: 0x0

It was checked that the EDID used properly contains the CEA block indicating audio support.

The audio test in IGT, that involves a HDMI-VGA adapter with audio-out implements HDMI audio integrity checking and can be used as a working reference to debug the problem.

Once the problem is resolved, this test could be derived in different fashions, including a suspend/resume test checking for audio integrity before and after suspend/resume and a hotplug test checking for audio integrity after a sequence of hotplug toggles.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

PATCH 1/1 chamelium: Add work in progress test for HDMI audio integrity testing

This adds preliminary support for testing HDMI audio integrity with the Chamelium. It aims to use the ALSA and audio IGT libraries to generate a signal with a list of given frequencies, output it through HDMI and check that the correct frequencies (and only those) are detected.

The test is currently work in progress and is not working. It is sent only for reference and should not be merged.

---
 configure.ac        |  9 +++--
 lib/igt_chamelium.c | 18 ++++++++--
 lib/igt_chamelium.h |  6 +++-
 tests/Makefile.am   |  4 +--
 tests/chamelium.c   | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 5 files changed, 121 insertions(+), 11 deletions(-)
configure.ac +6 -3
index 41ec4d26..dd5d68b6 100644
@@ -184,6 +184,9 @@ fi
 PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], [gsl=no])
 AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes])
 
+PKG_CHECK_MODULES(ALSA, [alsa], [alsa=yes], [alsa=no])
+AM_CONDITIONAL(HAVE_ALSA, [test "x$alsa" = xyes])
+
 # for chamelium
 AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
 	      [Enable building of chamelium libraries and tests (default: no)]),
@@ -215,13 +218,13 @@ if test "x$enable_chamelium" = xyes; then
 	if test x"$gsl" != xyes; then
 		AC_MSG_ERROR([Failed to find gsl, required by chamelium.])
 	fi
+	if test x"$alsa" != xyes; then
+		AC_MSG_ERROR([Failed to find ALSA, required by chamelium.])
+	fi
 
 	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
 fi
 
-PKG_CHECK_MODULES(ALSA, [alsa], [alsa=yes], [alsa=no])
-AM_CONDITIONAL(HAVE_ALSA, [test "x$alsa" = xyes])
-
 # for audio
 AC_ARG_ENABLE(audio, AS_HELP_STRING([--enable-audio],
 	      [Enable building of audio tests (default: no)]),
lib/igt_chamelium.c +16 -2
index dcd8855f..b4d98cd6 100644
@@ -484,14 +484,14 @@ 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 *edid, int size)
 {
 	xmlrpc_value *res;
 	struct chamelium_edid *allocated_edid;
 	int edid_id;
 
 	res = chamelium_rpc(chamelium, NULL, "CreateEdid", "(6)",
-			    edid, EDID_LENGTH);
+			    edid, size);
 
 	xmlrpc_read_int(&chamelium->env, res, &edid_id);
 	xmlrpc_DECREF(res);
@@ -1376,6 +1376,20 @@ igt_crc_t *chamelium_calculate_fb_crc_async_finish(struct chamelium_fb_crc_async
 	return ret;
 }
 
+void chamelium_start_capturing_audio(struct chamelium *chamelium,
+				     struct chamelium_port *port)
+{
+	xmlrpc_DECREF(chamelium_rpc(chamelium, port, "StartCapturingAudio",
+				    "(ib)", port->id, true));
+}
+
+void chamelium_stop_capturing_audio(struct chamelium *chamelium,
+				    struct chamelium_port *port)
+{
+	xmlrpc_DECREF(chamelium_rpc(chamelium, port, "StopCapturingAudio",
+				    "(i)", port->id));
+}
+
 static unsigned int chamelium_get_port_type(struct chamelium *chamelium,
 					    struct chamelium_port *port)
 {
lib/igt_chamelium.h +5 -1
index 2a0fa234..c71a8620 100644
@@ -65,7 +65,7 @@ void chamelium_fire_hpd_pulses(struct chamelium *chamelium,
 void chamelium_schedule_hpd_toggle(struct chamelium *chamelium,
 				   struct chamelium_port *port, int delay_ms,
 				   bool rising_edge);
-int chamelium_new_edid(struct chamelium *chamelium, const unsigned char *edid);
+int chamelium_new_edid(struct chamelium *chamelium, const unsigned char *edid, int size);
 void chamelium_port_set_edid(struct chamelium *chamelium,
 			     struct chamelium_port *port, int edid_id);
 bool chamelium_port_get_ddc_state(struct chamelium *chamelium,
@@ -115,5 +115,9 @@ void chamelium_assert_analog_frame_match_or_dump(struct chamelium *chamelium,
 void chamelium_crop_analog_frame(struct chamelium_frame_dump *dump, int width,
 				 int height);
 void chamelium_destroy_frame_dump(struct chamelium_frame_dump *dump);
+void chamelium_start_capturing_audio(struct chamelium *chamelium,
+				     struct chamelium_port *port);
+void chamelium_stop_capturing_audio(struct chamelium *chamelium,
+				    struct chamelium_port *port);
 
 #endif /* IGT_CHAMELIUM_H */
tests/Makefile.am +2 -2
index 726e2b27..82ca5159 100644
@@ -138,8 +138,8 @@ vc4_wait_bo_LDADD = $(LDADD) $(DRM_VC4_LIBS)
 vc4_wait_seqno_CFLAGS = $(AM_CFLAGS) $(DRM_VC4_CFLAGS)
 vc4_wait_seqno_LDADD = $(LDADD) $(DRM_VC4_LIBS)
 
-chamelium_CFLAGS = $(AM_CFLAGS) $(XMLRPC_CFLAGS) $(LIBUDEV_CFLAGS)
-chamelium_LDADD = $(LDADD) $(XMLRPC_LIBS) $(LIBUDEV_LIBS)
+chamelium_CFLAGS = $(AM_CFLAGS) $(XMLRPC_CFLAGS) $(LIBUDEV_CFLAGS) $(ALSA_CFLAGS)
+chamelium_LDADD = $(LDADD) $(XMLRPC_LIBS) $(LIBUDEV_LIBS) $(ALSA_LIBS)
 
 audio_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
 audio_LDADD = $(LDADD) $(ALSA_LIBS)
tests/chamelium.c +92 -3

134 lines not on this page · raw message

Signature · 6 lines
2.14.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

✗ Fi.CI.BAT: failure for chamelium: Add work in progress test for HDMI audio

In reply to Paul Kocialkowski
== Series Details ==

== Series Details ==

Series: chamelium: Add work in progress test for HDMI audio
URL : https://patchwork.freedesktop.org/series/29609/
State : failure

== Summary ==

IGT patchset build failed on latest successful build c2159678d283fea5615ec8e846a51cf4954ac82d tests/perf: add Geminilake support

/bin/bash ./config.status --recheck
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --prefix=/opt/igt --disable-amdgpu --disable-nouveau --disable-vc4 --enable-chamelium CPPFLAGS=-I/home/cidrm/kernel_headers/include PKG_CONFIG_PATH=/opt/igt/lib/pkgconfig:/usr/local/lib64/pkgconfig XMLRPC_CFLAGS=-I/usr/include XMLRPC_LIBS=-L/usr/lib/x86_64-linux-gnu -lxmlrpc_client -lxmlrpc -lxmlrpc_xmlparse -lxmlrpc_xmltok -lxmlrpc_util -lcurl --no-create --no-recursion
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for a Python interpreter with version >= 3... python3
checking for python3... /usr/bin/python3
checking for python3 version... 3.5
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.5/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.5/site-packages checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison -y
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gtk-doc... yes
checking for gtkdoc-check... gtkdoc-check.test
checking for gtkdoc-check... /usr/bin/gtkdoc-check
checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... no
checking for GTKDOC_DEPS... yes
checking for rst2man... yes
checking for ANSI C header files... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking linux/kd.h usability... yes
checking linux/kd.h presence... yes
checking for linux/kd.h... yes
checking sys/kd.h usability... yes
checking sys/kd.h presence... yes
checking for sys/kd.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking sys/io.h usability... yes
checking sys/io.h presence... yes
checking for sys/io.h... yes
checking for struct sysinfo.totalram... yes
checking for sighandler_t... yes
checking for swapctl... no
checking for asprintf... yes
checking for __attribute__((constructor))... yes
checking for timer_create... no
checking for timer_create in -lrt... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gcc option to accept ISO C99... none needed
checking whether __clang__ is declared... no
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking if gcc supports -Werror=unknown-warning-option... no
checking if gcc supports -Werror=unused-command-line-argument... no
checking if gcc supports -Wall... yes
checking if gcc supports -Wpointer-arith... yes
checking if gcc supports -Wmissing-declarations... yes
checking if gcc supports -Wformat=2... yes
checking if gcc supports -Wstrict-prototypes... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -Wnested-externs... yes
checking if gcc supports -Wbad-function-cast... yes
checking if gcc supports -Wold-style-definition... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wunused... yes
checking if gcc supports -Wuninitialized... yes
checking if gcc supports -Wshadow... yes
checking if gcc supports -Wmissing-noreturn... yes
checking if gcc supports -Wmissing-format-attribute... yes
checking if gcc supports -Wredundant-decls... yes
checking if gcc supports -Wlogical-op... yes
checking if gcc supports -Werror=implicit... yes
checking if gcc supports -Werror=nonnull... yes
checking if gcc supports -Werror=init-self... yes
checking if gcc supports -Werror=main... yes
checking if gcc supports -Werror=missing-braces... yes
checking if gcc supports -Werror=sequence-point... yes
checking if gcc supports -Werror=return-type... yes
checking if gcc supports -Werror=trigraphs... yes
checking if gcc supports -Werror=array-bounds... yes
checking if gcc supports -Werror=write-strings... yes
checking if gcc supports -Werror=address... yes
checking if gcc supports -Werror=int-to-pointer-cast... yes
checking if gcc supports -Werror=pointer-to-int-cast... yes
checking if gcc supports -pedantic... yes
checking if gcc supports -Werror... yes
checking if gcc supports -Werror=attributes... yes
checking whether make supports nested variables... (cached) yes
checking for DRM... yes
checking for PCIACCESS... yes
checking for KMOD... yes
checking for PROCPS... yes
checking for VALGRIND... no
checking for OVERLAY_XVLIB... yes
checking for OVERLAY_XLIB... yes
checking for XRANDR... no
checking for CAIRO... yes
checking for LIBUDEV... yes
checking for GLIB... yes
checking for GSL... yes
checking for ALSA... no
checking for XMLRPC... yes
checking for PIXMAN... yes
configure: error: Failed to find ALSA, required by chamelium.
Makefile:491: recipe for target 'config.status' failed
make: *** [config.status] Error 1
====================================================
intel-gpu-tools 1.19: lib/tests/test-suite.log
====================================================

# TOTAL: 17
# PASS: 11
# SKIP: 0
# XFAIL: 6
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

XFAIL: igt_no_exit
==================

IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64)
Subtest A: SUCCESS (0.000s)
igt_no_exit: igt_core.c:573: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. XFAIL igt_no_exit (exit status: 134)

XFAIL: igt_no_exit_list_only
============================

igt_no_exit_list_only: igt_core.c:573: common_exit_handler: Assertion `sig != 0 || igt_exit_called' failed. A
XFAIL igt_no_exit_list_only (exit status: 134)

XFAIL: igt_no_subtest
=====================

igt_no_subtest: igt_core.c:1474: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed.
IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64)
Received signal SIGABRT.
XFAIL igt_no_subtest (exit status: 134)

XFAIL: igt_simple_test_subtests
===============================

igt_simple_test_subtests: igt_core.c:949: __igt_run_subtest: Assertion `test_with_subtests' failed.
IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64)
Received signal SIGABRT.
XFAIL igt_simple_test_subtests (exit status: 134)

XFAIL: igt_timeout
==================

Test igt_timeout failed.
**** DEBUG ****
(igt_timeout:1099) igt-core-INFO: IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64) (igt_timeout:1099) igt-core-INFO: Timed out: Testcase
**** END ****
IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64)
Timed out: Testcase
FAIL (1.000s)
XFAIL igt_timeout (exit status: 99)

XFAIL: igt_invalid_subtest_name
===============================

IGT-Version: 1.19-gba75a8bd (x86_64) (Linux: 4.10.0-28-generic x86_64)
(igt_invalid_subtest_name:1117) igt-core-CRITICAL: Invalid subtest name "# invalid name !".
igt_invalid_subtest_name: igt_core.c:1474: igt_exit: Assertion `!test_with_subtests || skipped_one || succeeded_one || failed_one' failed. Received signal SIGABRT.
XFAIL igt_invalid_subtest_name (exit status: 134)

====================================================
intel-gpu-tools 1.19: assembler/test-suite.log
====================================================

# TOTAL: 10
# PASS: 10
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

================================================
intel-gpu-tools 1.19: tests/test-suite.log
================================================

# TOTAL: 1
# PASS: 1
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx