Talk about your MIDI interfaces, microphones, keyboards...
Moderators: khz , MattKingUSA
geoffrey
Established Member
Posts: 81 Joined: Mon Jul 30, 2018 2:08 am
Post
by geoffrey » Sun Oct 25, 2020 9:05 am
Hi all,
I've got an Allen&Heath Qu-16 mixer which has a 24x22 USB audio interface, but audio playback from Linux was intermittently crunchy (every few minutes, the audio would slowly get distorted then slowly go back to normal). It sounded like a similar problem to that discussed here:
viewtopic.php?f=6&t=21163 and I found mention of an implicit feedback endpoint in "lsusb -v":
Code: Select all
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 8
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 22
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 24
bmChannelConfig 0x80000000
iChannelNames 50
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 24
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 0x02a0 1x 672 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 2 Decoded PCM samples
wLockDelay 8
so I applied this patch:
Code: Select all
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 2850641..8e1e3ea 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -336,6 +336,7 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
switch (subs->stream->chip->usb_id) {
case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C600 */
+ case USB_ID(0x22f0, 0x0006): /* Allen&Heath Qu-16 */
ep = 0x81;
ifnum = 3;
goto add_sync_ep_from_ifnum;
and the audio seems good now to me.
Anyone else have one of these mixers (or the other similar models, Qu-24, Qu-32, Qu-SB or Qu-Pac) and can confirm the issue and this solution?
Thanks,
Geoffrey.
fraslo
Established Member
Posts: 39 Joined: Sun Jun 28, 2015 2:51 pm
Post
by fraslo » Fri Oct 30, 2020 2:35 pm
Hi,
I have a similar problem with my built in class compliant audio interface (Yamaha MODX Keyboard 10out/4in/44100): after a few minutes the audio gets distorted, the problem vanishes sometimes after a few minutes. I tried different cables, USB ports and a lot of configuration options. There are no XRUNS and when I record the output there are also no crackles.
Is there any chance that these problems are related?
Any help is appreciated, lsusb -v shows this:
Code: Select all
Bus 002 Device 008: ID 0499:172a Yamaha Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x0499 Yamaha Corp.
idProduct 0x172a
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 2
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x015d
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 4
bFunctionClass 1 Audio
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 8
wTotalLength 0x004b
bmControls 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 1
bmAttributes 3 Internal programmable clock
bmControls 0x03
Clock Frequency Control (read/write)
bAssocTerminal 0
iClockSource 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 1
bNrChannels 4
bmChannelConfig 0x00000000
iChannelNames 16
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bSourceID 2
bCSourceID 1
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bCSourceID 1
bNrChannels 10
bmChannelConfig 0x00000000
iChannelNames 48
bmControls 0x0000
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 5
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 4
bCSourceID 1
bmControls 0x0000
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 2
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 4
bmChannelConfig 0x00000000
iChannelNames 16
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 3
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x004e 1x 78 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 0 Undefined
wLockDelay 0x0000
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 5
bmControls 0x00
bFormatType 1
bmFormats 0x00000001
PCM
bNrChannels 10
bmChannelConfig 0x00000000
iChannelNames 48
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 3
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 37
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Implicit feedback Data
wMaxPacketSize 0x00c3 1x 195 bytes
bInterval 1
AudioStreaming Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 0 Undefined
wLockDelay 0x0000
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 3 MIDI Streaming
bInterfaceProtocol 0
iInterface 0
MIDIStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 0x0081
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 2 External
bJackID 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 2 External
bJackID 2
iJack 0
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 2 External
bJackID 3
iJack 0
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 33
iJack 0
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 34
iJack 0
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
bJackID 35
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 2 External
bJackID 65
bNrInputPins 1
baSourceID( 0) 33
BaSourcePin( 0) 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 2 External
bJackID 66
bNrInputPins 1
baSourceID( 0) 34
BaSourcePin( 0) 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 2 External
bJackID 67
bNrInputPins 1
baSourceID( 0) 35
BaSourcePin( 0) 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 97
bNrInputPins 1
baSourceID( 0) 1
BaSourcePin( 0) 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 98
bNrInputPins 1
baSourceID( 0) 2
BaSourcePin( 0) 1
iJack 0
MIDIStreaming Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 99
bNrInputPins 1
baSourceID( 0) 3
BaSourcePin( 0) 1
iJack 0
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 3
baAssocJackID( 0) 33
baAssocJackID( 1) 34
baAssocJackID( 2) 35
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 3
baAssocJackID( 0) 97
baAssocJackID( 1) 98
baAssocJackID( 2) 99
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0122
bNumInterfaces 5
bConfigurationValue 2
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 1
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 0a 24 01 00 01 34 00 02 01 02
** UNRECOGNIZED: 0c 24 02 01 01 01 00 02 03 00 00 00
** UNRECOGNIZED: 09 24 03 02 01 03 00 01 00
** UNRECOGNIZED: 0c 24 02 03 03 06 00 02 03 00 00 00
** UNRECOGNIZED: 09 24 03 04 01 01 00 03 00
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 07 24 01 01 01 01 00
** UNRECOGNIZED: 0b 24 02 01 04 03 18 01 44 ac 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x004e 1x 78 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 07 24 01 04 01 01 00
** UNRECOGNIZED: 0b 24 02 01 0a 03 18 01 44 ac 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x00c3 1x 195 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 3
bInterfaceProtocol 255
iInterface 0
** UNRECOGNIZED: 07 24 01 00 01 42 00
** UNRECOGNIZED: 06 24 02 02 01 00
** UNRECOGNIZED: 06 24 02 02 02 00
** UNRECOGNIZED: 06 24 02 02 03 00
** UNRECOGNIZED: 09 24 03 02 01 01 01 01 00
** UNRECOGNIZED: 09 24 03 02 02 01 01 01 00
** UNRECOGNIZED: 09 24 03 02 03 01 01 01 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
** UNRECOGNIZED: 07 24 01 00 01 24 00
** UNRECOGNIZED: 06 24 02 02 01 00
** UNRECOGNIZED: 09 24 03 02 01 01 01 01 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 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 0x0200 1x 512 bytes
bInterval 0
geoffrey
Established Member
Posts: 81 Joined: Mon Jul 30, 2018 2:08 am
Post
by geoffrey » Sun Nov 01, 2020 2:00 pm
fraslo wrote: ↑ Fri Oct 30, 2020 2:35 pm
Hi,
I have a similar problem with my built in class compliant audio interface (Yamaha MODX Keyboard 10out/4in/44100): after a few minutes the audio gets distorted, the problem vanishes sometimes after a few minutes. I tried different cables, USB ports and a lot of configuration options. There are no XRUNS and when I record the output there are also no crackles.
Is there any chance that these problems are related?
Hi Frasio,
I'm no expert, but it sounds like the same thing to me. Try applying this patch to pcm.c and let me know if it works for you:
Code: Select all
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 28506415c7ad..91afc3dd7b99 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -345,6 +345,7 @@ static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs,
ifnum = 2;
goto add_sync_ep_from_ifnum;
case USB_ID(0x2466, 0x8003): /* Fractal Audio Axe-Fx II */
+ case USB_ID(0x0499, 0x172a): /* Yamaha MODX */
ep = 0x86;
ifnum = 2;
goto add_sync_ep_from_ifnum;
Regards,
Geoffrey.
fraslo
Established Member
Posts: 39 Joined: Sun Jun 28, 2015 2:51 pm
Post
by fraslo » Sun Nov 01, 2020 3:49 pm
Hi Geoffrey,
thank you so much for looking into my problem. I didn't compile a kernel for the last 15 years or so. I hope it is all right to add just the last four lines at the correct position. Compiling right now.
Thanks again
bluebell
Established Member
Posts: 1464 Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland & Frankfurt, Germany
Post
by bluebell » Sun Nov 01, 2020 9:03 pm
fraslo wrote: ↑ Sun Nov 01, 2020 3:49 pm
Hi Geoffrey,
thank you so much for looking into my problem. I didn't compile a kernel for the last 15 years or so. I hope it is all right to add just the last four lines at the correct position. Compiling right now.
Thanks again
Only the one line with + at the beginning is enough.
fraslo
Established Member
Posts: 39 Joined: Sun Jun 28, 2015 2:51 pm
Post
by fraslo » Mon Nov 02, 2020 3:47 pm
Hi Geoffrey and bluebell,
It works! I stressed my system for several hours and the problem did not occur. Without the patch there was this crackling after a few minutes by simply listening to an audio stream. I was able to record all 10 analog channels for over 20 minutes without any problems. No crackling, distortion or XRUNs (44100/256/2).
Is it possible to add this patch into the Linux kernel? How should I proceed?
Thanks so much for all of your help, I can't tell how relieved I am that the audio interface works properly now.
Frank
geoffrey
Established Member
Posts: 81 Joined: Mon Jul 30, 2018 2:08 am
Post
by geoffrey » Tue Nov 03, 2020 1:48 am
fraslo wrote: ↑ Mon Nov 02, 2020 3:47 pm
Hi Geoffrey and bluebell,
It works! I stressed my system for several hours and the problem did not occur. Without the patch there was this crackling after a few minutes by simply listening to an audio stream. I was able to record all 10 analog channels for over 20 minutes without any problems. No crackling, distortion or XRUNs (44100/256/2).
Is it possible to add this patch into the Linux kernel? How should I proceed?
Thanks so much for all of your help, I can't tell how relieved I am that the audio interface works properly now.
Frank
Hi Frank,
That's great news! I've sent you a private message about getting the patch into the kernel.
Regards,
Geoffrey.
geoffrey
Established Member
Posts: 81 Joined: Mon Jul 30, 2018 2:08 am
Post
by geoffrey » Wed Nov 11, 2020 3:08 pm
FYI all, I submitted the Qu-16 and MODX patches above and they are now in the Linux kernel since 5.10-rc3, 5.9.7, 5.4.76, and 4.19.156.