Bug 212477 - EDIROL UA-101: midi is not recognized
Summary: EDIROL UA-101: midi is not recognized
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-29 14:52 UTC by Nicola Lunghi
Modified: 2021-06-14 01:55 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.12-rc4, 5.11, 5.10, 5.9., 5.8
Tree: Mainline
Regression: No


Attachments
Test patch (1.70 KB, patch)
2021-04-07 10:41 UTC, Takashi Iwai
Details | Diff

Description Nicola Lunghi 2021-03-29 14:52:02 UTC
On kernel 5.12-rc4 using the edirol ua-101 the interface is correctly recognized but no midi port is instantiated.

If you provide me with guidance I can help debug this issue.
Probably also affect other edirol/roland interfaces.

This was a bug introduced I think at least from kernel 5.8 -> before that the midi was working (I don't remeber exactly on what kernel this happened).
Comment 1 Nicola Lunghi 2021-03-29 15:12:36 UTC
# uname -r
5.12.0-051200rc4-lowlatency

on device connection

[  652.570714] usb 3-2: new high-speed USB device number 5 using xhci_hcd
[  652.701266] usb 3-2: New USB device found, idVendor=0582, idProduct=007d, bcdDevice= 1.03
[  652.701276] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  652.701279] usb 3-2: Product: UA-101
[  652.701281] usb 3-2: Manufacturer: EDIROL
[  652.701283] usb 3-2: SerialNumber: ZV48296
[  653.319951] mc: Linux media interface: v0.10
[  653.352363] usbcore: registered new interface driver snd-usb-audio
[  653.355980] usbcore: registered new interface driver snd-ua101


#lsusb -vd 0582:007d

Bus 003 Device 005: ID 0582:007d Roland Corp. EDIROL UA-101
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol       255 
  bMaxPacketSize0        64
  idVendor           0x0582 Roland Corp.
  idProduct          0x007d EDIROL UA-101
  bcdDevice            1.03
  iManufacturer           1 EDIROL
  iProduct                2 UA-101
  iSerial                 3 ZV48296
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x009b
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 01 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 0a 04 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0118  1x 280 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 07 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 0c 04 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0150  1x 336 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      3 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      3 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered

# usb-devices

T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0582 ProdID=007d Rev=01.03
S:  Manufacturer=EDIROL
S:  Product=UA-101
S:  SerialNumber=ZV48296
C:  #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=0mA
I:  If#=0x0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=01 Prot=02 Driver=snd-usb-audio
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=01 Prot=02 Driver=snd-usb-audio
I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=(none)

lsmod|grep snd
snd_ua101              24576  0
snd_usb_audio         294912  1
snd_usbmidi_lib        36864  2 snd_usb_audio,snd_ua101
mc                     57344  1 snd_usb_audio
snd_hda_codec_realtek   139264  1
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_codec_hdmi     65536  2
snd_hda_intel          53248  5
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         147456  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           94208  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               118784  6 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_ua101,snd_hda_core
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq                73728  2 snd_seq_midi,snd_seq_midi_event
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              40960  2 snd_seq,snd_pcm
snd                    94208  26 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_ua101,snd_timer,snd_pcm,snd_rawmidi
snd_rn_pci_acp3x       20480  0
snd_pci_acp3x          20480  0
soundcore              16384  1 snd
Comment 2 Lucas Endres 2021-04-01 06:34:47 UTC
I hadn't realized it was working previously as I use my other Edirol UA-4FX most of the time, but I do remember the UA-101's MIDI not working for me when I tried using it too.  Sure, enough, that's the case on debian's 5.9.0-1-rt-amd64 kernel now:

aconnect -l | grep -i ua
client 28: 'UA-4FX' [type=kernel,card=3]
    0 'UA-4FX MIDI 1   '

I would've thought the two Edirol devices would use the same MIDI kernel module (snd_seq_midi and/or snd_usbmidi_lib)

lsmod | grep -i snd
snd_seq_dummy          16384  0
snd_ua101              28672  0
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_seq                90112  4 snd_seq_midi,snd_seq_midi_event,snd_seq_dummy
snd_usb_audio         319488  3
snd_usbmidi_lib        40960  2 snd_usb_audio,snd_ua101
snd_rawmidi            45056  2 snd_seq_midi,snd_usbmidi_lib
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
mc                     61440  1 snd_usb_audio
snd_hda_codec_realtek   139264  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_codec_hdmi     73728  1
snd_hda_intel          57344  4
snd_intel_dspcfg       24576  1 snd_hda_intel
snd_hda_codec         163840  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          106496  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               135168  7 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_ua101,snd_hda_core
snd_hrtimer            16384  1
snd_timer              45056  4 snd_seq,snd_hrtimer,snd_pcm
snd                   110592  27 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_ua101,snd_timer,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
usbcore               323584  10 xhci_hcd,ehci_pci,snd_usb_audio,usbhid,snd_usbmidi_lib,snd_ua101,usb_storage,ehci_hcd,xhci_pci,uas


lsusb -vvv
Bus 004 Device 003: ID 0582:007d Roland Corp. EDIROL UA-101
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol       255 
  bMaxPacketSize0        64
  idVendor           0x0582 Roland Corp.
  idProduct          0x007d EDIROL UA-101
  bcdDevice            1.03
  iManufacturer           1 EDIROL
  iProduct                2 UA-101
  iSerial                 3 AX85615
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x009b
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 01 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 0a 04 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0118  1x 280 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 07 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 0c 04 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0150  1x 336 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      3 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      3 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1

Bus 002 Device 004: ID 0582:00a3 Roland Corp. EDIROL UA-4FX
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol       255 
  bMaxPacketSize0         8
  idVendor           0x0582 Roland Corp.
  idProduct          0x00a3 EDIROL UA-4FX
  bcdDevice            1.00
  iManufacturer           1 EDIROL
  iProduct                2 UA-4FX
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x00ca
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              360mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      2 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 01 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 03 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0140  1x 320 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      2 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 02 00 01 20
      ** UNRECOGNIZED:  0b 24 02 03 02 03 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0138  1x 312 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      1 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2 
      bInterfaceProtocol      1 
      iInterface              0 
      ** UNRECOGNIZED:  07 24 01 07 00 01 00
      ** UNRECOGNIZED:  0b 24 02 01 02 03 18 01 80 bb 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0140  1x 320 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  06 24 f1 02 01 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      3 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1

