summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-04-23 16:04:52 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-04-25 13:07:15 +0300
commit311baff151f90c1db6f57ee9515216b4f9da5db7 (patch)
treecff58efbdacda05b06e7d88a2ab3d68816687eb4 /meson.build
parent11e10bc575516c56978640fcc697c27f277c660a (diff)
tests/kms_chamelium: add dp-audio test
This new test ensures DisplayPort audio works by using the Chamelium. It enables the DisplayPort output and sends an audio signal containing a set of frequencies we choose to all HDMI/DisplayPort audio devices. It starts recording audio on the Chamelium device and uses the stream server to retrieve captured audio pages. It then checks that the capture audio signal contains the frequencies we sent, and only those, by computing a FFT. A new library has been added to libigt to communicate with the stream server. It implements a simple custom TCP protocol. In case the test fails, a WAV file with the captured data is saved on disk. Right now the test has a few limitations: - Only the first channel is checked - IGT only generates audio with a single sampling rate (48 KHz) - Audio data is not captured in real-time These limitations will be lifted in future patches. PulseAudio must not run during the tests since ALSA is used directly. To ensure this, edit /etc/pulse/client.conf and add `autospawn=no`. Then run `pulseaudio --kill`. This commit deletes the existing audio tests. They weren't run and required an exotic configuration (HDMI audio splitter, dummy HDMI sink and a line-in port on the DUT). This patch also changes lib/igt_audio to use uint16_t instead of short. The rationale is: - The standard says a short is at least 16 bit wide, but a short can be larger (in practice it won't happen, but better use types correctly) - It makes it clearer that the audio format is S16_LE, since "16" is in the type name. This patch depends on the following Chameleon bugs: - https://crbug.com/948060 - https://crbug.com/950857 Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build52
1 files changed, 19 insertions, 33 deletions
diff --git a/meson.build b/meson.build
index 557400a5..be6dff9d 100644
--- a/meson.build
+++ b/meson.build
@@ -64,8 +64,6 @@ _build_overlay = false
_overlay_required = false
_build_man = false
_man_required = false
-_build_audio = false
-_audio_required = false
_build_chamelium = false
_chamelium_required = false
_build_docs = false
@@ -79,7 +77,6 @@ build_overlay = get_option('build_overlay')
overlay_backends = get_option('overlay_backends')
build_man = get_option('build_man')
with_valgrind = get_option('with_valgrind')
-build_audio = get_option('build_audio')
build_chamelium = get_option('build_chamelium')
build_docs = get_option('build_docs')
build_tests = get_option('build_tests')
@@ -91,8 +88,6 @@ _build_overlay = build_overlay != 'false'
_overlay_required = build_overlay == 'true'
_build_man = build_man != 'false'
_man_required = build_man == 'true'
-_build_audio = build_audio != 'false'
-_audio_required = build_audio == 'true'
_build_chamelium = build_chamelium != 'false'
_chamelium_required = build_chamelium == 'true'
_build_docs = build_docs != 'false'
@@ -166,26 +161,6 @@ cairo = dependency('cairo', version : '>1.12.0', required : true)
libudev = dependency('libudev', required : true)
glib = dependency('glib-2.0', required : true)
-gsl = null_dep
-alsa = null_dep
-if _build_audio or _build_chamelium
- gsl = dependency('gsl', required : _audio_required or _chamelium_required)
-endif
-if _build_audio
- alsa = dependency('alsa', required : _audio_required)
-endif
-
-audioinfo = 'No'
-if _build_audio and alsa.found() and gsl.found()
- audioinfo = 'Yes'
-else
- if _audio_required
- error('Cannot build audio test due to missing dependencies')
- endif
- _build_audio = false
-endif
-build_info += 'Build audio test: ' + audioinfo
-
xmlrpc = dependency('xmlrpc', required : false)
xmlrpc_util = dependency('xmlrpc_util', required : false)
xmlrpc_client = dependency('xmlrpc_client', required : false)
@@ -197,21 +172,32 @@ if not xmlrpc.found() and xmlrpc_cmd.found()
if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0
xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(),
- link_args : libs_cmd.stdout().strip().split())
+ link_args : libs_cmd.stdout().strip().split())
xmlrpc_util = declare_dependency()
xmlrpc_client = declare_dependency()
endif
endif
+gsl = null_dep
+alsa = null_dep
chamelium = null_dep
+chamelium_found = false # TODO: use a disabler object instead
chameliuminfo = 'No'
-if _build_chamelium and gsl.found() and xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found()
- chamelium = declare_dependency(dependencies : [ xmlrpc,
- xmlrpc_util, xmlrpc_client])
- config.set('HAVE_CHAMELIUM', 1)
- chameliuminfo = 'Yes'
-elif _chamelium_required
- error('Cannot build chamelium test due to missing dependencies')
+if _build_chamelium
+ gsl = dependency('gsl', required : _chamelium_required)
+ alsa = dependency('alsa', required : _chamelium_required)
+ chamelium = declare_dependency(dependencies : [
+ xmlrpc,
+ xmlrpc_util,
+ xmlrpc_client,
+ gsl,
+ alsa,
+ ], required : _chamelium_required)
+ if xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() and gsl.found() and alsa.found()
+ config.set('HAVE_CHAMELIUM', 1)
+ chameliuminfo = 'Yes'
+ chamelium_found = true
+ endif
endif
build_info += 'Build Chamelium test: ' + chameliuminfo