Skip to content

Audio picker: always expose raw USB audio path for car-dash compatibility#80

Merged
patrickrb merged 1 commit into
mainfrom
fix/audio-picker-usb-direct
May 29, 2026
Merged

Audio picker: always expose raw USB audio path for car-dash compatibility#80
patrickrb merged 1 commit into
mainfrom
fix/audio-picker-usb-direct

Conversation

@patrickrb
Copy link
Copy Markdown
Owner

Summary

  • On car-dash / automotive Android skins, the AudioManager-listed USB-audio entry routes through AudioRecord + setPreferredDevice(), which the in-car audio policy silently overrides back to the built-in mic. The waterfall keeps showing cabin noise no matter what device the user picks.
  • The codebase already has a raw USB Audio Class path (UsbAudioDevice) that opens the interface directly via UsbManager and bypasses Android's audio policy entirely. It was being hidden whenever AudioManager also listed the same device.
  • This PR removes the dedup in AudioDeviceSpinnerAdapter.refreshDevices() so both entries appear, and labels the raw one (USB direct) so users on broken HALs know which to pick.

Test plan

  • Pixel 8 (Android 14): both (USB Audio) and (USB direct) entries now appear for the connected radio; existing AudioManager-routed path still works.
  • Car-dash Android 11 tablet: install via Play internal, pick (USB direct) entry in Settings → Audio Input, confirm waterfall shows RF instead of cabin mic.

🤖 Generated with Claude Code

Stop deduping the UsbManager-discovered USB audio entry against
AudioManager's listing. On automotive Android skins (car-dash head
units) the AudioManager-listed entry routes via AudioRecord +
setPreferredDevice(), which the in-car audio policy silently overrides
back to the built-in mic — so the waterfall keeps showing cabin noise
no matter what the user picks. The raw USB path opens the interface
directly via UsbManager and bypasses that policy entirely.

Both entries are now shown side-by-side; the raw one is labeled
"(USB direct)" so users on broken HALs know which to pick.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@patrickrb patrickrb merged commit 82027fb into main May 29, 2026
2 checks passed
@patrickrb patrickrb deleted the fix/audio-picker-usb-direct branch May 29, 2026 00:46
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.

1 participant