Fix RB8 overlay audio rerun failures by making PipeWire overlay setup idempotent#295
Fix RB8 overlay audio rerun failures by making PipeWire overlay setup idempotent#295smuppand wants to merge 3 commits intoqualcomm-linux:mainfrom
Conversation
lumag
left a comment
There was a problem hiding this comment.
Restarting PipeWire is a valid code path which must work. Please add an explicit test, restarting PipeWire and make sure that it works. Not restarting the PW is not a way to solve the issue.
Runner/utils/audio_common.sh
Outdated
| fmt="$1"; dur="$2" | ||
| base="${AUDIO_CLIPS_BASE_DIR:-AudioClips}" | ||
|
|
There was a problem hiding this comment.
Too many unrelated changes. Please clean up your commit
Runner/utils/audio_common.sh
Outdated
| else | ||
| log_error "No downloader (wget/curl) available to fetch $url" | ||
| return 1 | ||
| fi |
There was a problem hiding this comment.
Don't mix style cleanups and actual changes. It makes it much harder to review your PR.
Update SPDX-License-Identifier tags across the repository from BSD-3-Clause-Clear to BSD-3-Clause as requested by legal. No functional changes. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
… freezes On overlay builds (audioreach modules present), setup_overlay_audio_environment() was restarting pipewire every run, which can fail/hang on RB8 after the first successful setup until reboot. Make overlay setup idempotent: - avoid unconditional pipewire restart on subsequent runs - guard systemctl/wpctl calls with timeouts to prevent freezes - keep DMA heap permission setup but fail only on real errors - add readiness polling to confirm PipeWire is usable This removes flaky FAILs on repeated AudioRecord runs on RB8 overlay images. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
…runtime Align AudioRecord with shared audio_common/functestlib helpers and reduce local logic that can drift. - use pw_set_default_source helper instead of raw wpctl set-default - ensure alsa_pick_virtual_pcm comes from audio_common.sh (no local copy) - replace expr-based counters with POSIX arithmetic expansion - keep existing CLI/behavior and result/log layout unchanged No functional change to the recording matrix/config logic beyond robustness. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Adjusting the order of the tests may temporarily resolve the freezing issue. qualcomm-linux/lava-test-plans#23 [<0>] snd_pcm_dev_disconnect+0x44/0x1e0 [snd_pcm] |
So, is it an issue in the kernel itself or in the AudioReach drivers?
Working around the issue would mean that we would not be able to test whether the issue is actually fixed or not. |
Problem
On overlay builds (audioreach modules present), repeated runs of AudioRecord can FAIL on RB8 because the overlay setup path restarts PipeWire every run. After the first successful setup (until reboot), subsequent
systemctl restart pipewireattempts can fail/hang and cause the testcase to report FAIL even though the audio stack is otherwise usable.What this PR changes
This PR fixes the issue #291 reported on RB8
Runner/utils/audio_common.sh
setup_overlay_audio_environment()idempotent for overlay builds:systemctl/wpctlcalls using existing timeout wrappers to avoid control-plane hangs.Runner/suites/Multimedia/Audio/AudioRecord/run.sh
[audio_common.sh](http://audio_common.sh/)(e.g., PipeWire source default helper where applicable).[audio_common.sh](http://audio_common.sh/)).