[igt-dev] [PATCH i-g-t 5/5] tests/kms_chamelium: skip audio tests Chamelium doesn't support

Simon Ser simon.ser at intel.com
Fri May 17 16:02:42 UTC 2019


In these configurations the Chamelium device sends malformed data:

- More than 2 channels
- 2 channels, more than 16-bit samples and more than 32KHz sampling rate

In this cases, skip the test.

See crbug.com/950917.

Signed-off-by: Simon Ser <simon.ser at intel.com>
---
 tests/kms_chamelium.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 88356dd232b6..e888a642c24a 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -1062,6 +1062,17 @@ static bool test_audio_configuration(struct alsa *alsa, snd_pcm_format_t format,
 			  sampling_rate, channels);
 		return false;
 	}
+	/* TODO: the Chamelium device sends a malformed signal for some audio
+	 * configurations. See crbug.com/950917 */
+	if ((format != SND_PCM_FORMAT_S16_LE && sampling_rate >= 44100) ||
+			channels > 2) {
+		igt_debug("Skipping test with format %s, sampling rate %d Hz "
+			  "and %d channels because the Chamelium device "
+			  "doesn't support this configuration\n",
+			  snd_pcm_format_name(format),
+			  sampling_rate, channels);
+		return false;
+	}
 	return true;
 }
 
-- 
2.21.0



More information about the igt-dev mailing list