Skip to content

Conversation

@smuppand
Copy link
Contributor

@smuppand smuppand commented Jan 5, 2026

This PR improves the GStreamer-based Audio_Playback runner and lib_gstreamer.sh

What’s included

  • Audio_Playback/run.sh
    • Adds LAVA env var defaults for all CLI parameters (AUDIO_* and AUDIO_PLAYBACK_*), while keeping CLI overrides highest priority.
    • Uses shared lib helpers for:
      • gst-launch execution with timeout fallback (audio_timeout_run → timeout → direct)
      • evidence sampling with optional ASoC “path_on” fallback
      • clip metadata/caps inference and a consistent “force caps only when meaningful” policy
    • Keeps LAVA-friendly behavior: writes PASS/FAIL/SKIP to .res and always exits 0.

…d lib runners

- Audio_Playback run.sh now supports LAVA-provided environment defaults and reduces inline duplication by using
  shared helpers from lib_gstreamer.sh.
- Add env-to-default mapping for all CLI params (AUDIO_* and AUDIO_PLAYBACK_*)
- Keep CLI as highest priority override
- Use shared gst-launch timeout runner and shared evidence sampling wrapper
- Use shared caps inference + caps forcing policy (user-requested or inferred only)
- Improve logging: prints normalized duration, backend chain, sink selection and pipeline

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
…ce/timeout/evidence

Refactor lib_gstreamer.sh to provide reusable building blocks for all Audio_* GST tests
(Playback) and remove duplicate/unused implementations.

Changes:
- Centralize gst-discoverer capture + audio caps inference (rate/channels)
- Provide a single gst-launch runner with timeout fallback (audio_timeout_run/timeout/direct)
- Consolidate backend evidence sampling with optional ASoC path_on fallback
- Keep backend-aware sink/source selection helpers for reuse by other audio runners
- Remove duplicated function variants and align naming/behavior to one canonical set

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
- Backend/stack selection examples (pipewire/pulseaudio/alsa; base/overlay/auto)
- Assets provisioning (local directory, local tarball, optional URL fetch)
- Caps inference vs forced caps behavior (--rate/--channels)
- GST debug controls (GST_DEBUG level) and where logs are written
- Typical CI usage patterns (null sink, non-interactive runs)

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
… runner

- Maps YAML params to run.sh CLI (only passes args when non-empty)
- Supports backend/stack/format/duration/clipdur/clip overrides
- Supports assets and clips-dir provisioning inputs
- Supports optional caps enforcement, sink selection, null sink and GST debug level
- Publishes Audio_Playback.res via send-to-lava.sh

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand smuppand marked this pull request as draft January 5, 2026 16:44
@smuppand smuppand marked this pull request as ready for review January 8, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant