Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] MIDI Service does not enumerate MIDI 1.0 devices when plugged in or changed driver after service startup. #483

Open
m-komo opened this issue Jan 10, 2025 · 13 comments
Assignees
Labels
area-transports 🚌 General transports like USB, BLE, Network, etc. bug 🐞 Something isn't working

Comments

@m-komo
Copy link
Collaborator

m-komo commented Jan 10, 2025

Describe the bug
If I attach the Roland UM-ONE which is set to the vendor mode, MidiSrv does not enumerate it.
To enumerate, restarting MidiSrv is necessary.

To Reproduce

  1. Set the TAB-COMP switch on UM-ONE to [COMP] (vendor mode).
  2. Attache UM-ONE to PC.
  3. Run 'midi.exe enum ep'.

UM-ONE does not show up.

Expected behavior
It shows up.

Installer Name or Version

  • Windows.MIDI.Services.In-Box.Service.1.0.2-preview-8.241219-1336-x64.exe

Desktop (please complete the following information):

  • OS: Windows 11 24H2 build 26120.2705 (Insider Dev channel)

Device information, if this is with an external MIDI device:

Additional context
If UM-ONE is running with the in-box USB MIDI 1.0 driver (USBAUDIO.sys), the MidiSrv enumerates it.

@m-komo m-komo added the bug 🐞 Something isn't working label Jan 10, 2025
@Psychlist1972
Copy link
Contributor

I'm wondering if this is related to the Windows bug with the old MIDI 1 driver, where it doesn't release property. The way to test it would be:

  1. Put the UM-ONE in class-compliant mode
  2. Plug into Windows and verify it enumerates.
  3. Unplug the device and put it into COMP mode
  4. Without plugging it back in, reboot Windows
  5. After reboot, plug in the UM-ONE
  6. If the UM-ONE enumerates, then this is likely related to the old driver, which is fixed in upcoming Windows builds, not a midisrv issue.

@m-komo m-komo changed the title [BUG] UM-ONE running with the vendor driver is not enumerated by MidiSrv. [BUG] MIDI Service does not enumerate MIDI 1.0 devices. Jan 15, 2025
@m-komo
Copy link
Collaborator Author

m-komo commented Jan 15, 2025

@Psychlist1972

The issue was reproducible not only with UM-ONE TAB mode (w/vendor driver) but also any USB MIDI 1.0 devices working with the USBAUDIO.sys.

Steps to reproduce

  1. Detach any USB MIDI 1.0 devices and reboot Windows.
  2. After reboot, open terminal and run 'midi service status' to ensure the MidiSrv is running.
  3. Attach the UM-ONE and run 'midi enum ep'.

No endpoints found.

  1. Keep connecting the UM-ONE and restart MidiSrv. Then run 'midi enum ep' again.

Endpoint for UM-ONE found.

Installer Name or Version

  • Windows.MIDI.Services.In-Box.Service.1.0.2-preview-9.250112-2036-x64.exe (DP9 NAMM Preview 2)

Desktop

OS: Windows 11 24H2 build 26120.2705 (Insider Dev channel)

@Psychlist1972
Copy link
Contributor

@Psychlist1972

The issue was reproducible not only with UM-ONE TAB mode (w/vendor driver) but also any USB MIDI 1.0 devices working with the USBAUDIO.sys.

Steps to reproduce

  1. Detach any USB MIDI 1.0 devices and reboot Windows.
  2. After reboot, open terminal and run 'midi service status' to ensure the MidiSrv is running.
  3. Attach the UM-ONE and run 'midi enum ep'.

No endpoints found.

  1. Keep connecting the UM-ONE and restart MidiSrv. Then run 'midi enum ep' again.

Endpoint for UM-ONE found.

Installer Name or Version

  • Windows.MIDI.Services.In-Box.Service.1.0.2-preview-9.250112-2036-x64.exe (DP9 NAMM Preview 2)

Desktop

OS: Windows 11 24H2 build 26120.2705 (Insider Dev channel)

Thanks. I will look into this.

@Psychlist1972 Psychlist1972 added the area-transports 🚌 General transports like USB, BLE, Network, etc. label Jan 15, 2025
@Psychlist1972
Copy link
Contributor

Psychlist1972 commented Jan 19, 2025

Further data

Just plugged in a MIDI 1.0 device (Korg nanoKONTROL 2 using our in-box driver) after the service had started, and it would not enumerate. There's a regression here I need to fix that seems broader than just when devices change drivers.

midiksinfo shows the device, so this is likely a problem in the transport, not the USB stack

Image

@Psychlist1972 Psychlist1972 changed the title [BUG] MIDI Service does not enumerate MIDI 1.0 devices. [BUG] MIDI Service does not enumerate MIDI 1.0 devices when plugged in or changed driver after service startup. Jan 19, 2025
@Psychlist1972
Copy link
Contributor

This should be fixed for the next DP9 NAMM preview, likely to be released tonight.

@Psychlist1972 Psychlist1972 added the dp9-fixed Fixed in developer preview 9 label Jan 19, 2025
@Psychlist1972
Copy link
Contributor

Please re-test with DP9-NAMM-3
https://github.com/microsoft/MIDI/releases/tag/dev-preview-9-namm-3

@sat-okada
Copy link
Collaborator

I tested with DP9-NAMM-3 and the result did not improve.
Using midiksinfo before restarting MidiSrv I could see the device information, but not in enum.

midiksinfo

Image

midi enum ep
Image

Desktop
OS: Windows 11 Pro Insider Preview Build 27774.rs_prerelease.250111-1221

MIDI device: Roland UM-ONE mk2 (TAB mode, working with the USBAUDIO.sys)

@sat-okada
Copy link
Collaborator

Sorry, I had not updated wdmaud2.drv.
After update, the results improved.

@m-komo
Copy link
Collaborator Author

m-komo commented Jan 22, 2025

@Psychlist1972
I re-tested with DP9-NAMM-4.
But the issue persists.

@Psychlist1972 Psychlist1972 removed the dp9-fixed Fixed in developer preview 9 label Feb 3, 2025
@Psychlist1972
Copy link
Contributor

This bug is still present in Customer Preview 1 (Canary). Looking into it.

@Psychlist1972
Copy link
Contributor

Further data

Just plugged in a MIDI 1.0 device (Korg nanoKONTROL 2 using our in-box driver) after the service had started, and it would not enumerate. There's a regression here I need to fix that seems broader than just when devices change drivers.

midiksinfo shows the device, so this is likely a problem in the transport, not the USB stack

Image

Quick update on that one: The Korg devices like that one end up enumerating under the new MIDI 2 class driver.

@Psychlist1972
Copy link
Contributor

Psychlist1972 commented Feb 9, 2025

After the latest set of fixes I put in over the weekend to handle function blocks and some device naming stuff, I can no longer reproduce this behavior with any of the MIDI 1.0 devices (including UM-ONE) that I have been testing with, when connecting and disconnecting.

I was able to still repro it when moving a device from the MIDI 1 driver to the MIDI 2 driver, so testing that now.

@Psychlist1972
Copy link
Contributor

Psychlist1972 commented Feb 10, 2025

From testing, I see why this is happening when you change the assigned driver.

It comes through as a Device Information Update, rather than as an add/remove. I'll need to experiment a bit more to see exactly which properties end up updated.

Edit: Well, except any further changes, which come through as add/update. It may be that we have to tell the customer to unplug/replug the device after they change which driver it is assigned to. I'm debugging further and looking into options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-transports 🚌 General transports like USB, BLE, Network, etc. bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants