Add Audio_Hamoa: ALSA-based audio playback and recording tests for Ha…#477
Add Audio_Hamoa: ALSA-based audio playback and recording tests for Ha…#477tmoida wants to merge 1 commit into
Conversation
…moa platform Fixes qualcomm-linux#454 This PR introduces comprehensive audio testing for Qualcomm Hamoa platforms using ALSA-based mixer configurations. The implementation provides automated validation of audio playback and recording capabilities across multiple devices. Tests audio playback on two output devices: - Handset (plughw:0,1): 4-way speaker system using WSA2/WSA amplifiers * Audio path: AIF1_PB → WSA2/WSA RX0/RX1 → WooferLeft/Right + TweeterLeft/Right * 44 mixer controls configured * Dual WSA codec support with compressor and boost - Headset (plughw:0,0): Stereo headphones using RX codec * Audio path: AIF1_PB → RX_MACRO RX0/RX1 → RX INT0/INT1 → HPHL/HPHR * 22 mixer controls configured * Class-H High Fidelity mode for optimal audio quality Tests audio recording on two input devices: - Handset (plughw:0,3): Built-in VA_DMIC (Voice Activation DMIC) * Audio path: DMIC0/DMIC1 → VA DMIC MUX0/MUX1 → VA DEC0/DEC1 → VA_AIF1_CAP * 8 mixer controls configured * Dual DMIC support with volume control - Headset (plughw:0,2): SoundWire microphone (SWR_MIC) * Audio path: SWR_MIC → ADC2 → TX SMIC MUX0 (SWR_MIC0) → TX DEC0 → TX_AIF1_CAP * 10 mixer controls configured - **Dual device support**: Test handset, headset, or both devices - **Mixer validation**: Verifies all mixer settings before audio operations - **Clip/config-based testing**: Auto-discovery of audio clips and configurations - **Skip mode**: Test mixer configuration without actual audio playback/recording - **CI/LAVA integration**: * Unique result file suffixes prevent file collisions in parallel runs * Unique testcase IDs prevent LAVA testcase ID collisions * Enables running multiple configurations simultaneously - **Comprehensive logging**: Mixer dumps, playback/recording logs per test case - **Recording validation**: File size and format verification Comprehensive README files included for both test suites: - Complete usage examples (basic, mixer-only, verbose, CI/LAVA) - Command line options and environment variables tables - Audio clip/config configuration tables - Test execution flow diagrams - Sample output examples - Known limitations and workarounds - CI/LAVA integration guidelines Signed-off-by: Teja Swaroop Moida <tmoida@qti.qualcomm.com>
e479130 to
21606a2
Compare
smuppand
left a comment
There was a problem hiding this comment.
The Hamoa mixer details are useful, but I do not think we should add a new separate Audio_Hamoa test suite. Existing AudioPlayback and AudioRecord already provide most of the orchestration this PR reimplements: clip/config discovery, result suffixes, LAVA testcase IDs, backend/bootstrap handling, and standard result reporting.
The better approach is to add a Hamoa ALSA mixer/profile layer and reuse the existing tests:
AudioPlayback --backend alsa --alsa-profile hamoa --device handset|headset
AudioRecord --backend alsa --alsa-profile hamoa --device handset|headset
This also aligns with PR #461, where check_dependencies() can recover missing commands through the active package manager. We can add mappings for aplay/arecord/amixer to alsa-utils and let the existing tests recover dependencies instead of creating a separate suite.
Recommendation:
Extract the Hamoa mixer commands into a reusable ALSA Hamoa profile helper.
Extend existing AudioPlayback and AudioRecord with a Hamoa ALSA profile and dependency recovery through PR Add provider-based package dependency recovery #461.
Add Audio_Hamoa: ALSA-based audio playback and recording tests for Hamoa platform
Fixes #454
This PR introduces comprehensive audio testing for Qualcomm Hamoa platforms using
ALSA-based mixer configurations. The implementation provides automated validation
of audio playback and recording capabilities across multiple devices.
New Test Suites
AudioPlayback_Hamoa
Tests audio playback on two output devices:
AudioRecord_Hamoa
Tests audio recording on two input devices:
Key Features
Documentation
Comprehensive README files included for both test suites: