* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-06-23 8:27 Jeevan B
2026-06-23 14:36 ` ✗ i915.CI.BAT: failure for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8) Patchwork
2026-06-23 14:43 ` ✓ Xe.CI.BAT: success " Patchwork
0 siblings, 2 replies; 11+ messages in thread
From: Jeevan B @ 2026-06-23 8:27 UTC (permalink / raw)
To: igt-dev; +Cc: kunal1.joshi, pranay.samala, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
v2: Perform a single suspend/resume for all audio combinations.
Re-enable chamelium after suspend and separate pre-suspend
and post-resume validation paths for clearer failure diagnostics.
v3: Drop commit and use igt_assert_f with explicit messages to
distinguish failure in audio tests.
v4: Updated test to avoid false-pass on zero executed configs.
Replace post-suspend forced re-enable with connector
re-probe/connected checks.
v5: Remove unused variable and add chamelium_assert_reachable check.
v6: Skip suspend/resume subtest when pre-suspend audio validation fails,
and update suspend subtest descriptions.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 149 +++++++++++++++++++++++++-
1 file changed, 148 insertions(+), 1 deletion(-)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..1539286c9 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,66 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_test_once(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ snd_pcm_format_t format,
+ int channels,
+ int sampling_rate)
+{
+ struct audio_state state;
+ bool success;
+
+ audio_state_init(&state, data, alsa, port, format, channels,
+ sampling_rate);
+ success = test_audio_frequencies(&state);
+ success &= test_audio_flatline(&state);
+ audio_state_fini(&state);
+
+ return success;
+}
+
+static bool run_audio_tests(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ const char *audio_device)
+{
+ bool run = false;
+ bool success = true;
+ int ret, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0,
+ "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format,
+ channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ run = true;
+
+ success &= run_audio_test_once(data, alsa, port,
+ format, channels,
+ sampling_rate);
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ return run && success;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -762,8 +828,10 @@ static void test_display_audio(chamelium_data_t *data,
sampling_rate = test_sampling_rates[i];
if (!check_audio_configuration(alsa, format, channels,
- sampling_rate))
+ sampling_rate)) {
+ alsa_close_output(alsa);
continue;
+ }
run = true;
@@ -789,6 +857,75 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works after system suspend/resume";
+static void test_display_audio_suspend_resume(
+ chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ struct alsa *alsa;
+ igt_output_t *output;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium,
+ port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+ chamelium_reset_state(&data->display, data->chamelium,
+ port, data->ports,
+ data->port_count);
+ output = chamelium_prepare_output(data, port, edid);
+
+ connector = chamelium_port_get_connector(data->chamelium,
+ port, false);
+ igt_assert(connector->count_modes > 0);
+
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR,
+ 0, 0, 0, &fb);
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_skip_on_f(!run_audio_tests(data, alsa, port, audio_device),
+ "Audio test setup failed, skipping suspend/resume audio test\n");
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ chamelium_assert_reachable(data->chamelium, ONLINE_TIMEOUT);
+
+ /* Re-probe connector state after resume instead of forcing a re-enable. */
+ drmModeFreeConnector(connector);
+ connector = chamelium_port_get_connector(data->chamelium, port, true);
+ igt_assert_f(connector->connection == DRM_MODE_CONNECTED,
+ "Connector disconnected after suspend/resume\n");
+ igt_assert_f(connector->count_modes > 0,
+ "No modes available after suspend/resume\n");
+
+ igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
+ "Audio test failed after suspend\n");
+
+ igt_remove_fb(data->drm_fd, &fb);
+ drmModeFreeConnector(connector);
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +1003,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +1018,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* ✗ i915.CI.BAT: failure for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8)
2026-06-23 8:27 [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
@ 2026-06-23 14:36 ` Patchwork
2026-06-23 14:43 ` ✓ Xe.CI.BAT: success " Patchwork
1 sibling, 0 replies; 11+ messages in thread
From: Patchwork @ 2026-06-23 14:36 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 8870 bytes --]
== Series Details ==
Series: tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8)
URL : https://patchwork.freedesktop.org/series/166012/
State : failure
== Summary ==
CI Bug Log - changes from IGT_8980 -> IGTPW_15427
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_15427 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_15427, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/index.html
Participating hosts (41 -> 40)
------------------------------
Additional (1): bat-adls-6
Missing (2): bat-dg2-13 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_15427:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@gt_lrc:
- fi-tgl-1115g4: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8980/fi-tgl-1115g4/igt@i915_selftest@live@gt_lrc.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/fi-tgl-1115g4/igt@i915_selftest@live@gt_lrc.html
New tests
---------
New tests have been introduced between IGT_8980 and IGTPW_15427:
### New IGT tests (25) ###
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [2.09, 3.10] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-b-dp-2:
- Statuses : 2 pass(s)
- Exec time: [1.25, 1.38] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-b-edp-1:
- Statuses : 6 pass(s)
- Exec time: [2.80, 3.24] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-c-edp-1:
- Statuses : 6 pass(s)
- Exec time: [2.77, 3.14] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-d-edp-1:
- Statuses : 3 pass(s)
- Exec time: [2.79, 2.99] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [0.75, 1.72] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-b-dp-2:
- Statuses : 2 pass(s)
- Exec time: [0.63, 0.69] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-b-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.49, 1.73] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.45, 1.66] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-edp-1:
- Statuses : 3 pass(s)
- Exec time: [1.48, 1.60] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [0.74, 1.62] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-b-dp-2:
- Statuses : 2 pass(s)
- Exec time: [0.63, 0.69] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-b-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.51, 1.68] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.44, 1.65] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-edp-1:
- Statuses : 3 pass(s)
- Exec time: [1.49, 1.52] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [0.70, 1.61] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-b-dp-2:
- Statuses : 2 pass(s)
- Exec time: [0.58, 0.62] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-b-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.37, 1.59] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.41, 1.66] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- Statuses : 3 pass(s)
- Exec time: [1.41] s
* igt@kms_pipe_crc_basic@read-crc@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [0.70, 1.67] s
* igt@kms_pipe_crc_basic@read-crc@pipe-b-dp-2:
- Statuses : 2 pass(s)
- Exec time: [0.56, 0.65] s
* igt@kms_pipe_crc_basic@read-crc@pipe-b-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.40, 1.67] s
* igt@kms_pipe_crc_basic@read-crc@pipe-c-edp-1:
- Statuses : 6 pass(s)
- Exec time: [1.41, 1.67] s
* igt@kms_pipe_crc_basic@read-crc@pipe-d-edp-1:
- Statuses : 3 pass(s)
- Exec time: [1.40, 1.48] s
Known issues
------------
Here are the changes found in IGTPW_15427 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@dmabuf@all-tests:
- bat-adls-6: NOTRUN -> [SKIP][3] ([i915#15931])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@dmabuf@all-tests.html
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-adls-6: NOTRUN -> [SKIP][4] ([i915#4613]) +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@gem_tiled_pread_basic@basic:
- bat-adls-6: NOTRUN -> [SKIP][5] ([i915#15656])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@gem_tiled_pread_basic@basic.html
* igt@i915_selftest@live:
- fi-tgl-1115g4: [PASS][6] -> [ABORT][7] ([i915#16485])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8980/fi-tgl-1115g4/igt@i915_selftest@live.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/fi-tgl-1115g4/igt@i915_selftest@live.html
* igt@intel_hwmon@hwmon-read:
- bat-adls-6: NOTRUN -> [SKIP][8] ([i915#7707]) +1 other test skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@intel_hwmon@hwmon-read.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adls-6: NOTRUN -> [SKIP][9] ([i915#4103]) +1 other test skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
* igt@kms_dsc@dsc-basic:
- bat-adls-6: NOTRUN -> [SKIP][10] ([i915#16361])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_dsc@dsc-basic.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-adls-6: NOTRUN -> [SKIP][11]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_pm_backlight@basic-brightness:
- bat-adls-6: NOTRUN -> [SKIP][12] ([i915#5354])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_pm_backlight@basic-brightness.html
* igt@kms_psr@psr-primary-mmap-gtt:
- bat-adls-6: NOTRUN -> [SKIP][13] ([i915#1072] / [i915#9732]) +3 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_psr@psr-primary-mmap-gtt.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-adls-6: NOTRUN -> [SKIP][14] ([i915#3555])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-fence-read:
- bat-adls-6: NOTRUN -> [SKIP][15] ([i915#3291]) +2 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/bat-adls-6/igt@prime_vgem@basic-fence-read.html
[i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
[i915#15656]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15656
[i915#15931]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15931
[i915#16361]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16361
[i915#16485]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16485
[i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354
[i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
[i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_8980 -> IGTPW_15427
CI-20190529: 20190529
CI_DRM_18709: 60326b17f877e12846167bf8ef83680b9875218a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_15427: e67887356f24d58b402ae25c95ae0a46d30cb4f9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8980: 65d820119e86b017bf801c8f2bb500e557b29d1c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15427/index.html
[-- Attachment #2: Type: text/html, Size: 10564 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* ✓ Xe.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8)
2026-06-23 8:27 [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
2026-06-23 14:36 ` ✗ i915.CI.BAT: failure for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8) Patchwork
@ 2026-06-23 14:43 ` Patchwork
1 sibling, 0 replies; 11+ messages in thread
From: Patchwork @ 2026-06-23 14:43 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 3514 bytes --]
== Series Details ==
Series: tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8)
URL : https://patchwork.freedesktop.org/series/166012/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_8980_BAT -> XEIGTPW_15427_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (12 -> 12)
------------------------------
No changes in participating hosts
New tests
---------
New tests have been introduced between XEIGT_8980_BAT and XEIGTPW_15427_BAT:
### New IGT tests (20) ###
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-edp-1:
- Statuses : 4 pass(s)
- Exec time: [2.24, 2.64] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-b-edp-1:
- Statuses : 4 pass(s)
- Exec time: [2.83, 3.21] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-c-edp-1:
- Statuses : 4 pass(s)
- Exec time: [2.75, 3.22] s
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [2.83, 3.03] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-a-edp-1:
- Statuses : 4 pass(s)
- Exec time: [0.81, 1.07] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-b-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.45, 1.67] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.49, 1.68] s
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [1.48, 1.49] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-edp-1:
- Statuses : 4 pass(s)
- Exec time: [0.80, 1.10] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-b-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.47, 1.64] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.48, 1.66] s
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [1.41, 1.53] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-a-edp-1:
- Statuses : 4 pass(s)
- Exec time: [0.77, 0.98] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-b-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.44, 1.59] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.48, 1.61] s
* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [1.39, 1.49] s
* igt@kms_pipe_crc_basic@read-crc@pipe-a-edp-1:
- Statuses : 4 pass(s)
- Exec time: [0.76, 0.99] s
* igt@kms_pipe_crc_basic@read-crc@pipe-b-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.45, 1.60] s
* igt@kms_pipe_crc_basic@read-crc@pipe-c-edp-1:
- Statuses : 4 pass(s)
- Exec time: [1.37, 1.59] s
* igt@kms_pipe_crc_basic@read-crc@pipe-d-edp-1:
- Statuses : 2 pass(s)
- Exec time: [1.40, 1.51] s
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_8980 -> IGTPW_15427
IGTPW_15427: e67887356f24d58b402ae25c95ae0a46d30cb4f9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8980: 65d820119e86b017bf801c8f2bb500e557b29d1c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-5290-60326b17f877e12846167bf8ef83680b9875218a: 60326b17f877e12846167bf8ef83680b9875218a
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15427/index.html
[-- Attachment #2: Type: text/html, Size: 4668 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-06-19 5:38 Jeevan B
2026-06-23 8:02 ` Samala, Pranay
0 siblings, 1 reply; 11+ messages in thread
From: Jeevan B @ 2026-06-19 5:38 UTC (permalink / raw)
To: igt-dev; +Cc: kunal1.joshi, pranay.samala, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
v2: Perform a single suspend/resume for all audio combinations.
Re-enable chamelium after suspend and separate pre-suspend
and post-resume validation paths for clearer failure diagnostics.
v3: Drop commit and use igt_assert_f with explicit messages to
distinguish failure in audio tests.
v4: Updated test to avoid false-pass on zero executed configs.
Replace post-suspend forced re-enable with connector
re-probe/connected checks.
v5: Remove unused variable and add chamelium_assert_reachable check.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 155 +++++++++++++++++++++++++-
1 file changed, 154 insertions(+), 1 deletion(-)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..144f6a038 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,66 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_test_once(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ snd_pcm_format_t format,
+ int channels,
+ int sampling_rate)
+{
+ struct audio_state state;
+ bool success;
+
+ audio_state_init(&state, data, alsa, port, format, channels,
+ sampling_rate);
+ success = test_audio_frequencies(&state);
+ success &= test_audio_flatline(&state);
+ audio_state_fini(&state);
+
+ return success;
+}
+
+static bool run_audio_tests(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ const char *audio_device)
+{
+ bool run = false;
+ bool success = true;
+ int ret, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0,
+ "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format,
+ channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ run = true;
+
+ success &= run_audio_test_once(data, alsa, port,
+ format, channels,
+ sampling_rate);
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ return run && success;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -762,8 +828,10 @@ static void test_display_audio(chamelium_data_t *data,
sampling_rate = test_sampling_rates[i];
if (!check_audio_configuration(alsa, format, channels,
- sampling_rate))
+ sampling_rate)) {
+ alsa_close_output(alsa);
continue;
+ }
run = true;
@@ -789,6 +857,81 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works before and after system suspend/resume";
+static void test_display_audio_suspend_resume(
+ chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ struct alsa *alsa;
+ igt_output_t *output;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium,
+ port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+
+ chamelium_reset_state(&data->display, data->chamelium,
+ port, data->ports,
+ data->port_count);
+
+ output = chamelium_prepare_output(data, port, edid);
+
+ connector = chamelium_port_get_connector(data->chamelium,
+ port, false);
+
+ igt_assert(connector->count_modes > 0);
+
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR,
+ 0, 0, 0, &fb);
+
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
+ "Audio test failed before suspend\n");
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ chamelium_assert_reachable(data->chamelium, ONLINE_TIMEOUT);
+
+ /* Re-probe connector state after resume instead of forcing a re-enable. */
+ drmModeFreeConnector(connector);
+ connector = chamelium_port_get_connector(data->chamelium, port, true);
+ igt_assert_f(connector->connection == DRM_MODE_CONNECTED,
+ "Connector disconnected after suspend/resume\n");
+ igt_assert_f(connector->count_modes > 0,
+ "No modes available after suspend/resume\n");
+
+ igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
+ "Audio test failed after suspend\n");
+
+ igt_remove_fb(data->drm_fd, &fb);
+
+ drmModeFreeConnector(connector);
+
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +1009,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +1024,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* RE: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
2026-06-19 5:38 [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
@ 2026-06-23 8:02 ` Samala, Pranay
0 siblings, 0 replies; 11+ messages in thread
From: Samala, Pranay @ 2026-06-23 8:02 UTC (permalink / raw)
To: B, Jeevan, igt-dev@lists.freedesktop.org; +Cc: Joshi, Kunal1
Hi Jeevan,
> -----Original Message-----
> From: B, Jeevan <jeevan.b@intel.com>
> Sent: Friday, June 19, 2026 11:08 AM
> To: igt-dev@lists.freedesktop.org
> Cc: Joshi, Kunal1 <kunal1.joshi@intel.com>; Samala, Pranay
> <pranay.samala@intel.com>; B, Jeevan <jeevan.b@intel.com>
> Subject: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add
> suspend/resume audio tests
>
> Add test to validate audio works before and after suspend/resume on
> HDMI/DP connector.
>
> v2: Perform a single suspend/resume for all audio combinations.
> Re-enable chamelium after suspend and separate pre-suspend
> and post-resume validation paths for clearer failure diagnostics.
> v3: Drop commit and use igt_assert_f with explicit messages to
> distinguish failure in audio tests.
> v4: Updated test to avoid false-pass on zero executed configs.
> Replace post-suspend forced re-enable with connector
> re-probe/connected checks.
> v5: Remove unused variable and add chamelium_assert_reachable check.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/chamelium/kms_chamelium_audio.c | 155
> +++++++++++++++++++++++++-
> 1 file changed, 154 insertions(+), 1 deletion(-)
>
> diff --git a/tests/chamelium/kms_chamelium_audio.c
> b/tests/chamelium/kms_chamelium_audio.c
> index df8d27c0c..144f6a038 100644
> --- a/tests/chamelium/kms_chamelium_audio.c
> +++ b/tests/chamelium/kms_chamelium_audio.c
> @@ -52,6 +52,12 @@
> * SUBTEST: hdmi-audio-edid
> * Description: Plug a connector with an EDID suitable for audio, check
> ALSA's
> * EDID-Like Data reports the correct audio parameters
> + *
> + * SUBTEST: dp-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> + *
> + * SUBTEST: hdmi-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> */
>
> /* Playback parameters control the audio signal we synthesize and send */
> @@ -695,6 +701,66 @@ static bool check_audio_configuration(struct alsa
> *alsa,
> return true;
> }
>
> +static bool run_audio_test_once(chamelium_data_t *data,
> + struct alsa *alsa,
> + struct chamelium_port *port,
> + snd_pcm_format_t format,
> + int channels,
> + int sampling_rate)
> +{
> + struct audio_state state;
> + bool success;
> +
> + audio_state_init(&state, data, alsa, port, format, channels,
> + sampling_rate);
> + success = test_audio_frequencies(&state);
> + success &= test_audio_flatline(&state);
> + audio_state_fini(&state);
> +
> + return success;
> +}
> +
> +static bool run_audio_tests(chamelium_data_t *data,
> + struct alsa *alsa,
> + struct chamelium_port *port,
> + const char *audio_device)
> +{
> + bool run = false;
> + bool success = true;
> + int ret, i, j;
> + int channels, sampling_rate;
> + snd_pcm_format_t format;
> +
> + for (i = 0; i < test_sampling_rates_count; i++) {
> + for (j = 0; j < test_formats_count; j++) {
> + ret = alsa_open_output(alsa, audio_device);
> + igt_assert_f(ret >= 0,
> + "Failed to open ALSA output\n");
> +
> + format = test_formats[j];
> + channels = PLAYBACK_CHANNELS;
> + sampling_rate = test_sampling_rates[i];
> +
> + if (!check_audio_configuration(alsa, format,
> + channels,
> + sampling_rate)) {
> + alsa_close_output(alsa);
> + continue;
> + }
> +
> + run = true;
> +
> + success &= run_audio_test_once(data, alsa, port,
> + format, channels,
> + sampling_rate);
> +
> + alsa_close_output(alsa);
> + }
> + }
> +
> + return run && success;
> +}
> +
> static const char test_display_audio_desc[] =
> "Playback various audio signals with various audio formats/rates, "
> "capture them and check they are correct"; @@ -762,8 +828,10 @@
> static void test_display_audio(chamelium_data_t *data,
> sampling_rate = test_sampling_rates[i];
>
> if (!check_audio_configuration(alsa, format, channels,
> - sampling_rate))
> + sampling_rate)) {
> + alsa_close_output(alsa);
> continue;
> + }
>
> run = true;
>
> @@ -789,6 +857,81 @@ static void test_display_audio(chamelium_data_t
> *data,
> free(alsa);
> }
>
> +static const char test_display_audio_suspend_resume_desc[] =
> + "Verify audio works before and after system suspend/resume"; static
> +void test_display_audio_suspend_resume(
> + chamelium_data_t *data,
> + struct chamelium_port *port,
> + const char *audio_device,
> + enum igt_custom_edid_type edid)
> +{
> + struct alsa *alsa;
> + igt_output_t *output;
> + struct igt_fb fb;
> + drmModeModeInfo *mode;
> + drmModeConnector *connector;
> + int fb_id;
> +
> + igt_require(alsa_has_exclusive_access());
> +
> + igt_require(chamelium_has_audio_support(data->chamelium,
> + port));
> +
> + alsa = alsa_init();
> + igt_assert(alsa);
> +
> + igt_modeset_disable_all_outputs(&data->display);
> +
> + chamelium_reset_state(&data->display, data->chamelium,
> + port, data->ports,
> + data->port_count);
> +
> + output = chamelium_prepare_output(data, port, edid);
> +
> + connector = chamelium_port_get_connector(data->chamelium,
> + port, false);
> +
> + igt_assert(connector->count_modes > 0);
> +
> + mode = &connector->modes[0];
> +
> + fb_id = igt_create_color_pattern_fb(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR,
> + 0, 0, 0, &fb);
> +
> + igt_assert(fb_id > 0);
> +
> + chamelium_enable_output(data, port, output,
> + mode, &fb);
> +
> + igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
> + "Audio test failed before suspend\n");
The test's purpose is to verify audio test after suspend/resume. If audio
doesn't work before suspending, that could be config/setup issue, not something
suspend/resume caused.
Consider skipping the test instead of asserting on the pre-suspend audio test.
Only failures after resume indicate an actual suspend/resume issue.
Also change the above subtest descriptions to match the actual test intent.
And it seems there are many extra line in this function, please avoid them.
Regards,
Pranay
> +
> + igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> + SUSPEND_TEST_NONE);
> + chamelium_assert_reachable(data->chamelium, ONLINE_TIMEOUT);
> +
> + /* Re-probe connector state after resume instead of forcing a re-
> enable. */
> + drmModeFreeConnector(connector);
> + connector = chamelium_port_get_connector(data->chamelium, port,
> true);
> + igt_assert_f(connector->connection == DRM_MODE_CONNECTED,
> + "Connector disconnected after suspend/resume\n");
> + igt_assert_f(connector->count_modes > 0,
> + "No modes available after suspend/resume\n");
> +
> + igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
> + "Audio test failed after suspend\n");
> +
> + igt_remove_fb(data->drm_fd, &fb);
> +
> + drmModeFreeConnector(connector);
> +
> + free(alsa);
> +}
> +
> static const char test_display_audio_edid_desc[] =
> "Plug a connector with an EDID suitable for audio, check ALSA's "
> "EDID-Like Data reports the correct audio parameters"; @@ -866,6
> +1009,11 @@ int igt_main()
> connector_subtest("dp-audio-edid", DisplayPort, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_DP_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
> +
> igt_describe("HDMI tests");
>
> igt_describe(test_display_audio_desc);
> @@ -876,6 +1024,11 @@ int igt_main()
> connector_subtest("hdmi-audio-edid", HDMIA, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_HDMI_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
> +
> igt_fixture() {
> igt_display_fini(&data.display);
> drm_close_driver(data.drm_fd);
> --
> 2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-06-11 3:52 Jeevan B
0 siblings, 0 replies; 11+ messages in thread
From: Jeevan B @ 2026-06-11 3:52 UTC (permalink / raw)
To: igt-dev; +Cc: kunal1.joshi, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
v2: Perform a single suspend/resume for all audio combinations.
Re-enable chamelium after suspend and separate pre-suspend
and post-resume validation paths for clearer failure diagnostics.
v3: Drop commit and use igt_assert_f with explicit messages to
distinguish failure in audio tests.
v4: Removed inner igt_assert, changed from tracking execution to
aggregating test results with success &=, so function now returns
actual pass/fail.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 147 ++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..bd121fa8d 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,63 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_test_once(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ snd_pcm_format_t format,
+ int channels,
+ int sampling_rate)
+{
+ struct audio_state state;
+ bool success;
+
+ audio_state_init(&state, data, alsa, port, format, channels,
+ sampling_rate);
+ success = test_audio_frequencies(&state);
+ success &= test_audio_flatline(&state);
+ audio_state_fini(&state);
+
+ return success;
+}
+
+static bool run_audio_tests(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ const char *audio_device)
+{
+ bool success = true;
+ int ret, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0,
+ "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format,
+ channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ success &= run_audio_test_once(data, alsa, port,
+ format, channels,
+ sampling_rate);
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ return success;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -789,6 +852,80 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works before and after system suspend/resume";
+static void test_display_audio_suspend_resume(
+ chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ struct alsa *alsa;
+ igt_output_t *output;
+ igt_plane_t *primary;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium,
+ port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+
+ chamelium_reset_state(&data->display, data->chamelium,
+ port, data->ports,
+ data->port_count);
+
+ output = chamelium_prepare_output(data, port, edid);
+
+ connector = chamelium_port_get_connector(data->chamelium,
+ port, false);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_assert(primary);
+
+ igt_assert(connector->count_modes > 0);
+
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR,
+ 0, 0, 0, &fb);
+
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
+ "Audio test failed before suspend\n");
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_assert_f(run_audio_tests(data, alsa, port, audio_device),
+ "Audio test failed after suspend\n");
+
+ igt_remove_fb(data->drm_fd, &fb);
+
+ drmModeFreeConnector(connector);
+
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +1003,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +1018,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-05-13 6:35 Jeevan B
0 siblings, 0 replies; 11+ messages in thread
From: Jeevan B @ 2026-05-13 6:35 UTC (permalink / raw)
To: igt-dev; +Cc: chaitanya.kumar.borah, mohammed.bilal, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
v2: Perform a single suspend/resume for all audio combinations.
Re-enable chamelium after suspend and separate pre-suspend
and post-resume validation paths for clearer failure diagnostics.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 152 ++++++++++++++++++++++++++
1 file changed, 152 insertions(+)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..067e306c3 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,65 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_test_once(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ snd_pcm_format_t format,
+ int channels,
+ int sampling_rate)
+{
+ struct audio_state state;
+ bool success;
+
+ audio_state_init(&state, data, alsa, port, format, channels,
+ sampling_rate);
+ success = test_audio_frequencies(&state);
+ success &= test_audio_flatline(&state);
+ audio_state_fini(&state);
+
+ return success;
+}
+
+static bool run_audio_tests(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ const char *audio_device)
+{
+ bool run = false;
+ int ret, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0,
+ "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format,
+ channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ run = true;
+
+ igt_assert(run_audio_test_once(data, alsa, port,
+ format, channels,
+ sampling_rate));
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ return run;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -789,6 +854,83 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works before and after system suspend/resume";
+static void test_display_audio_suspend_resume(
+ chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ struct alsa *alsa;
+ igt_output_t *output;
+ igt_plane_t *primary;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium,
+ port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+
+ chamelium_reset_state(&data->display, data->chamelium,
+ port, data->ports,
+ data->port_count);
+
+ output = chamelium_prepare_output(data, port, edid);
+
+ connector = chamelium_port_get_connector(data->chamelium,
+ port, false);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_assert(primary);
+
+ igt_assert(connector->count_modes > 0);
+
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR,
+ 0, 0, 0, &fb);
+
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_assert(run_audio_tests(data, alsa, port,
+ audio_device));
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_display_commit2(&data->display,
+ COMMIT_ATOMIC);
+
+ igt_assert(run_audio_tests(data, alsa, port,
+ audio_device));
+
+ igt_remove_fb(data->drm_fd, &fb);
+
+ drmModeFreeConnector(connector);
+
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +1008,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +1023,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-05-11 4:18 Jeevan B
2026-05-11 6:22 ` Bilal, Mohammed
0 siblings, 1 reply; 11+ messages in thread
From: Jeevan B @ 2026-05-11 4:18 UTC (permalink / raw)
To: igt-dev; +Cc: chaitanya.kumar.borah, mohammed.bilal, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
v2: Perform a single suspend/resume for all audio combinations.
Re-enable chamelium after suspend and separate pre-suspend
and post-resume validation paths for clearer failure diagnostics.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 133 ++++++++++++++++++++++++++
1 file changed, 133 insertions(+)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..2fd8322e0 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,46 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_tests(chamelium_data_t *data,
+ struct alsa *alsa,
+ struct chamelium_port *port,
+ const char *audio_device)
+{
+ bool run = false;
+ int ret, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0,
+ "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format,
+ channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ run = true;
+
+ igt_assert(run_audio_test_once(data, alsa, port,
+ format, channels,
+ sampling_rate));
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ return run;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -789,6 +835,83 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works before and after system suspend/resume";
+static void test_display_audio_suspend_resume(
+ chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ struct alsa *alsa;
+ igt_output_t *output;
+ igt_plane_t *primary;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium,
+ port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+
+ chamelium_reset_state(&data->display, data->chamelium,
+ port, data->ports,
+ data->port_count);
+
+ output = chamelium_prepare_output(data, port, edid);
+
+ connector = chamelium_port_get_connector(data->chamelium,
+ port, false);
+
+ primary = igt_output_get_plane_type(output,
+ DRM_PLANE_TYPE_PRIMARY);
+ igt_assert(primary);
+
+ igt_assert(connector->count_modes > 0);
+
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR,
+ 0, 0, 0, &fb);
+
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_assert(run_audio_tests(data, alsa, port,
+ audio_device));
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
+ chamelium_enable_output(data, port, output,
+ mode, &fb);
+
+ igt_display_commit2(&data->display,
+ COMMIT_ATOMIC);
+
+ igt_assert(run_audio_tests(data, alsa, port,
+ audio_device));
+
+ igt_remove_fb(data->drm_fd, &fb);
+
+ drmModeFreeConnector(connector);
+
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +989,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +1004,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* RE: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
2026-05-11 4:18 Jeevan B
@ 2026-05-11 6:22 ` Bilal, Mohammed
0 siblings, 0 replies; 11+ messages in thread
From: Bilal, Mohammed @ 2026-05-11 6:22 UTC (permalink / raw)
To: B, Jeevan, igt-dev@lists.freedesktop.org; +Cc: Borah, Chaitanya Kumar
Hello Jeevan ,
> -----Original Message-----
> From: B, Jeevan <jeevan.b@intel.com>
> Sent: 11 May 2026 09:49
> To: igt-dev@lists.freedesktop.org
> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Bilal,
> Mohammed <mohammed.bilal@intel.com>; B, Jeevan <jeevan.b@intel.com>
> Subject: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add
> suspend/resume audio tests
>
> Add test to validate audio works before and after suspend/resume on HDMI/DP
> connector.
>
> v2: Perform a single suspend/resume for all audio combinations.
> Re-enable chamelium after suspend and separate pre-suspend
> and post-resume validation paths for clearer failure diagnostics.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/chamelium/kms_chamelium_audio.c | 133
> ++++++++++++++++++++++++++
> 1 file changed, 133 insertions(+)
>
> diff --git a/tests/chamelium/kms_chamelium_audio.c
> b/tests/chamelium/kms_chamelium_audio.c
> index df8d27c0c..2fd8322e0 100644
> --- a/tests/chamelium/kms_chamelium_audio.c
> +++ b/tests/chamelium/kms_chamelium_audio.c
> @@ -52,6 +52,12 @@
> * SUBTEST: hdmi-audio-edid
> * Description: Plug a connector with an EDID suitable for audio, check ALSA's
> * EDID-Like Data reports the correct audio parameters
> + *
> + * SUBTEST: dp-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> + *
> + * SUBTEST: hdmi-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> */
>
> /* Playback parameters control the audio signal we synthesize and send */ @@ -
> 695,6 +701,46 @@ static bool check_audio_configuration(struct alsa *alsa,
> return true;
> }
>
> +static bool run_audio_tests(chamelium_data_t *data,
> + struct alsa *alsa,
> + struct chamelium_port *port,
> + const char *audio_device)
> +{
> + bool run = false;
> + int ret, i, j;
> + int channels, sampling_rate;
> + snd_pcm_format_t format;
> +
> + for (i = 0; i < test_sampling_rates_count; i++) {
> + for (j = 0; j < test_formats_count; j++) {
> + ret = alsa_open_output(alsa, audio_device);
> + igt_assert_f(ret >= 0,
> + "Failed to open ALSA output\n");
> +
> + format = test_formats[j];
> + channels = PLAYBACK_CHANNELS;
> + sampling_rate = test_sampling_rates[i];
> +
> + if (!check_audio_configuration(alsa, format,
> + channels,
> + sampling_rate)) {
> + alsa_close_output(alsa);
> + continue;
> + }
> +
> + run = true;
> +
> + igt_assert(run_audio_test_once(data, alsa, port,
> + format, channels,
> + sampling_rate));
[1] I have a doubt: if igt_assert aborts here on the first failure,
are we able to determine whether the abort happened before or after suspend?
> +
> + alsa_close_output(alsa);
> + }
> + }
> +
> + return run;
> +}
> +
> static const char test_display_audio_desc[] =
> "Playback various audio signals with various audio formats/rates, "
> "capture them and check they are correct"; @@ -789,6 +835,83 @@
> static void test_display_audio(chamelium_data_t *data,
> free(alsa);
> }
>
> +static const char test_display_audio_suspend_resume_desc[] =
> + "Verify audio works before and after system suspend/resume"; static
> +void test_display_audio_suspend_resume(
> + chamelium_data_t *data,
> + struct chamelium_port *port,
> + const char *audio_device,
> + enum igt_custom_edid_type edid)
> +{
> + struct alsa *alsa;
> + igt_output_t *output;
> + igt_plane_t *primary;
> + struct igt_fb fb;
> + drmModeModeInfo *mode;
> + drmModeConnector *connector;
> + int fb_id;
> +
> + igt_require(alsa_has_exclusive_access());
> +
> + igt_require(chamelium_has_audio_support(data->chamelium,
> + port));
> +
> + alsa = alsa_init();
> + igt_assert(alsa);
> +
> + igt_modeset_disable_all_outputs(&data->display);
> +
> + chamelium_reset_state(&data->display, data->chamelium,
> + port, data->ports,
> + data->port_count);
> +
> + output = chamelium_prepare_output(data, port, edid);
> +
> + connector = chamelium_port_get_connector(data->chamelium,
> + port, false);
> +
> + primary = igt_output_get_plane_type(output,
> + DRM_PLANE_TYPE_PRIMARY);
> + igt_assert(primary);
> +
> + igt_assert(connector->count_modes > 0);
> +
> + mode = &connector->modes[0];
> +
> + fb_id = igt_create_color_pattern_fb(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR,
> + 0, 0, 0, &fb);
> +
> + igt_assert(fb_id > 0);
> +
> + chamelium_enable_output(data, port, output,
> + mode, &fb);
> +
> + igt_assert(run_audio_tests(data, alsa, port,
> + audio_device));
> +
> + igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> + SUSPEND_TEST_NONE);
> +
> + chamelium_enable_output(data, port, output,
> + mode, &fb);
> +
> + igt_display_commit2(&data->display,
> + COMMIT_ATOMIC);
[2] chamelium_enable_output() internally calls igt_display_commit2() already
Is it necessary to have another commit here ?
Regards,
Mohammed Bilal
> +
> + igt_assert(run_audio_tests(data, alsa, port,
> + audio_device));
> +
> + igt_remove_fb(data->drm_fd, &fb);
> +
> + drmModeFreeConnector(connector);
> +
> + free(alsa);
> +}
> +
> static const char test_display_audio_edid_desc[] =
> "Plug a connector with an EDID suitable for audio, check ALSA's "
> "EDID-Like Data reports the correct audio parameters"; @@ -866,6
> +989,11 @@ int igt_main()
> connector_subtest("dp-audio-edid", DisplayPort, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_DP_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
> +
> igt_describe("HDMI tests");
>
> igt_describe(test_display_audio_desc);
> @@ -876,6 +1004,11 @@ int igt_main()
> connector_subtest("hdmi-audio-edid", HDMIA, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_HDMI_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
> +
> igt_fixture() {
> igt_display_fini(&data.display);
> drm_close_driver(data.drm_fd);
> --
> 2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-05-05 18:03 Jeevan B
2026-05-07 5:13 ` Bilal, Mohammed
0 siblings, 1 reply; 11+ messages in thread
From: Jeevan B @ 2026-05-05 18:03 UTC (permalink / raw)
To: igt-dev; +Cc: kunal1.joshi, swati2.sharma, Jeevan B
Add test to validate audio works before and after suspend/resume on
HDMI/DP connector.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 121 ++++++++++++++++++++++++++
1 file changed, 121 insertions(+)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..ed8c9de7b 100644
--- a/tests/chamelium/kms_chamelium_audio.c
+++ b/tests/chamelium/kms_chamelium_audio.c
@@ -52,6 +52,12 @@
* SUBTEST: hdmi-audio-edid
* Description: Plug a connector with an EDID suitable for audio, check ALSA's
* EDID-Like Data reports the correct audio parameters
+ *
+ * SUBTEST: dp-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
+ *
+ * SUBTEST: hdmi-audio-after-suspend
+ * Description: Verify audio works before and after system suspend/resume
*/
/* Playback parameters control the audio signal we synthesize and send */
@@ -695,6 +701,23 @@ static bool check_audio_configuration(struct alsa *alsa,
return true;
}
+static bool run_audio_test_once(chamelium_data_t *data, struct alsa *alsa,
+ struct chamelium_port *port,
+ snd_pcm_format_t format,
+ int channels, int sampling_rate)
+{
+ struct audio_state state;
+ bool success;
+
+ audio_state_init(&state, data, alsa, port, format, channels,
+ sampling_rate);
+ success = test_audio_frequencies(&state);
+ success &= test_audio_flatline(&state);
+ audio_state_fini(&state);
+
+ return success;
+}
+
static const char test_display_audio_desc[] =
"Playback various audio signals with various audio formats/rates, "
"capture them and check they are correct";
@@ -789,6 +812,94 @@ static void test_display_audio(chamelium_data_t *data,
free(alsa);
}
+static const char test_display_audio_suspend_resume_desc[] =
+ "Verify audio works before and after system suspend/resume";
+static void test_display_audio_suspend_resume(chamelium_data_t *data,
+ struct chamelium_port *port,
+ const char *audio_device,
+ enum igt_custom_edid_type edid)
+{
+ bool run, success;
+ struct alsa *alsa;
+ int ret;
+ igt_output_t *output;
+ igt_plane_t *primary;
+ struct igt_fb fb;
+ drmModeModeInfo *mode;
+ drmModeConnector *connector;
+ int fb_id, i, j;
+ int channels, sampling_rate;
+ snd_pcm_format_t format;
+
+ igt_require(alsa_has_exclusive_access());
+
+ igt_require(chamelium_has_audio_support(data->chamelium, port));
+
+ alsa = alsa_init();
+ igt_assert(alsa);
+
+ igt_modeset_disable_all_outputs(&data->display);
+ chamelium_reset_state(&data->display, data->chamelium, port,
+ data->ports, data->port_count);
+
+ output = chamelium_prepare_output(data, port, edid);
+ connector = chamelium_port_get_connector(data->chamelium, port, false);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ igt_assert(primary);
+
+ igt_assert(connector->count_modes > 0);
+ mode = &connector->modes[0];
+
+ fb_id = igt_create_color_pattern_fb(data->drm_fd, mode->hdisplay,
+ mode->vdisplay, DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_MOD_LINEAR, 0, 0, 0,
+ &fb);
+ igt_assert(fb_id > 0);
+
+ chamelium_enable_output(data, port, output, mode, &fb);
+
+ run = false;
+ success = true;
+ for (i = 0; i < test_sampling_rates_count; i++) {
+ for (j = 0; j < test_formats_count; j++) {
+ ret = alsa_open_output(alsa, audio_device);
+ igt_assert_f(ret >= 0, "Failed to open ALSA output\n");
+
+ format = test_formats[j];
+ channels = PLAYBACK_CHANNELS;
+ sampling_rate = test_sampling_rates[i];
+
+ if (!check_audio_configuration(alsa, format, channels,
+ sampling_rate)) {
+ alsa_close_output(alsa);
+ continue;
+ }
+
+ run = true;
+
+ success &= run_audio_test_once(data, alsa, port, format,
+ channels, sampling_rate);
+
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+
+ success &= run_audio_test_once(data, alsa, port, format,
+ channels, sampling_rate);
+
+ alsa_close_output(alsa);
+ }
+ }
+
+ igt_assert(run);
+ igt_assert(success);
+
+ igt_remove_fb(data->drm_fd, &fb);
+
+ drmModeFreeConnector(connector);
+
+ free(alsa);
+}
+
static const char test_display_audio_edid_desc[] =
"Plug a connector with an EDID suitable for audio, check ALSA's "
"EDID-Like Data reports the correct audio parameters";
@@ -866,6 +977,11 @@ int igt_main()
connector_subtest("dp-audio-edid", DisplayPort, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_DP_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
+
igt_describe("HDMI tests");
igt_describe(test_display_audio_desc);
@@ -876,6 +992,11 @@ int igt_main()
connector_subtest("hdmi-audio-edid", HDMIA, &data, test_display_audio_edid,
IGT_CUSTOM_EDID_HDMI_AUDIO);
+ igt_describe(test_display_audio_suspend_resume_desc);
+ connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
+ test_display_audio_suspend_resume,
+ "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
+
igt_fixture() {
igt_display_fini(&data.display);
drm_close_driver(data.drm_fd);
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* RE: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
2026-05-05 18:03 Jeevan B
@ 2026-05-07 5:13 ` Bilal, Mohammed
0 siblings, 0 replies; 11+ messages in thread
From: Bilal, Mohammed @ 2026-05-07 5:13 UTC (permalink / raw)
To: B, Jeevan, igt-dev@lists.freedesktop.org
Cc: Joshi, Kunal1, Sharma, Swati2, B, Jeevan
Hi Jeevan ,
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Jeevan B
> Sent: 05 May 2026 23:33
> To: igt-dev@lists.freedesktop.org
> Cc: Joshi, Kunal1 <kunal1.joshi@intel.com>; Sharma, Swati2
> <swati2.sharma@intel.com>; B, Jeevan <jeevan.b@intel.com>
> Subject: [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add
> suspend/resume audio tests
>
> Add test to validate audio works before and after suspend/resume on HDMI/DP
> connector.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/chamelium/kms_chamelium_audio.c | 121
> ++++++++++++++++++++++++++
> 1 file changed, 121 insertions(+)
>
> diff --git a/tests/chamelium/kms_chamelium_audio.c
> b/tests/chamelium/kms_chamelium_audio.c
> index df8d27c0c..ed8c9de7b 100644
> --- a/tests/chamelium/kms_chamelium_audio.c
> +++ b/tests/chamelium/kms_chamelium_audio.c
> @@ -52,6 +52,12 @@
> * SUBTEST: hdmi-audio-edid
> * Description: Plug a connector with an EDID suitable for audio, check ALSA's
> * EDID-Like Data reports the correct audio parameters
> + *
> + * SUBTEST: dp-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> + *
> + * SUBTEST: hdmi-audio-after-suspend
> + * Description: Verify audio works before and after system
> + suspend/resume
> */
>
> /* Playback parameters control the audio signal we synthesize and send */ @@ -
> 695,6 +701,23 @@ static bool check_audio_configuration(struct alsa *alsa,
> return true;
> }
>
> +static bool run_audio_test_once(chamelium_data_t *data, struct alsa *alsa,
> + struct chamelium_port *port,
> + snd_pcm_format_t format,
> + int channels, int sampling_rate)
> +{
> + struct audio_state state;
> + bool success;
> +
> + audio_state_init(&state, data, alsa, port, format, channels,
> + sampling_rate);
> + success = test_audio_frequencies(&state);
> + success &= test_audio_flatline(&state);
> + audio_state_fini(&state);
> +
> + return success;
> +}
> +
> static const char test_display_audio_desc[] =
> "Playback various audio signals with various audio formats/rates, "
> "capture them and check they are correct"; @@ -789,6 +812,94 @@
> static void test_display_audio(chamelium_data_t *data,
> free(alsa);
> }
>
> +static const char test_display_audio_suspend_resume_desc[] =
> + "Verify audio works before and after system suspend/resume"; static
> +void test_display_audio_suspend_resume(chamelium_data_t *data,
> + struct chamelium_port *port,
> + const char *audio_device,
> + enum igt_custom_edid_type edid) {
> + bool run, success;
> + struct alsa *alsa;
> + int ret;
> + igt_output_t *output;
> + igt_plane_t *primary;
> + struct igt_fb fb;
> + drmModeModeInfo *mode;
> + drmModeConnector *connector;
> + int fb_id, i, j;
> + int channels, sampling_rate;
> + snd_pcm_format_t format;
> +
> + igt_require(alsa_has_exclusive_access());
> +
> + igt_require(chamelium_has_audio_support(data->chamelium, port));
> +
> + alsa = alsa_init();
> + igt_assert(alsa);
> +
> + igt_modeset_disable_all_outputs(&data->display);
> + chamelium_reset_state(&data->display, data->chamelium, port,
> + data->ports, data->port_count);
> +
> + output = chamelium_prepare_output(data, port, edid);
> + connector = chamelium_port_get_connector(data->chamelium, port,
> false);
> + primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> + igt_assert(primary);
> +
> + igt_assert(connector->count_modes > 0);
> + mode = &connector->modes[0];
> +
> + fb_id = igt_create_color_pattern_fb(data->drm_fd, mode->hdisplay,
> + mode->vdisplay,
> DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR, 0, 0,
> 0,
> + &fb);
> + igt_assert(fb_id > 0);
> +
> + chamelium_enable_output(data, port, output, mode, &fb);
> +
> + run = false;
> + success = true;
> + for (i = 0; i < test_sampling_rates_count; i++) {
> + for (j = 0; j < test_formats_count; j++) {
> + ret = alsa_open_output(alsa, audio_device);
> + igt_assert_f(ret >= 0, "Failed to open ALSA output\n");
> +
> + format = test_formats[j];
> + channels = PLAYBACK_CHANNELS;
> + sampling_rate = test_sampling_rates[i];
> +
> + if (!check_audio_configuration(alsa, format, channels,
> + sampling_rate)) {
> + alsa_close_output(alsa);
> + continue;
> + }
> +
> + run = true;
> +
> + success &= run_audio_test_once(data, alsa, port,
> format,
> + channels, sampling_rate);
> +
> +
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> + SUSPEND_TEST_NONE);
[1] The suspend/resume is inside both nested loops, so it executes once
per (rate, format) combination. With 5 sampling rates and 4 formats
that is 20 system suspensions per test run. Please correct it .
[2] If the pre-suspend test already fails, the code still proceeds to
suspend the system and runs the post-suspend test. The final
igt_assert(success) cannot tell you whether audio broke before
or after suspend. This completely removes the diagnostic value of the
test.
[3] After a full suspend/resume cycle the kernel performs a full
display power cycle and the modeset state is not guaranteed to be
restored automatically. Chamelium requires an active video signal on
the connector to capture audio. Running the post-suspend audio test
without first verifying and re-committing the display will cause the
Chamelium to silently receive no audio, making the post-resume test
meaningless.
Regards,
Mohammed Bilal
> +
> + success &= run_audio_test_once(data, alsa, port,
> format,
> + channels, sampling_rate);
> +
> + alsa_close_output(alsa);
> + }
> + }
> +
> + igt_assert(run);
> + igt_assert(success);
> +
> + igt_remove_fb(data->drm_fd, &fb);
> +
> + drmModeFreeConnector(connector);
> +
> + free(alsa);
> +}
> +
> static const char test_display_audio_edid_desc[] =
> "Plug a connector with an EDID suitable for audio, check ALSA's "
> "EDID-Like Data reports the correct audio parameters"; @@ -866,6
> +977,11 @@ int igt_main()
> connector_subtest("dp-audio-edid", DisplayPort, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_DP_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("dp-audio-after-suspend", DisplayPort, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_DP_AUDIO);
> +
> igt_describe("HDMI tests");
>
> igt_describe(test_display_audio_desc);
> @@ -876,6 +992,11 @@ int igt_main()
> connector_subtest("hdmi-audio-edid", HDMIA, &data,
> test_display_audio_edid,
> IGT_CUSTOM_EDID_HDMI_AUDIO);
>
> + igt_describe(test_display_audio_suspend_resume_desc);
> + connector_subtest("hdmi-audio-after-suspend", HDMIA, &data,
> + test_display_audio_suspend_resume,
> + "HDMI", IGT_CUSTOM_EDID_HDMI_AUDIO);
> +
> igt_fixture() {
> igt_display_fini(&data.display);
> drm_close_driver(data.drm_fd);
> --
> 2.43.0
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-06-23 14:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 8:27 [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
2026-06-23 14:36 ` ✗ i915.CI.BAT: failure for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev8) Patchwork
2026-06-23 14:43 ` ✓ Xe.CI.BAT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-06-19 5:38 [PATCH i-g-t] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
2026-06-23 8:02 ` Samala, Pranay
2026-06-11 3:52 Jeevan B
2026-05-13 6:35 Jeevan B
2026-05-11 4:18 Jeevan B
2026-05-11 6:22 ` Bilal, Mohammed
2026-05-05 18:03 Jeevan B
2026-05-07 5:13 ` Bilal, Mohammed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.