Audio picker: always expose raw USB audio path for car-dash compatibility#80
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.UsbAudioDevice) that opens the interface directly viaUsbManagerand bypasses Android's audio policy entirely. It was being hidden whenever AudioManager also listed the same device.AudioDeviceSpinnerAdapter.refreshDevices()so both entries appear, and labels the raw one(USB direct)so users on broken HALs know which to pick.Test plan
(USB Audio)and(USB direct)entries now appear for the connected radio; existing AudioManager-routed path still works.(USB direct)entry in Settings → Audio Input, confirm waterfall shows RF instead of cabin mic.🤖 Generated with Claude Code