Skip to content

Conversation

@tmoida
Copy link
Contributor

@tmoida tmoida commented Nov 24, 2025

Overlay builds using audioreach modules need special configuration before audio tests can run properly. Without this setup, PipeWire fails to communicate with the audio hardware.

Changes:

  • Added setup_overlay_audio_environment() in audio_common.sh
    • Detects overlay builds via lsmod audioreach check
    • Sets /dev/dma_heap/system permissions (chmod 666)
    • Restarts pipewire service via systemctl
    • Waits up to 60s for service to be ready
    • Validates both process and wpctl communication
  • Integrated setup call in AudioPlayback and AudioRecord tests
    • Runs early, before backend detection
    • Fails test if setup fails on overlay builds
    • Zero overhead on base builds
  • Updated README files with overlay build documentation

Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

No audoireach - treats as base build, clean early return 0
audioreach present - do the overtlay DMA + pipewire setup and be strict


setup_overlay_audio_environment() {
# Detect overlay build
if ! lsmod | grep -q audioreach; then
Copy link
Contributor

Choose a reason for hiding this comment

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

use lsmod 2>/dev/null so it doesn't explode if lsmod behaves oddly. also use awk '$1 ~ /^audiorech/ ...' so it matches audioreach, audioreach_, etc.. on the module name column, not random strings in other coulmns.

Overlay builds using audioreach modules need special configuration
before audio tests can run properly. Without this setup, PipeWire
fails to communicate with the audio hardware.

Changes:
- Added setup_overlay_audio_environment() in audio_common.sh
  * Detects overlay builds via lsmod audioreach check
  * Sets /dev/dma_heap/system permissions (chmod 666)
  * Restarts pipewire service via systemctl
  * Waits up to 60s for service to be ready
  * Validates both process and wpctl communication
- Integrated setup call in AudioPlayback and AudioRecord tests
  * Runs early, before backend detection
  * Fails test if setup fails on overlay builds
  * Zero overhead on base builds
- Updated README files with overlay build documentation

Signed-off-by: Teja Swaroop Moida <tmoida@qti.qualcomm.com>
@tmoida
Copy link
Contributor Author

tmoida commented Nov 26, 2025

I have updated the script as suggested. It now uses awk to match only the module name column with error suppression.
I validated it on QCS6490 with audioreach_driver and ASOC.

Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

LGTM

@smuppand smuppand merged commit 85d00ca into qualcomm-linux:main Nov 27, 2025
8 checks passed
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.

2 participants