I, too, would be glad to help however possible, but don't know where to begin.
I have the source for the latest mainline kernel (5.11.9), so I'd be happy to test proposed patches.
Comment 3 Takashi Iwai 2021-04-01 17:04:22 UTC
Could you once try to blacklist snd-usb-audio and let only snd-ua101 binding?
Comment 4 Nicola Lunghi 2021-04-01 22:09:21 UTC
(In reply to Takashi Iwai from comment #3)
> Could you once try to blacklist snd-usb-audio and let only snd-ua101 binding?

Hi,
I tried blacklisting snd-usb-audio and it works!!!
can they work together or I need to leave it blacklisted?
I have also another usb interface (dell soundbar) that probably need the other driver

Thanks in any case!

Nicola
Comment 5 Lucas Endres 2021-04-01 22:35:17 UTC
I was about to report the same thing.  Your intuition was spot on!  I also wouldn't want it blacklisted for other devices that use it, in fact I think it's the reason I'm not seeing my UA-4FX, at the moment, in these commands.

aconnect -l | grep -i ua
client 24: 'UA-101' [type=kernel,card=2]
    0 'UA-101 MIDI 1   '


lsmod | grep snd
snd_seq_dummy          16384  0
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_ua101              28672  1
snd_usbmidi_lib        40960  1 snd_ua101
snd_rawmidi            45056  2 snd_seq_midi,snd_usbmidi_lib
snd_seq                86016  4 snd_seq_midi,snd_seq_midi_event,snd_seq_dummy
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_hda_codec_realtek   143360  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     73728  1
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          57344  4
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_hda_codec         172032  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          110592  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               131072  6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_ua101,snd_hda_core
snd_hrtimer            16384  1
snd_timer              49152  4 snd_seq,snd_hrtimer,snd_pcm
snd                   110592  22 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_ua101,snd_timer,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
usbcore               319488  9 xhci_hcd,ehci_pci,usbhid,snd_usbmidi_lib,snd_ua101,usb_storage,ehci_hcd,xhci_pci,uas
Comment 6 Nicola Lunghi 2021-04-01 23:27:09 UTC
added this to 

/etc/modprobe.d/ua101.conf

alias usb:v0582p008Dd*dc*dsc*dp*ic*isc*ip*in* snd_ua101
alias usb:v0582p007Dd*dc*dsc*dp*ic*isc*ip*in* snd_ua101
alias usb:v0582p0044d*dc*dsc*dp*ic*isc*ip*in* snd_ua101

run depmod -a

and it works without blacklist.
Comment 7 Lucas Endres 2021-04-02 02:45:14 UTC
(In reply to Nicola Lunghi from comment #6)
> added this to 
> 
> /etc/modprobe.d/ua101.conf
> 
> alias usb:v0582p008Dd*dc*dsc*dp*ic*isc*ip*in* snd_ua101
> alias usb:v0582p007Dd*dc*dsc*dp*ic*isc*ip*in* snd_ua101
> alias usb:v0582p0044d*dc*dsc*dp*ic*isc*ip*in* snd_ua101
> 
> run depmod -a
> 
> and it works without blacklist.

Did you have anything else in /etc/modprobe.d/ua101.conf because those lines don't seem necessary to me?  They are aliases already built-in to the snd_ua101 module, visible via "modinfo snd_ua101", without adding the lines.  It could just be over my head, though, as I never have thought about aliasing kernel modules.

Anyway, I disabled the blacklist, created /etc/modprobe.d/snd_ua101.conf with only your lines (along with my usual "#blah...blah" comment line describing the content's origin), ran "depmod -a", and rebooted.  After the reboot, I didn't see the UA-101's MIDI port.

Thanks, and sorry if it should be obvious to me,

  Lucas
Comment 8 Takashi Iwai 2021-04-07 10:40:00 UTC
Does the patch below help?
Comment 9 Takashi Iwai 2021-04-07 10:41:02 UTC
Created attachment 296267 [details]
Test patch
Comment 10 Nicola Lunghi 2021-04-07 17:48:34 UTC
Hi THanks I am not at home today I will check the patch tomorrow and let you know
Comment 11 Lucas Endres 2021-04-08 07:21:28 UTC
(In reply to Takashi Iwai from comment #9)
> Created attachment 296267 [details]
> Test patch

Testing working perfectly for me!  I have the MIDI port, as you can see, with both devices coexisting.  I recorded and played some tests through it with success too:
aconnect -l | grep -i ua
client 28: 'UA-4FX' [type=kernel,card=3]
    0 'UA-4FX MIDI 1   '
client 36: 'UA-101' [type=kernel,card=5]
    0 'UA-101 MIDI 1   '

arecordmidi -p 36:0 ./file.mid

aplaymidi -p 36:0 ./file.mid


I also hooked up a single microphone, recorded a mono test file (using "plughw:" for "-c 1" mono), and played it back through it:
arecord -D plughw:UA101 -f S32_LE -r 48000 -c 1 ./file.wav
Recording WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono
^CAborted by signal Interrupt...

aplay -D plughw:UA101 -f S32_LE -r 48000 -c 1 ./file.wav
Playing WAVE './file.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono

I didn't hear any difference, so I think it's perfect!  I don't have a UA-1000 to test, though.

I tried to save time by testing two kernel patches at once, and noticed a likely possible issue with the other affecting the use of "full speed" mode on the UA-101.  "High speed" mode is working great, either way, as that's what I've shown here.

Thanks very much Takashi!
Comment 12 Takashi Iwai 2021-04-08 08:02:15 UTC
Good to hear!

I submitted the patch now to the upstream:
  http://lore.kernel.org/r/20210408075656.30184-1-tiwai@suse.de

It'll be likely merged to the branch for 5.13 kernel, as 5.12 is close to the final release, and there is a workaround.
Comment 13 Lucas Endres 2021-04-08 23:06:49 UTC
(In reply to Takashi Iwai from comment #12)
> Good to hear!
> 
> I submitted the patch now to the upstream:
>   http://lore.kernel.org/r/20210408075656.30184-1-tiwai@suse.de
> 
> It'll be likely merged to the branch for 5.13 kernel, as 5.12 is close to
> the final release, and there is a workaround.

Great thanks!  I said I'd get back to you after having only this patch, so that's what I'm doing.  It does, indeed, function perfectly for USB 1.1 "full speed" mode too.  I had the same exact results as with the USB 2 "high speed" post last night.

It'll be nice to conserve USB ports next time I want to capture fancier audio while playing back MIDI.  I've since added a USB hub, though, to facilitate any circumstance.  ;)
Comment 14 Lucas Endres 2021-06-08 20:49:21 UTC
(In reply to Lucas Endres from comment #13)
> (In reply to Takashi Iwai from comment #12)
> > Good to hear!
> > 
> > I submitted the patch now to the upstream:
> >   http://lore.kernel.org/r/20210408075656.30184-1-tiwai@suse.de
> > 
> > It'll be likely merged to the branch for 5.13 kernel, as 5.12 is close to
> > the final release, and there is a workaround.
> 
> Great thanks!  I said I'd get back to you after having only this patch, so
> that's what I'm doing.  It does, indeed, function perfectly for USB 1.1
> "full speed" mode too.  I had the same exact results as with the USB 2 "high
> speed" post last night.

I'm sorry to report that I ran git bisect to narrow down the apparent firmware glitch with the UA-101 in its USB 1.1 "full speed" mode in the linux-next branch and it showed that this final commit solving the MIDI interface was related to the issue (commit d763145312582c08c4e9ed99d61276cde8488256).

I don't know how I tested it working before, with this being noticable now.  It's likely I only tested the previous version before the final commit, but doubt that should make the difference.  I have a suggestion from Alan Stern (of the USB development team) that changing the USB "communication pattern" could help, since it seems it worked on snd-usb-audio and not snd-ua101, but I really don't know which files pertain to that code.

The UA-101, only in USB 1.1 "full speed" mode, is freezing.  It can be observed by turning it on without USB connected, inputting audio visible on it's built-in "LEVEL" LEDs, connecting its USB to a computer running a post commit kernel, and finally disconnecting the audio being input.  The "LEVEL" LEDs remain on as they had been the moment USB was connected.

Here's the bug report involving the bisection, along with Alan Stern's USB debugging expertise: https://bugzilla.kernel.org/show_bug.cgi?id=212955

Thanks for everything, and sorry to dredge up problems with a patch I helped approve!
Comment 15 Lucas Endres 2021-06-14 01:55:55 UTC
I created (In reply to Lucas Endres from comment #14)
> I'm sorry to report that I ran git bisect to narrow down the apparent
> firmware glitch with the UA-101 in its USB 1.1 "full speed" mode in the
> linux-next branch and it showed that this final commit solving the MIDI
> interface was related to the issue (commit
> d763145312582c08c4e9ed99d61276cde8488256).
> 
> I don't know how I tested it working before, with this being noticable now. 
> It's likely I only tested the previous version before the final commit, but
> doubt that should make the difference.  I have a suggestion from Alan Stern
> (of the USB development team) that changing the USB "communication pattern"
> could help, since it seems it worked on snd-usb-audio and not snd-ua101, but
> I really don't know which files pertain to that code.
> 
> The UA-101, only in USB 1.1 "full speed" mode, is freezing.  It can be
> observed by turning it on without USB connected, inputting audio visible on
> it's built-in "LEVEL" LEDs, connecting its USB to a computer running a post
> commit kernel, and finally disconnecting the audio being input.  The "LEVEL"
> LEDs remain on as they had been the moment USB was connected.
> 
> Here's the bug report involving the bisection, along with Alan Stern's USB
> debugging expertise: https://bugzilla.kernel.org/show_bug.cgi?id=212955
> 
> Thanks for everything, and sorry to dredge up problems with a patch I helped
> approve!

I'm sorry for posting that here, but previously, it made sense to me as the commit solving this bug seems to have caused the new one.

Now, I've created a new bug, since it isn't the original problem:  https://bugzilla.kernel.org/show_bug.cgi?id=213425

Sorry, and thanks,

  Lucas

Note You need to log in before you can comment on or make changes to this bug.