[igt-dev] [PATCH i-g-t 6/8] tests/kms_chamelium: add name parameter to audio_state_start
Simon Ser
simon.ser at intel.com
Fri May 24 08:07:34 UTC 2019
This identifies the audio test name. This is required for adding multiple
audio tests.
Signed-off-by: Simon Ser <simon.ser at intel.com>
---
tests/kms_chamelium.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 9ae957f06dbf..54251d6a47ca 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -871,7 +871,7 @@ static void *run_audio_thread(void *data)
return NULL;
}
-static void audio_state_start(struct audio_state *state)
+static void audio_state_start(struct audio_state *state, const char *name)
{
int ret;
bool ok;
@@ -882,9 +882,9 @@ static void audio_state_start(struct audio_state *state)
state->recv_pages = 0;
state->msec = 0;
- igt_debug("Starting test with playback format %s, sampling rate %d Hz "
- "and %d channels\n",
- snd_pcm_format_name(state->playback.format),
+ igt_debug("Starting %s test with playback format %s, "
+ "sampling rate %d Hz and %d channels\n",
+ name, snd_pcm_format_name(state->playback.format),
state->playback.rate, state->playback.channels);
chamelium_start_capturing_audio(state->chamelium, state->port, false);
@@ -930,8 +930,8 @@ static void audio_state_start(struct audio_state *state)
if (igt_frame_dump_is_enabled()) {
snprintf(dump_suffix, sizeof(dump_suffix),
- "capture-%s-%dch-%dHz",
- snd_pcm_format_name(state->playback.format),
+ "capture-%s-%s-%dch-%dHz",
+ name, snd_pcm_format_name(state->playback.format),
state->playback.channels, state->playback.rate);
state->dump_fd = audio_create_wav_file_s32_le(dump_suffix,
@@ -1056,7 +1056,7 @@ static bool test_audio_frequencies(struct audio_state *state)
audio_output_frequencies_callback, state,
PLAYBACK_SAMPLES);
- audio_state_start(state);
+ audio_state_start(state, "frequencies");
igt_assert(state->capture.rate == state->playback.rate);
--
2.21.0
More information about the igt-dev
mailing list