Skip to content

audio: add generic external route validation - #604

Draft
Srikanth Muppandam (smuppand) wants to merge 2 commits into
qualcomm-linux:mainfrom
smuppand:feature/audio-routing-validation
Draft

Srikanth Muppandam (smuppand) wants to merge 2 commits into
qualcomm-linux:mainfrom
smuppand:feature/audio-routing-validation

Conversation

@smuppand

Copy link
Copy Markdown
Contributor

Summary

  • add generic runtime-discovered playback validation for HDMI, DisplayPort/eDP, and 3.5 mm headphone routes
  • add wired headset-microphone capture validation without falling back to an internal microphone
  • add shared bounded ALSA route discovery, explicit mixer/PCM/device overrides, deterministic playback signal generation, strict recording validation, and mixer restoration
  • keep the existing generic AudioPlayback and AudioRecord behavior unchanged

CI and fixture behavior

  • route suites are opt-in and reusable across SoCs without fixed card or PCM numbers
  • automatic discovery rejects ambiguous mappings and asks for exact CI overrides
  • HDMI, DP/eDP, and headphone playback require fixture-side signal detection
  • headset-microphone capture requires fixture-side audio injection
  • missing optional image-provided ALSA utilities produce a clean skip and no packages are installed at runtime

Validation

  • ShellCheck 0.9.0
  • dash -n
  • YAML parsing
  • result-name and file-mode checks
  • git diff --check
  • mocked unique and ambiguous route discovery
  • mocked timeout classification and mixer apply/restore paths
  • mocked playback and headset-microphone recording flows
  • strict RMS validation through the reduced-dependency od/dd fallback

Target validation still required

  • HDMI playback with a connected audio-capable display
  • DP/eDP playback with the corresponding fixture
  • 3.5 mm headphone playback
  • headset-microphone capture with an injected signal
  • direct ALSA behavior on desktop distributions where PipeWire may own the device

Add bounded playback and capture route discovery using runtime ALSA PCM and mixer inventories. Reject ambiguous mappings, preserve probe failures, generate deterministic playback audio, and restore mixer state after route preparation. Extend the WAV fallback so strict recording thresholds remain enforced when Python is unavailable.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Add fixture-oriented HDMI, DisplayPort/eDP, and headphone playback coverage plus wired headset-microphone capture coverage. Discover route topology dynamically, support explicit CI overrides, retain collision-safe evidence, and expose portable LAVA parameters without changing the existing generic playback and recording flows.

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

Copy link
Copy Markdown
Contributor Author

Bhargav-qcom (@bhargav0610) Need help on this PR in validation?

@smuppand
Srikanth Muppandam (smuppand) marked this pull request as draft September 29, 2026 17:45
@bhargav0610

Copy link
Copy Markdown
Contributor

Anil (@qcom-anilyada) once done with validations pls update here

@qcom-anilyada

Copy link
Copy Markdown
Contributor

Anil (Anil (@qcom-anilyada)) once done with validations pls update here

validated on glymur (monaco-evk device doesn't have 3.5mm jack) with headphones in 3.5mm jack, it is skipping
scripts tested:

  1. Runner/suites/Multimedia/Audio/AudioRoutePlayback/AudioRoutePlayback_Headphones.yaml
    • the requested headphones route was not visible in the PCM inventory
  2. Runner/suites/Multimedia/Audio/AudioRouteRecord/AudioRouteRecord_HeadsetMic.yaml
    • the requested headset microphone was not visible in the capture PCM inventory
  3. Runner/suites/Multimedia/Audio/AudioRoutePlayback/AudioRoutePlayback_DisplayPort.yaml
    • the requested displayport route was not visible in the PCM inventory

This branch has not been deployed

No deployments
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.

3 participants