Skip to content

Correct the per-platform driver-binding comments; document upstream submission and the Windows dongle path - #4

Merged
alphonsom merged 3 commits into
mainfrom
libusb-backend
Aug 11, 2026
Merged

Correct the per-platform driver-binding comments; document upstream submission and the Windows dongle path#4
alphonsom merged 3 commits into
mainfrom
libusb-backend

Conversation

@alphonsom

Copy link
Copy Markdown
Owner

Three small things, all verified against hardware.

Correct the per-platform driver-binding comments

Tested with the Command|8 connected directly and snd-usb-audio actually loaded, which had not been true before. The module binds both interfaces and creates a card; the ports it exposes are output-only:

1-2:1.0 driver=snd-usb-audio
1-2:1.1 driver=snd-usb-audio
2 [Command8]: USB-Audio - Command8
O hw:2,0,0 Command8 MIDI 1
O hw:2,0,1 Command8 MIDI 2
O hw:2,0,2 Command8 MIDI 3

That is exactly what quirk/ has always said. The merge commit on this branch claimed instead that snd-usb-audio binds neither interface and that nothing claims the device on any platform — measured on a machine where the module simply was not loaded, and wrong. Its message cannot be corrected without rewriting pushed history, so the correction lives in the code comments.

The practical consequence is that libusb_set_auto_detach_kernel_driver does real work on Linux rather than being a no-op. Verified end to end: UsbSurface opens with snd-usb-audio bound, and the kernel driver is reattached on release.

Document upstream submission

quirk/UPSTREAM.md — the tree to base on (tiwai/sound.gitfor-next), git commit -s, checkpatch, get_maintainer.pl, git send-email inline, plus a ready-to-use commit message built from the measured evidence. It also pre-empts the question a reviewer will ask: why 3 in-cables when only two Embedded MIDI OUT jacks are declared.

Document the dongle as a Windows option

Windows no longer requires Avid's driver — command8-dongle makes the surface class-compliant. Also spells out the exclusive-access trap, which gives no useful error: a DAW holding the ports stops the engine opening the device, and a DAW sending the surface generic MIDI just twitches the faders and leaves the display Offline.

Builds clean, all three tests pass.

alphonsomand others added 3 commits August 9, 2026 14:42
Tested with the Command|8 connected directly and snd-usb-audio actually
loaded, which had not been true before. The module binds BOTH interfaces and
creates a card; the three ports it exposes are output-only:
1-2:1.0 driver=snd-usb-audio
1-2:1.1 driver=snd-usb-audio
2 [Command8]: USB-Audio - Command8
O hw:2,0,0 Command8 MIDI 1
O hw:2,0,1 Command8 MIDI 2
O hw:2,0,2 Command8 MIDI 3
That is exactly what quirk/ has always said: the parser creates no input port.
The merge commit dd45b0c..3727597 claimed instead that snd-usb-audio binds
neither interface and that nothing claims the device on any platform. That was
measured on a machine where the module was simply not loaded, and is wrong.
Its message cannot be corrected without rewriting pushed history, so the
correction lives here and in the comments the code actually carries.
The practical consequence is that libusb_set_auto_detach_kernel_driver is doing
real work on Linux rather than being the no-op the old comment described. Now
verified end to end: UsbSurface opens with snd-usb-audio bound, and the kernel
driver is reattached when the interface is released.
macOS and Windows are unchanged -- they reject the MIDIStreaming interface
outright and expose nothing, so there is nothing to detach there. That is still
what removes the biggest risk from the macOS plan, just for a narrower reason
than previously stated.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The patch here is a plain diff; the kernel wants a git commit with a
Signed-off-by, based on tiwai/sound.git for-next, sent inline by
git send-email. Write that procedure down rather than rediscovering it.
Includes a ready-to-use commit message built from what we measured: the
amidi -l output showing output-only ports, the corrected diagnosis
(bNumEmbMIDIJack claims three jacks where two exist, so the count is the
field in error rather than bLength), and the wTotalLength inconsistency.
It also pre-empts the one question a reviewer will reasonably ask -- why
three in-cables when only two Embedded MIDI OUT jacks are declared. The
answer is that the descriptors are internally inconsistent and contradict
observed behaviour, so they are not a usable basis for anything, which is
what justifies the fixed-endpoint quirk over a narrower fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brings in the macOS work and meter ballistics merged via PRs #1-#3. Clean
merge, no conflicts; builds with no warnings and all three tests pass.
README: Windows no longer requires Digidesign/Avid's driver. The dongle makes
the surface enumerate as an ordinary class-compliant USB-MIDI device with no
driver at all, and the ports look the same to this engine either way.
Also spells out the exclusive-access trap, which is easy to hit and gives no
useful error: a DAW holding the Command|8 ports stops the engine opening the
device. The DAW talks to the engine over OSC or the MCU loopback pair, never
to the surface directly -- the Command|8 speaks a proprietary protocol, so a
DAW sending it generic MIDI just twitches the faders and leaves the display
Offline, which is exactly what a first Windows attempt looks like.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@alphonsom
alphonsom merged commit a0fc22f into mainAug 11, 2026
4 checks passed
Sign up for freeto 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

@alphonsom