Audio tests support for HDMI, with audio and ALSA helpers
v2 cover Audio tests support for HDMI, with audio and ALSA helpers
Changes since v1:
* Introduced explicit --enable-audio configure option
* Added dependencies to README
* Removed trailing whitespaces
* Fixed alignment in sqrt call
* Fixed ALSA overrun/underrun error handling and recovery
* Fixed ALSA open/close sequence for more robust behavior
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/3 lib: Add audio library with dedicated helpers
This introduces an audio library, with dedicated helpers for both generating signals and detecting peak frequencies in a signal.
This library paves the way for testing audio going through display connectors, such as HDMI.
--- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 + lib/Makefile.am | 2 + lib/igt.h | 1 + lib/igt_audio.c | 326 +++++++++++++++++++++ lib/igt_audio.h | 47 +++ 5 files changed, 377 insertions(+) create mode 100644 lib/igt_audio.c create mode 100644 lib/igt_audio.h
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +1 -0
@@ -16,6 +16,7 @@ <chapter> <title>API Reference</title> <xi:include href="xml/drmtest.xml"/> + <xi:include href="xml/igt_audio.xml"/> <xi:include href="xml/igt_aux.xml"/> <xi:include href="xml/igt_chamelium.xml"/> <xi:include href="xml/igt_core.xml"/>
lib/Makefile.am +2 -0
@@ -33,6 +33,8 @@ if HAVE_GSL lib_source_list += \ igt_frame.c \ igt_frame.h \ + igt_audio.c \ + igt_audio.h \ $(NULL) endif
lib/igt.h +1 -0
@@ -35,6 +35,7 @@#include "igt_dummyload.h" #include "igt_fb.h" #include "igt_frame.h" +#include "igt_audio.h" #include "igt_gt.h" #include "igt_kms.h" #include "igt_pm.h"
lib/igt_audio.c new file +326 -0
326 lines not on this page · raw message
lib/igt_audio.h new file +47 -0
47 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
PATCH v2 2/3 lib: Add ALSA library with dedicated helpers
In reply to Paul KocialkowskiThis introduces an ALSA library, with dedicated helpers for handling playback and capture. It handles ALSA device identification and configuration as well as a run loop with callback mechanisms for feeding output data and handling input data.
This library paves the way for testing audio going through display connectors, such as HDMI.
--- configure.ac | 3 + .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 + lib/Makefile.am | 7 + lib/igt.h | 1 + lib/igt_alsa.c | 637 +++++++++++++++++++++ lib/igt_alsa.h | 60 ++ 6 files changed, 709 insertions(+) create mode 100644 lib/igt_alsa.c create mode 100644 lib/igt_alsa.h
configure.ac +3 -0
@@ -219,6 +219,9 @@ if test "x$enable_chamelium" = xyes; then 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]) + # ----------------------------------------------------------------------------- # Configuration options # -----------------------------------------------------------------------------
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +1 -0
@@ -16,6 +16,7 @@ <chapter> <title>API Reference</title> <xi:include href="xml/drmtest.xml"/> + <xi:include href="xml/igt_alsa.xml"/> <xi:include href="xml/igt_audio.xml"/> <xi:include href="xml/igt_aux.xml"/> <xi:include href="xml/igt_chamelium.xml"/>
lib/Makefile.am +7 -0
@@ -38,6 +38,13 @@ lib_source_list += \ $(NULL) endif +if HAVE_ALSA +lib_source_list += \ + igt_alsa.c \ + igt_alsa.h \ + $(NULL) +endif + AM_CPPFLAGS = -I$(top_srcdir) AM_CFLAGS = \ $(CWARNFLAGS) \
lib/igt.h +1 -0
@@ -35,6 +35,7 @@#include "igt_dummyload.h" #include "igt_fb.h" #include "igt_frame.h" +#include "igt_alsa.h" #include "igt_audio.h" #include "igt_gt.h" #include "igt_kms.h"
lib/igt_alsa.c new file +637 -0
637 lines not on this page · raw message
lib/igt_alsa.h new file +60 -0
60 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
PATCH v2 3/3 tests: Introduce audio tests, starting with HDMI signal integrity
In reply to Paul KocialkowskiThis introduces a new test for audio going through display connectors. It currently contains a single subtest for HDMI signal integrity, but other test cases will be added later on.
The test setup consists in using an HDMI-VGA bridge that separates the audio out (via a 3.5 mm jack) and feeding this back to the DUT's line-in where it can be recorded by ALSA with controls correctly configured.
The audio test makes use of the audio and ALSA igt libraries helpers.
--- README | 6 ++ configure.ac | 18 ++++++ tests/Makefile.am | 12 ++++ tests/audio.c | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 tests/audio.c
README +6 -0
@@ -153,6 +153,12 @@ The following dependencies are required for building chamelium support libglib2.0-dev libgsl-dev +The following dependencies are requires for building audio support +(package names may vary): + + libasound2-dev + libgsl-dev + Releases for maintainers ------------------------
configure.ac +18 -0
@@ -222,6 +222,23 @@ 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)]), + [if test x$enableval = xyes; then enable_audio=yes; fi], + [enable_audio=no]) +AM_CONDITIONAL(HAVE_AUDIO, [test "x$enable_audio" = xyes]) +if test "x$enable_audio" = xyes; then + if test x"$alsa" != xyes; then + AC_MSG_ERROR([Failed to find ALSA, required by audio.]) + fi + if test x"$gsl" != xyes; then + AC_MSG_ERROR([Failed to find gsl, required by audio.]) + fi + + AC_DEFINE(HAVE_AUDIO, 1, [Enable Audio support]) +fi + # ----------------------------------------------------------------------------- # Configuration options # -----------------------------------------------------------------------------
@@ -420,6 +437,7 @@ echo "" echo " • Tests:" echo " Build tests : ${BUILD_TESTS}" echo " Chamelium tests : ${enable_chamelium}" +echo " Audio tests : ${enable_audio}" echo " Compile prime tests: ${NOUVEAU}" echo " Print stack traces : ${with_libunwind}" echo " Debug flags : ${DEBUG_CFLAGS}"
tests/Makefile.am +12 -0
@@ -20,6 +20,15 @@ TESTS_progs += \ $(NULL) endif +if HAVE_ALSA +if HAVE_GSL +TESTS_progs += \ + audio \ + $(NULL) +endif +endif + + if BUILD_TESTS test-list.txt: Makefile.sources @echo TESTLIST > $@
@@ -134,6 +143,9 @@ vc4_wait_seqno_LDADD = $(LDADD) $(DRM_VC4_LIBS) chamelium_CFLAGS = $(AM_CFLAGS) $(XMLRPC_CFLAGS) $(LIBUDEV_CFLAGS) chamelium_LDADD = $(LDADD) $(XMLRPC_LIBS) $(LIBUDEV_LIBS) +audio_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS) +audio_LDADD = $(LDADD) $(ALSA_LIBS) + amdgpu_amd_basic_CFLAGS = $(AM_CFLAGS) $(DRM_AMDGPU_CFLAGS) amdgpu_amd_basic_LDADD = $(LDADD) $(DRM_AMDGPU_LIBS) amdgpu_amd_cs_nop_CFLAGS = $(AM_CFLAGS) $(DRM_AMDGPU_CFLAGS)
tests/audio.c new file +174 -0
174 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
Patchwork
CI✓ Fi.CI.BAT: success for Audio tests support for HDMI, with audio and ALSA helpers
In reply to Paul Kocialkowski== Series Details ==
== Series Details ==
Series: Audio tests support for HDMI, with audio and ALSA helpers
URL : https://patchwork.freedesktop.org/series/29096/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 5a17ee2c8f9013f5db852d27564b837f9f2c5a9f tools/intel_vbt_decode: Fix decoding of child device structure
with latest DRM-Tip kernel build CI_DRM_2985dbfb2f62576e drm-tip: 2017y-08m-21d-08h-13m-34s UTC integration manifest
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-j1900) fdo#101705 +1fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:458s fi-bdw-gvtdvm total:279 pass:265 dwarn:0 dfail:0 fail:0 skip:14 time:441s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:362s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:577s fi-bwr-2160 total:279 pass:184 dwarn:0 dfail:0 fail:0 skip:95 time:251s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:527s fi-byt-j1900 total:279 pass:255 dwarn:0 dfail:0 fail:0 skip:24 time:531s fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:519s fi-elk-e7500 total:279 pass:230 dwarn:0 dfail:0 fail:0 skip:49 time:440s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:611s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:451s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:421s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:427s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:512s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:476s fi-kbl-7260u total:279 pass:268 dwarn:1 dfail:0 fail:0 skip:10 time:499s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:480s fi-kbl-7560u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:597s fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:603s fi-pnv-d510 total:279 pass:223 dwarn:1 dfail:0 fail:0 skip:55 time:528s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:472s fi-skl-6700k total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:484s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:495s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:454s fi-skl-x1585l total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:481s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:551s fi-snb-2600 total:279 pass:249 dwarn:0 dfail:0 fail:1 skip:29 time:410s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_78/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
R-B'd and pushed, thanks!
Quoted 8 lines · Paul Kocialkowski
Changes since v1:
* Introduced explicit --enable-audio configure option
* Added dependencies to README
* Removed trailing whitespaces
* Fixed alignment in sqrt call
* Fixed ALSA overrun/underrun error handling and recovery
* Fixed ALSA open/close sequence for more robust behavior
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx