Skip to content

usb.host.audio: say when a hub has no bus time left for a stream - #747

Merged
bdbarnett merged 1 commit into
mainfrom
audio-enospc-message
Nov 22, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
audio-enospc-message

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

When a full-speed audio device sits behind a high-speed hub, every periodic stream on that hub shares the hub's transaction translator. A host that budgets the translator refuses a stream that wouldn't fit with ENOSPC. Until now Speaker.start() and Microphone.start() turned that into the generic "the interface claim was refused" message, with advice about classes=("uac",) that doesn't apply. They now raise OSError with errno 28 and say the hub has no bus time left, and what to try: stop another stream on that hub, or pick a lower rate or fewer channels.

Checked with the fake host in tests/test_usb_host_streams.py: a new test has the claim refused with ENOSPC and checks the errno and message, and the file's 46 tests pass. Not run on a board; the firmware side that raises ENOSPC is in PyDevices/omnipython-builds#627.

A full-speed audio device behind a high-speed hub shares the hub's
transaction translator with every other periodic stream on it. When the
host refuses a stream that wouldn't fit (ENOSPC), Speaker and Microphone
now raise that errno with a message saying so, rather than the generic
claim-refused advice to start the host with classes=("uac",).
@bdbarnett
bdbarnett merged commit 99fae9f into main Nov 22, 2026
6 checks passed
@bdbarnett
bdbarnett deleted the audio-enospc-message branch November 22, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant