Skip to content

make Audio_Record_Playback more deterministic for offline CI#411

Merged
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:gstreamer
Apr 21, 2026
Merged

make Audio_Record_Playback more deterministic for offline CI#411
bhargav0610 merged 2 commits intoqualcomm-linux:mainfrom
smuppand:gstreamer

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented Apr 19, 2026

Improve Audio_Record_Playback stability and result reporting for CI runs. Enhancements to address as part of #408

This update keeps backward compatibility for user-provided clip sources, but makes the default path more reliable by preferring locally generated OGG/MP3 sample clips when no clip path or clip URL is explicitly requested.

It also tightens result handling for dependent pulsesrc playback cases. When running in all mode, playback_pulsesrc_wav and playback_pulsesrc_flac now fail if the corresponding pulsesrc recording
in the same run did not produce a valid file, instead of being marked as skip. This makes the final summary reflect the actual end-to-end failure more accurately.

Changes included:

  • prefer offline-generated OGG/MP3 clips for default CI flow
  • preserve existing --clip-path / --clip-url behavior for backward compatibility
  • track whether external clips were explicitly requested
  • pass explicit provisioning context from run.sh into provisioning helper
  • mark dependent pulsesrc playback cases as FAIL in all mode when the
    prerequisite recording failed in the same run

Why:

  • reduce network dependency in CI
  • avoid misleading SKIP results for same-run prerequisite failures
  • make overlay/base comparisons easier by producing clearer verdicts

Lava jobs for reference with these code changes.
Base/ Config 1 - https://lava.infra.foundries.io/scheduler/job/183417

@smuppand smuppand requested review from Vkenjam and bhargav0610 April 19, 2026 12:48
@smuppand
Copy link
Copy Markdown
Contributor Author

@nitinn22 to review

Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh Outdated
@nitinn22
Copy link
Copy Markdown
Contributor

nitinn22 commented Apr 19, 2026

Main suggestions are around avoiding silent copy failures and improving portability/robustness of the generation pipelines (audioresample, encoder property compatibility). Also, if a LAVA job can be posted with these encode followed by decode and full suite working fine would be perfect.

@smuppand smuppand added the bug Something isn't working label Apr 20, 2026
@smuppand smuppand requested a review from nitinn22 April 20, 2026 01:40
sample_ogg="$outdir/sample_audio.ogg"
sample_mp3="$outdir/sample_audio.mp3"

have_ogg=0
Copy link
Copy Markdown
Contributor

@nitinn22 nitinn22 Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have_ogg are global state shared across helper functions. This is fine in POSIX sh, but a short comment noting this dependency would help future readers.

@nitinn22
Copy link
Copy Markdown
Contributor

I guess we are good post these minor fixes, pls share a working LAVA job.

@smuppand
Copy link
Copy Markdown
Contributor Author

I guess we are good post these minor fixes,

Agreed. I added a short comment documenting that have_ogg / have_mp3 are intentionally shared global availability flags in this POSIX sh flow, refreshed by audio_record_mark_existing_samples() and consumed by subsequent provisioning stages.

pls share a working LAVA job.

https://lava.infra.foundries.io/scheduler/job/184344

@smuppand smuppand requested a review from nitinn22 April 21, 2026 01:14
Copy link
Copy Markdown
Contributor

@nitinn22 nitinn22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

… overrides

Update audio clip provisioning to prefer locally generated GStreamer
sample clips for OGG and MP3 when no external clip source is explicitly
requested, making CI runs less dependent on network availability.

This keeps backward compatibility by preserving existing --clip-path,
--clip-url, AUDIO_CLIP_PATH, and AUDIO_CLIP_URL behavior. The run.sh
changes now track whether an external source was explicitly requested and
pass that state into provision_test_files(), while the provisioning
logic can still fall back to user-provided clips or downloads when
requested.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
encoders in gstreamer_build_audio_record_pipeline().

This makes pulsesrc-based recording paths, especially FLAC, more robust
across platforms by improving caps/rate negotiation before encoding and
reducing intermittent file-generation failures seen in CI/LAVA runs.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand
Copy link
Copy Markdown
Contributor Author

LGTM

Made minor changes, sometimes still we are observing the
run_record_test() uses duration + 10
playback uses duration + 10
local OGG/MP3 generation uses duration + 10
but run_record_pulsesrc_test() uses only duration
https://lava.infra.foundries.io/scheduler/job/184431#L2529

[INFO] 1970-01-01 00:00:56 - Record exit code: 124
[FAIL] 1970-01-01 00:00:56 - record_pulsesrc_flac: FAIL (no output file created)
[INFO] 1970-01-01 00:01:27 - ==========================================
[FAIL] 1970-01-01 00:01:27 - playback_pulsesrc_flac: FAIL - recorded file too small: 0 bytes (pulsesrc recording failed in same run)
[INFO] 1970-01-01 00:01:27 - Playing back Test files (OGG/MP3)...
[INFO] 1970-01-01 00:01:27 - ==========================================

After adjusting the duration, the two instances below are now passing.
https://lava.infra.foundries.io/scheduler/job/184389#L2558
https://lava.infra.foundries.io/scheduler/job/184390#L2531

@smuppand smuppand requested a review from nitinn22 April 21, 2026 04:21
Copy link
Copy Markdown
Contributor

@nitinn22 nitinn22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@bhargav0610 bhargav0610 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bhargav0610 bhargav0610 merged commit b1dd9f3 into qualcomm-linux:main Apr 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants