usb_audio: mark speaker OUT adaptive so Windows UAC2 can start - #11256
Open
jbirchall-svg wants to merge 3 commits into
Open
usb_audio: mark speaker OUT adaptive so Windows UAC2 can start#11256jbirchall-svg wants to merge 3 commits into
jbirchall-svg wants to merge 3 commits into
Conversation
…speaker and headset in usb_audio to resolve bug adafruit#11216
…dio-enabling-speaker-fail-to-start
Collaborator
|
@jbirchall-svg The original post looks like LLM output? Have you done the tests listed? |
Author
@dhalbert it is LLM output (Cursor AI Grok 4.6 model) and I have only done the Windows 11 Pro tests on a single Adafruit QT Py RP2040 board connected to an Adafruit I2S Amplifier BFF and an 8 Ohm speaker. Audio streams correctly for me from the PC, through the circuit, and into the speaker after applying the PR and building my fork. |
FoamyGuy
requested changes
Aug 27, 2026
FoamyGuy
left a comment
Collaborator
There was a problem hiding this comment.
I had an agent confirm no regressions from this change on linux.
I don't have any easy way to test on windows.
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.
Closes: #11216
Fixes Windows 11 Code 10 ("This device cannot start") when
usb_audio.enable(speaker=True)is used.The speaker (and headset speaker) OUT endpoint was copied from TinyUSB's
TUD_AUDIO20_SPEAKER_*_FB_DESCRIPTORbut the feedback endpoint wasintentionally omitted. The data EP was still marked Asynchronous.
usbaudio2.sysrequires an explicit feedback endpoint for async OUT anddoes not support implicit feedback, so the driver fails during start
before any audio flows. Linux is more lenient, which is why RP2040
speaker tests looked fine there.
The USBSpeaker sink already adapts: it drains whatever the host sends
and underruns/overruns in the ring. Advertise that honestly as Adaptive
instead of Asynchronous. Microphone IN stays Asynchronous (valid
without a feedback EP).
This is not a full clock-matching implementation. Long-term drift can
still produce drop/insert artifacts; a later change can add a feedback
EP (and TinyUSB
CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP) if we need theboard to be the clock master. Explicit feedback is also a poor first
fix on full-speed parts: Windows' UAC2 driver has known FS feedback
format bugs, and TinyUSB's own speaker example emits UAC1 on FS.
Test plan:
usb_audio.enable(sample_rate=48000, channel_count=2, microphone=False, speaker=True)— audio device starts, no Code 10, playback reaches I2Susb_audio.enable(speaker=True)(headset; mic still defaults on) — speaker device starts