* [PATCH i-g-t v4] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests
@ 2026-06-12 5:58 Jeevan B
2026-06-12 7:15 ` ✓ Xe.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6) Patchwork
2026-06-12 7:42 ` ✓ i915.CI.BAT: " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Jeevan B @ 2026-06-12 5:58 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: Updated test to avoid false-pass on zero executed configs.
Replace post-suspend forced re-enable with connector
re-probe/connected checks.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/chamelium/kms_chamelium_audio.c | 159 +++++++++++++++++++++++++-
1 file changed, 158 insertions(+), 1 deletion(-)
diff --git a/tests/chamelium/kms_chamelium_audio.c b/tests/chamelium/kms_chamelium_audio.c
index df8d27c0c..cc106f52a 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,85 @@ 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);
+
+ /* 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 +1013,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 +1028,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] 3+ messages in thread
* ✓ Xe.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6)
2026-06-12 5:58 [PATCH i-g-t v4] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
@ 2026-06-12 7:15 ` Patchwork
2026-06-12 7:42 ` ✓ i915.CI.BAT: " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-06-12 7:15 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]
== Series Details ==
Series: tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6)
URL : https://patchwork.freedesktop.org/series/166012/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_8960_BAT -> XEIGTPW_15355_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (13 -> 12)
------------------------------
Missing (1): bat-lnl-2
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_8960 -> IGTPW_15355
* Linux: xe-5244-311cbada9202146752938f54503d33980ee4f3f6 -> xe-5246-9ce63e3d9903982c053b125686abcb7a84357ed4
IGTPW_15355: 15355
IGT_8960: 88bd725754990332efcd158b0429f6ac7fb63862 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-5244-311cbada9202146752938f54503d33980ee4f3f6: 311cbada9202146752938f54503d33980ee4f3f6
xe-5246-9ce63e3d9903982c053b125686abcb7a84357ed4: 9ce63e3d9903982c053b125686abcb7a84357ed4
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15355/index.html
[-- Attachment #2: Type: text/html, Size: 1652 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✓ i915.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6)
2026-06-12 5:58 [PATCH i-g-t v4] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
2026-06-12 7:15 ` ✓ Xe.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6) Patchwork
@ 2026-06-12 7:42 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-06-12 7:42 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 2147 bytes --]
== Series Details ==
Series: tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6)
URL : https://patchwork.freedesktop.org/series/166012/
State : success
== Summary ==
CI Bug Log - changes from IGT_8960 -> IGTPW_15355
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15355/index.html
Participating hosts (42 -> 40)
------------------------------
Missing (2): bat-dg2-13 fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_15355 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@sanitycheck:
- bat-apl-1: [PASS][1] -> [DMESG-WARN][2] ([i915#13735]) +37 other tests dmesg-warn
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8960/bat-apl-1/igt@i915_selftest@live@sanitycheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15355/bat-apl-1/igt@i915_selftest@live@sanitycheck.html
#### Possible fixes ####
* igt@kms_hdmi_inject@inject-audio:
- fi-tgl-1115g4: [FAIL][3] ([i915#16115]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8960/fi-tgl-1115g4/igt@kms_hdmi_inject@inject-audio.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15355/fi-tgl-1115g4/igt@kms_hdmi_inject@inject-audio.html
[i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
[i915#16115]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16115
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_8960 -> IGTPW_15355
* Linux: CI_DRM_18667 -> CI_DRM_18668
CI-20190529: 20190529
CI_DRM_18667: d931e7b381f9d86766f3a971a9376e4312745af8 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_18668: 9ce63e3d9903982c053b125686abcb7a84357ed4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_15355: 15355
IGT_8960: 88bd725754990332efcd158b0429f6ac7fb63862 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15355/index.html
[-- Attachment #2: Type: text/html, Size: 2772 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-12 7:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-12 5:58 [PATCH i-g-t v4] tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests Jeevan B
2026-06-12 7:15 ` ✓ Xe.CI.BAT: success for tests/chamelium/kms_chamelium_audio: Add suspend/resume audio tests (rev6) Patchwork
2026-06-12 7:42 ` ✓ i915.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox