public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Simon Ser <simon.ser@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/8] tests/kms_chamelium: rename do_test_display_audio and test_audio_configuration
Date: Fri, 24 May 2019 11:07:31 +0300	[thread overview]
Message-ID: <20190524080736.9173-4-simon.ser@intel.com> (raw)
In-Reply-To: <20190524080736.9173-1-simon.ser@intel.com>

- Rename do_test_display_audio to test_audio_frequencies to prepare for a
  future amplitude/delay test
- Rename test_audio_configuration to check_audio_configuration because this
  function doesn't execute any test, it just checks whether we can perform
  audio tests using a particular configuration

Signed-off-by: Simon Ser <simon.ser@intel.com>
---
 tests/kms_chamelium.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 3a78aa150bef..0324d81b81e3 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -1003,7 +1003,7 @@ static void audio_state_stop(struct audio_state *state, bool success)
 }
 
 static int
-audio_output_callback(void *data, void *buffer, int samples)
+audio_output_frequencies_callback(void *data, void *buffer, int samples)
 {
 	struct audio_state *state = data;
 
@@ -1024,7 +1024,7 @@ audio_output_callback(void *data, void *buffer, int samples)
 	return state->run ? 0 : -1;
 }
 
-static bool do_test_display_audio(struct audio_state *state)
+static bool test_audio_frequencies(struct audio_state *state)
 {
 	int freq, step;
 	int32_t *recv, *buf;
@@ -1058,7 +1058,8 @@ static bool do_test_display_audio(struct audio_state *state)
 	}
 	audio_signal_synthesize(state->signal);
 
-	alsa_register_output_callback(state->alsa, audio_output_callback, state,
+	alsa_register_output_callback(state->alsa,
+				      audio_output_frequencies_callback, state,
 				      PLAYBACK_SAMPLES);
 
 	audio_state_start(state);
@@ -1133,8 +1134,8 @@ static bool do_test_display_audio(struct audio_state *state)
 	return success;
 }
 
-static bool test_audio_configuration(struct alsa *alsa, snd_pcm_format_t format,
-				     int channels, int sampling_rate)
+static bool check_audio_configuration(struct alsa *alsa, snd_pcm_format_t format,
+				      int channels, int sampling_rate)
 {
 	if (!alsa_test_output_configuration(alsa, format, channels,
 					    sampling_rate)) {
@@ -1219,15 +1220,15 @@ test_display_audio(data_t *data, struct chamelium_port *port,
 			channels = PLAYBACK_CHANNELS;
 			sampling_rate = test_sampling_rates[i];
 
-			if (!test_audio_configuration(alsa, format, channels,
-						      sampling_rate))
+			if (!check_audio_configuration(alsa, format, channels,
+						       sampling_rate))
 				continue;
 
 			run = true;
 
 			audio_state_init(&state, data, alsa, port,
 					 format, channels, sampling_rate);
-			success &= do_test_display_audio(&state);
+			success &= test_audio_frequencies(&state);
 			audio_state_fini(&state);
 
 			alsa_close_output(alsa);
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-05-24  8:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-24  8:07 [igt-dev] [PATCH i-g-t 0/8] tests/kms_chamelium: add amplitude test Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 1/8] tests/kms_chamelium: refactor audio test Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 2/8] tests/kms_chamelium: introduce audio_state_receive Simon Ser
2019-05-24  8:07 ` Simon Ser [this message]
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 4/8] tests/kms_chamelium: explain why 8-channel tests aren't performed Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 5/8] lib/igt_audio: introduce audio_convert_to Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 6/8] tests/kms_chamelium: add name parameter to audio_state_start Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 7/8] lib/igt_audio: make audio_extract_channel_s32_le support a NULL dst Simon Ser
2019-05-24  8:07 ` [igt-dev] [PATCH i-g-t 8/8] tests/kms_chamelium: add pulse audio test Simon Ser
2019-05-24 10:41 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_chamelium: add amplitude test Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190524080736.9173-4-simon.ser@intel.com \
    --to=simon.ser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox