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 2 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.
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. |
… 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>
From your logs,
You’re right, reordering can hide the bug. With this patch, we check the userspace response. If there is no response, we attempt to restart and retry before marking the test as SKIP. |
AudioReach also provides its own set of kernel drivers, that's why I am sking if the issue is on the upstream side or in the AR kernel driver. In the latter case I'd prefer to temporarily disable AR in-kernel driver until it is fixed. |
After discussing with the audio team, we received an update that SSR should not be performed for ADSP since it is not supported with upstream. Therefore, we need to adjust the remoteproc test to ensure it does not trigger SSR. |
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/)).