Skip to content

AudioRecord: skip when no real capture source is available#465

Merged
bhargav0610 merged 1 commit into
qualcomm-linux:mainfrom
smuppand:audio
Jun 1, 2026
Merged

AudioRecord: skip when no real capture source is available#465
bhargav0610 merged 1 commit into
qualcomm-linux:mainfrom
smuppand:audio

Conversation

@smuppand
Copy link
Copy Markdown
Contributor

@smuppand smuppand commented May 30, 2026

Update AudioRecord to avoid running PipeWire mic recording through an implicit default source when no concrete PipeWire capture source is discovered.
The previous flow allowed --source mic to continue with backend=pipewire even when SRC_ID was empty. In that case, the test attempted pw-record against the default source and then fell back to arecord -D pipewire. On systems with no real capture source, this can lead to empty recordings and false CI failures. This fixes the issue on qualcomm-linux/meta-qcom#2127

Why
Some platforms may boot with PipeWire/WirePlumber running but without a real audio capture source exposed. In that case, recording from an implicit PipeWire default source is not a valid mic capture test.
The updated behavior makes the test capability-aware:

  • real PipeWire capture source available: run PipeWire recording
  • PipeWire source missing but ALSA capture works: run direct ALSA recording
  • no real capture path available: skip instead of fail

This avoids treating missing capture hardware or missing capture exposure as a PipeWire recording regression.

Avoid running PipeWire mic recording through an implicit default source
when no concrete PipeWire source was discovered.

On systems without a real capture source, this path can fall through to
dummy/null/default behavior or fail after producing an empty recording.
Reuse the existing ALSA capture profile probe before recording. If a real
ALSA capture path is available, switch to direct ALSA capture. If no real
capture path exists, report SKIP instead of failing the test.

Also replace the direct wpctl set-default call with the existing bounded
pw_set_default_source helper.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@bhargav0610 bhargav0610 self-requested a review June 1, 2026 07:20
@bhargav0610 bhargav0610 merged commit b8c7fb7 into qualcomm-linux:main Jun 1, 2026
12 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.

3 participants