audio: add ALSA card registration preflight test#458
Open
smuppand wants to merge 2 commits into
Open
Conversation
Add common audio helper functions for validating ALSA sound card registration from tests. The new helpers provide support to: - dump ALSA/kernel sound inventory for CI debug - detect registered non-dummy ALSA cards - wait for card registration - validate /dev/snd/controlC<N> nodes - optionally validate PCM/playback/capture entries - infer whether audio registration is expected from DT/sysfs - collect audio-focused dmesg triage These helpers are intended for lightweight audio preflight tests and do not start or restart PipeWire, PulseAudio, ADSP, or remoteproc. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Add a new Audio_Card_Registration test to validate that the kernel/ALSA audio card is registered after boot. The test validates: - ALSA card presence under /proc/asound/cards - non-dummy sound card registration - /dev/snd/controlC<N> node creation - optional PCM/playback/capture entries - audio-related dmesg diagnostics This provides a fast audio preflight check before running playback or record tests. It helps distinguish kernel/ASoC card registration issues from userspace audio backend, routing, clip, or mixer failures. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AudioPlayback and AudioRecord validate end-to-end userspace audio flows, but they can fail due to backend, routing, mixer, clip, or runtime environment issues.
This PR adds a lightweight preflight test to validate the lower-level kernel/ALSA audio card registration path first. This helps quickly identify whether the audio card itself registered correctly before running playback or record tests.
The test is useful for Qualcomm boards where failures may come from:
/dev/sndnodesWhat this PR changes
Adds common helper functions in
Runner/utils/[audio_common.sh](http://audio_common.sh/)to:/dev/snd/controlC<N>Adds new test:
Runner/suites/Multimedia/Audio/Audio_Card_Registration/[run.sh](http://run.sh/)Runner/suites/Multimedia/Audio/Audio_Card_Registration/Audio_Card_Registration.yamlTest behavior
The test validates that at least one valid, non-dummy ALSA card is registered and that the matching card has a control node.
By default, the test keeps PCM validation optional to avoid false failures on boards where playback/capture topology can vary by image or platform.
Default checks:
/dev/snd/controlC<N>validationOptional checks:
Result file
The test writes a single fixed result file:
Lava job for reference with the current changes. https://lava.infra.foundries.io/scheduler/job/212244#L2496