Thread: [Alsa-user] Problem: invalid UAC_FEATURE_UNIT descriptor / fireface UCX
Brought to you by:
perex
From: Florian H. <fha...@un...> - 2012-09-24 20:21:01
|
Hi all, I have a soundcard problem which might be related to ALSA. I have been trying to connect a friend's soundcard (RME fireface UCX) to my linux computer (recent ubuntu 12.04 installation - NOT ubuntu studio, kernel 3.2.0-29-generic, ALSA version 1.0.25). RME claims that the device has a class compliance mode (which is working with a mac computer) so that it should be able to communicate with a linux system just using the USB-audio-2.0 standard. Pluging the device, I get the following messages from dmesg: [ 864.024093] usb 1-1: new high-speed USB device number 5 using ehci_hcd [ 864.162776] usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor [ 864.162831] snd-usb-audio: probe of 1-1:1.0 failed with error -5 So it seems that the device is recognized but can not be properly connected. I was searching for "invalid UAC_FEATURE_UNIT descriptor" online and found some ALSA realted websites but could not really figure out whether the stuff discussed there can solve my problem. So if this is an ALSA problem: Am I missing some extra packages, libaries, ... to be able to have full USB-audio-2.0 support ? Do I have to change some kernel options ? Any other ideas ? Thanks a lot for any help, Florian |
From: Clemens L. <cla...@go...> - 2012-09-25 08:56:33
|
Florian Hanisch wrote: > I have been trying to connect a friend's soundcard (RME fireface UCX) > to my linux computer. [...] RME claims that the device has a class > compliance mode (which is working with a mac computer) so that > it should be able to communicate with a linux system just using the > USB-audio-2.0 standard. Pluging the device, I get the following > messages from dmesg: > > [ 864.162776] usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor So much for class compliance. This is likely to be a bug in the device's descriptors. Please show the output of "lsusb -v" for this device. In any case, the driver should not abort in this case; it should work fine without the mixer controls that this descriptor failed to describe. Regards, Clemens |
From: Florian H. <fha...@un...> - 2012-09-25 22:49:20
|
Hi, thanks a lot. Quoting Clemens Ladisch <cla...@go...>: > Florian Hanisch wrote: >> I have been trying to connect a friend's soundcard (RME fireface UCX) >> to my linux computer. [...] RME claims that the device has a class >> compliance mode (which is working with a mac computer) so that >> it should be able to communicate with a linux system just using the >> USB-audio-2.0 standard. Pluging the device, I get the following >> messages from dmesg: >> >> [ 864.162776] usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor > > So much for class compliance. This is likely to be a bug in the > device's descriptors. Please show the output of "lsusb -v" for > this device. I add it at the end of my message. > > In any case, the driver should not abort in this case; it should > work fine without the mixer controls that this descriptor failed > to describe. > How can I see that the driver is working properly and how can I actually access the soundcard then ? I connected the soundcard and it is recognized (see "lsusb -v" below) but I can not find it in the system settings and also not in the JACK setup. I thought it should appear there. I also tested a very cheap/crappy usb-1.1 soundcard, this was completely recognized and could be activated in the system settings etc. I don't know whether this is important but my computer is a sort of old, maybe the usb-controllers are too old ? On my board, I have the following: 00:1d.0 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02) 00:1d.1 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02) 00:1d.2 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02) 00:1d.3 USB controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02) 00:1d.7 USB controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02) Best, Florian Here is the part of "lsusb -v" related to the fireface: Bus 001 Device 002: ID 0424:3fd9 Standard Microsystems Corp. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0424 Standard Microsystems Corp. idProduct 0x3fd9 bcdDevice 0.01 iManufacturer 1 RME iProduct 2 Fireface UCX (23455936) iSerial 3 A0A762B3C75E8C8 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 433 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA 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 85 bmControl 0x00 AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 10 (CLOCK_SOURCE) bClockID 1 bmAttributes 0x03 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 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bCSourceID 1 bNrChannels 8 bmChannelConfig 0x00000000 bmControls 0x0000 iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 17 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 5 wTerminalType 0x0201 Microphone bAssocTerminal 0 bCSourceID 1 bNrChannels 8 bmChannelConfig 0x00000000 bmControls 0x0000 iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 2 bCSourceID 1 bmControls 0x0000 iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 6 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 5 bCSourceID 1 bmControls 0x0000 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 3 bmaControls( 0) 0x0000000c Volume Control (read/write) iFeature 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 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bmControls 0x00 bFormatType 1 bmFormats 1 PCM bNrChannels 8 bmChannelConfig 0x00000000 iChannelNames 0 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 0x01 EP 1 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 AudioControl Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 17 Transfer Type Isochronous Synch Type None Usage Type Feedback wMaxPacketSize 0x0004 1x 4 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 3 bmControls 0x00 bFormatType 1 bmFormats 1 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 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 0x01 EP 1 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 AudioControl Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 17 Transfer Type Isochronous Synch Type None Usage Type Feedback wMaxPacketSize 0x0004 1x 4 bytes bInterval 4 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 6 bmControls 0x00 bFormatType 1 bmFormats 1 PCM bNrChannels 8 bmChannelConfig 0x00000000 iChannelNames 0 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 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 AudioControl Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 32 iInterface 0 AudioStreaming Interface Descriptor: bLength 16 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 6 bmControls 0x00 bFormatType 1 bmFormats 1 PCM bNrChannels 2 bmChannelConfig 0x00000003 Front Left (FL) Front Right (FR) iChannelNames 0 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 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 1 AudioControl Endpoint Descriptor: bLength 8 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x00 bmControls 0x00 bLockDelayUnits 0 Undefined wLockDelay 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 1 Audio bInterfaceSubClass 3 MIDI Streaming bInterfaceProtocol 0 iInterface 2 Fireface UCX (23455936) MIDIStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 97 MIDIStreaming Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (MIDI_OUT_JACK) bJackType 1 Embedded bJackID 3 bNrInputPins 1 baSourceID( 0) 2 BaSourcePin( 0) 1 iJack 4 Port 1 MIDIStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (MIDI_IN_JACK) bJackType 2 External bJackID 2 iJack 4 Port 1 MIDIStreaming Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (MIDI_OUT_JACK) bJackType 1 Embedded bJackID 7 bNrInputPins 1 baSourceID( 0) 6 BaSourcePin( 0) 1 iJack 5 Port 2 MIDIStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (MIDI_IN_JACK) bJackType 2 External bJackID 6 iJack 5 Port 2 MIDIStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (MIDI_IN_JACK) bJackType 1 Embedded bJackID 1 iJack 4 Port 1 MIDIStreaming Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (MIDI_OUT_JACK) bJackType 2 External bJackID 4 bNrInputPins 1 baSourceID( 0) 1 BaSourcePin( 0) 1 iJack 4 Port 1 MIDIStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (MIDI_IN_JACK) bJackType 1 Embedded bJackID 5 iJack 5 Port 2 MIDIStreaming Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (MIDI_OUT_JACK) bJackType 2 External bJackID 8 bNrInputPins 1 baSourceID( 0) 5 BaSourcePin( 0) 1 iJack 5 Port 2 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x07 EP 7 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 6 bDescriptorType 37 bDescriptorSubtype 1 (GENERAL) bNumEmbMIDIJack 2 baAssocJackID( 0) 1 baAssocJackID( 1) 5 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x86 EP 6 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 6 bDescriptorType 37 bDescriptorSubtype 1 (GENERAL) bNumEmbMIDIJack 2 baAssocJackID( 0) 3 baAssocJackID( 1) 7 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 0 Device Status: 0xff00 (Bus Powered) |
From: Clemens L. <cla...@go...> - 2012-10-02 07:27:39
|
Florian Hanisch wrote: >>> usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor > > AudioControl Interface Descriptor: > bLength 10 > bDescriptorType 36 > bDescriptorSubtype 6 (FEATURE_UNIT) > bUnitID 2 > bSourceID 3 > bmaControls( 0) 0x0000000c > Volume Control (read/write) > iFeature 0 This descriptor is perfectly OK; the driver has a bug. The following code in parse_audio_feature_unit() in sound/usb/mixer.c is valid only for v1 devices; please try to just remove it: if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); return -EINVAL; } Regards, Clemens |
From: Matthew R. <win...@gm...> - 2012-12-17 11:17:00
|
Hi all, >>> <snip> >>> Yes, interesting this never got triggered before. The 7 should be a 6 in >>> v2 case ... Is this bug fixed upstream at this point? I am interested in using an RME Babyface with its new class-compliant mode, and this bug is mentioned by RME as the only thing standing in the way. If it is fixed upstream, would the fix be included in the 3.7 kernel? Or not until 3.8? Thanks! Matt |
From: Clemens L. <cla...@go...> - 2012-12-18 13:19:52
|
Matthew Robbetts wrote: > Is this bug fixed upstream at this point? This patch is still untested: --8<----------------------------------------------------------------->8-- ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices Commit 23caaf19b11e (ALSA: usb-mixer: Add support for Audio Class v2.0) forgot to adjust the length check for UAC 2.0 feature unit descriptors. This would make the code abort on encountering a feature unit without per-channel controls, and thus prevented the driver to work with any device having such a unit, such as the RME Fireface UCX. Reported-by: Florian Hanisch <fha...@un...> Cc: Daniel Mack <da...@ca...> Cc: 2.6.35+ <st...@vg...> Signed-off-by: Clemens Ladisch <cl...@la...> --- sound/usb/mixer.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 298070e..41e8bfb 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1259,16 +1259,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void } channels = (hdr->bLength - 7) / csize - 1; bmaControls = hdr->bmaControls; + if (hdr->bLength < 7 + csize) { + snd_printk(KERN_ERR "usbaudio: unit %u: " + "invalid UAC_FEATURE_UNIT descriptor\n", + unitid); + return -EINVAL; + } } else { struct uac2_feature_unit_descriptor *ftr = _ftr; csize = 4; channels = (hdr->bLength - 6) / 4 - 1; bmaControls = ftr->bmaControls; - } - - if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { - snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); - return -EINVAL; + if (hdr->bLength < 6 + csize) { + snd_printk(KERN_ERR "usbaudio: unit %u: " + "invalid UAC_FEATURE_UNIT descriptor\n", + unitid); + return -EINVAL; + } } /* parse the source unit */ |
From: Matthew R. <win...@gm...> - 2012-12-18 13:58:27
|
On 18 December 2012 13:19, Clemens Ladisch <cla...@go...> wrote: > Matthew Robbetts wrote: >> Is this bug fixed upstream at this point? > > This patch is still untested: Ah, fantastic, there's a patch. Well, I have a babyface winging its way to me (though, no UCXes...) so if it doesn't get tested before then, I'll give it a whirl. |
From: Michael B. <si...@si...> - 2013-01-11 15:10:06
|
Clemens Ladisch <cladisch <at> googlemail.com> writes: > > Matthew Robbetts wrote: > > Is this bug fixed upstream at this point? > > This patch is still untested: > > --8<----------------------------------------------------------------->8-- > ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices > > Commit 23caaf19b11e (ALSA: usb-mixer: Add support for Audio Class v2.0) > forgot to adjust the length check for UAC 2.0 feature unit descriptors. > This would make the code abort on encountering a feature unit without > per-channel controls, and thus prevented the driver to work with any > device having such a unit, such as the RME Fireface UCX. > > Reported-by: Florian Hanisch <fhanisch <at> uni-potsdam.de> > Cc: Daniel Mack <daniel <at> caiaq.de> > Cc: 2.6.35+ <stable <at> vger.kernel.org> > Signed-off-by: Clemens Ladisch <clemens <at> ladisch.de> > --- Hi Clemens, I can confirm that this patch works for the RME Babyface. The Babyface has two alternate settings (2in/2out or 10in/12out). Is ALSA capable to switch between them? Best regards, Michael |
From: Florian H. <fha...@un...> - 2012-09-27 23:06:00
|
Hi, I found some discussions online (http://www.xcore.com/forum/viewtopic.php?f=8&t=1719) which suggest that it might be useful to disable the mixer, though this post relates to a different sound card/slightly different problem. But it would also fit to the last sentence of your answer. In the post quoted above, the mixer is disabled by modifying the source code and recompiling afterwards. I am not very familiar with the details of alsa, so I would like to ask whether this is the only way to do this or whether there is some easier way to get there ? Thanks, Florian Quoting Clemens Ladisch <cla...@go...>: > Florian Hanisch wrote: >> I have been trying to connect a friend's soundcard (RME fireface UCX) >> to my linux computer. [...] RME claims that the device has a class >> compliance mode (which is working with a mac computer) so that >> it should be able to communicate with a linux system just using the >> USB-audio-2.0 standard. Pluging the device, I get the following >> messages from dmesg: >> >> [ 864.162776] usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor > > So much for class compliance. This is likely to be a bug in the > device's descriptors. Please show the output of "lsusb -v" for > this device. > > In any case, the driver should not abort in this case; it should > work fine without the mixer controls that this descriptor failed > to describe. > > > Regards, > Clemens > |
From: Daniel M. <zo...@gm...> - 2012-10-02 07:55:52
|
On 02.10.2012 09:27, Clemens Ladisch wrote: > Florian Hanisch wrote: >>>> usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor >> >> AudioControl Interface Descriptor: >> bLength 10 >> bDescriptorType 36 >> bDescriptorSubtype 6 (FEATURE_UNIT) >> bUnitID 2 >> bSourceID 3 >> bmaControls( 0) 0x0000000c >> Volume Control (read/write) >> iFeature 0 > > This descriptor is perfectly OK; the driver has a bug. > The following code in parse_audio_feature_unit() in sound/usb/mixer.c > is valid only for v1 devices; please try to just remove it: > > if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { > snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); > return -EINVAL; > } Yes, interesting this never got triggered before. The 7 should be a 6 in v2 case ... |
From: Florian H. <fha...@un...> - 2012-10-05 00:39:55
|
Hi, thanks for the information. I just commented the following part of mixer.c if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); return -EINVAL; } and compiled alsa-driver, alsa-lib, alsa-tools and alsa-oss basically following the instructions here: http://alsa.opensrc.org/Quick_Install. There were warnings during the compiling process but no errors. The new driver might work, I have the following output from dmesg [ 41.064090] usb 1-2: new high-speed USB device number 5 using ehci_hcd [ 41.200270] ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x200, type = 4 [ 41.201129] ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x200, type = 4 [ 41.201230] ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x200, type = 4 and from aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: F23455936 [Fireface UCX (23455936)], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 The fireface ucx moreover appears in the system settings / sound menue. I did not test whether the device actually produces sound, I hope I can do that tomorrow. I have one more question concerning the usb-audio-2.0 standard: How many in/out channels am I able to run (on linux) ? RME claim on their website, that it is possible to use 8 in-channels on the ipad, i.e. using the class compliance mode. I am asking this question because JACK seems to have a problem with the in/out channels: 02:12:01.744 D-BUS: SetParameterValue('driver:inchannels', '1'): Parameter value type mismatch: was expecting 'i', got 'u'. (org.jackaudio.Error.InvalidArgs) The same error occurs for the outchannels and I tried the values 1,2,8 for the nummer of channels but I always get the same error. Best, Florian Quoting Daniel Mack <zo...@gm...>: > On 02.10.2012 09:27, Clemens Ladisch wrote: >> Florian Hanisch wrote: >>>>> usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor >>> >>> AudioControl Interface Descriptor: >>> bLength 10 >>> bDescriptorType 36 >>> bDescriptorSubtype 6 (FEATURE_UNIT) >>> bUnitID 2 >>> bSourceID 3 >>> bmaControls( 0) 0x0000000c >>> Volume Control (read/write) >>> iFeature 0 >> >> This descriptor is perfectly OK; the driver has a bug. >> The following code in parse_audio_feature_unit() in sound/usb/mixer.c >> is valid only for v1 devices; please try to just remove it: >> >> if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { >> snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT >> descriptor\n", unitid); >> return -EINVAL; >> } > > Yes, interesting this never got triggered before. The 7 should be a 6 in > v2 case ... > > > |
From: Clemens L. <cla...@go...> - 2012-10-05 07:03:18
|
Florian Hanisch wrote: > I have one more question concerning the usb-audio-2.0 standard: > How many in/out channels am I able to run (on linux) ? All of them. > I am asking this question because JACK seems to have a problem with the in/out channels: > > 02:12:01.744 D-BUS: SetParameterValue('driver:inchannels', '1'): Parameter value type mismatch: was expecting 'i', got 'u'. (org.jackaudio.Error.InvalidArgs) This has nothing to do with USB. It appears some software uses a wrong interface when trying to configure Jack over D-Bus. Ask the Jack folks what's going on there. Regards, Clemens |
From: Florian H. <fha...@un...> - 2012-10-07 13:12:44
|
Hi, here is short update: I tested the device and I get sound. However, there seems to be a problem with the alsamixer, which is already indicated in the dmesg output given in my old message (see below). It seems that in mixer.c, the function get_ctl_value_v2 aborts with the error message shown in dmesg but so far, I could not figure out why. I tried to use the mixer, it works fine with the internal soundcard but if I choose the fireface ucx, it only shows one master output slider and no input channels at all and the master output slider has no influence on the volume at all. It is possible, to control the volume through PulseAudio-pavucontrol. PulseAudio lists the fireface ucx as "analog stereo" device but it should actually have 8 in- / 8 out-channels. When connected to a mac-os using the usb-class-compliance-mode and not the native RME-driver, these 8/8-channels are displayed! Best, Florian Quoting Florian Hanisch <fha...@un...>: > Hi, > > thanks for the information. I just commented the following part of mixer.c > > if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { > snd_printk(KERN_ERR "usbaudio: unit %u: invalid > UAC_FEATURE_UNIT descriptor\n", unitid); > return -EINVAL; > } > > and compiled alsa-driver, alsa-lib, alsa-tools and alsa-oss basically > following the instructions here: > http://alsa.opensrc.org/Quick_Install. There were warnings during the > compiling process but no errors. > > The new driver might work, I have the following output from dmesg > > [ 41.064090] usb 1-2: new high-speed USB device number 5 using ehci_hcd > [ 41.200270] ALSA mixer.c:352 cannot get ctl value: req = 0x83, > wValue = 0x200, wIndex = 0x200, type = 4 > [ 41.201129] ALSA mixer.c:352 cannot get ctl value: req = 0x83, > wValue = 0x200, wIndex = 0x200, type = 4 > [ 41.201230] ALSA mixer.c:352 cannot get ctl value: req = 0x83, > wValue = 0x200, wIndex = 0x200, type = 4 > > and from aplay -l > > **** List of PLAYBACK Hardware Devices **** > card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 1: F23455936 [Fireface UCX (23455936)], device 0: USB Audio [USB Audio] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > > The fireface ucx moreover appears in the system settings / sound > menue. I did not test whether the device actually produces sound, I > hope I can do that tomorrow. > > I have one more question concerning the usb-audio-2.0 standard: > How many in/out channels am I able to run (on linux) ? RME claim on > their website, that it is possible to use 8 in-channels on the ipad, > i.e. using the class compliance mode. I am asking this question > because JACK seems to have a problem with the in/out channels: > > 02:12:01.744 D-BUS: SetParameterValue('driver:inchannels', '1'): > Parameter value type mismatch: was expecting 'i', got 'u'. > (org.jackaudio.Error.InvalidArgs) > > The same error occurs for the outchannels and I tried the values 1,2,8 > for the nummer of channels but I always get the same error. > > Best, > > Florian > > Quoting Daniel Mack <zo...@gm...>: > >> On 02.10.2012 09:27, Clemens Ladisch wrote: >>> Florian Hanisch wrote: >>>>>> usbaudio: unit 2: invalid UAC_FEATURE_UNIT descriptor >>>> >>>> AudioControl Interface Descriptor: >>>> bLength 10 >>>> bDescriptorType 36 >>>> bDescriptorSubtype 6 (FEATURE_UNIT) >>>> bUnitID 2 >>>> bSourceID 3 >>>> bmaControls( 0) 0x0000000c >>>> Volume Control (read/write) >>>> iFeature 0 >>> >>> This descriptor is perfectly OK; the driver has a bug. >>> The following code in parse_audio_feature_unit() in sound/usb/mixer.c >>> is valid only for v1 devices; please try to just remove it: >>> >>> if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { >>> snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT >>> descriptor\n", unitid); >>> return -EINVAL; >>> } >> >> Yes, interesting this never got triggered before. The 7 should be a 6 in >> v2 case ... >> >> >> > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Alsa-user mailing list > Als...@li... > https://lists.sourceforge.net/lists/listinfo/alsa-user > |
From: Matthew R. <win...@gm...> - 2012-12-21 20:50:39
|
On 18/12/12 13:19, Clemens Ladisch wrote: > Matthew Robbetts wrote: >> Is this bug fixed upstream at this point? > > This patch is still untested: > Hi Clemens, I can confirm that I get the original error with a Babyface, and that this patch appears to fix it beautifully. At least, insofar as it is now seen by ALSA (/proc/asound/card0 is populated as I'd expect), there are no errors in dmesg, and my default Pulseaudio plays back audio with it (and at the correct sample rate, too). I have not tested audio input yet, but things look promising. Is there anything specific I ought to check? Thanks! Matt |
From: Florian H. <fha...@un...> - 2012-12-21 23:25:19
|
Quoting Matthew Robbetts <win...@gm...>: > On 18/12/12 13:19, Clemens Ladisch wrote: >> Matthew Robbetts wrote: >>> Is this bug fixed upstream at this point? >> >> This patch is still untested: >> > > Hi Clemens, > > I can confirm that I get the original error with a Babyface, and that > this patch appears to fix it beautifully. > > At least, insofar as it is now seen by ALSA (/proc/asound/card0 is > populated as I'd expect), there are no errors in dmesg, and my default > Pulseaudio plays back audio with it (and at the correct sample rate, > too). I have not tested audio input yet, but things look promising. > > Is there anything specific I ought to check? > > Thanks! > Matt |
From: Florian H. <fha...@un...> - 2012-12-21 23:36:16
|
Hi Matthew, did you try to use alsa-mixer ? It was not working when I was trying the fireface ucx with the modified mixer.c some weeks ago. It would be interesting to know whether it is different on your system / with the new patch. Thanks, Florian Quoting Matthew Robbetts <win...@gm...>: > On 18/12/12 13:19, Clemens Ladisch wrote: >> Matthew Robbetts wrote: >>> Is this bug fixed upstream at this point? >> >> This patch is still untested: >> > > Hi Clemens, > > I can confirm that I get the original error with a Babyface, and that > this patch appears to fix it beautifully. > > At least, insofar as it is now seen by ALSA (/proc/asound/card0 is > populated as I'd expect), there are no errors in dmesg, and my default > Pulseaudio plays back audio with it (and at the correct sample rate, > too). I have not tested audio input yet, but things look promising. > > Is there anything specific I ought to check? > > Thanks! > Matt |
From: Matthew R. <win...@gm...> - 2012-12-28 15:30:18
|
Hi Florian, On 21/12/12 23:36, Florian Hanisch wrote: > Hi Matthew, > > did you try to use alsa-mixer ? It was not working when I was trying the > fireface ucx with the modified mixer.c some weeks ago. It would be > interesting to know whether it is different on your system / with the > new patch. I'm not sure exactly what you mean by alsa-mixer, as I do not have a program by that name. $ cat /proc/asound/card1/id Babyface2312334 $ amixer --card 1 Simple mixer control 'Speaker',0 Capabilities: pvolume pvolume-joined Playback channels: Mono Limits: Playback 0 - 130 Mono: Playback 130 [100%] [0.00dB] So, we see that exactly one control is provided. At first, I thought this control had no effect at all, as the audio output only becomes audibly quieter when this control is well below 10%/-60dB. The rest of the range sounds like full volume, which is definitely not correct. So, perhaps there is a bug either in the usb audio driver or in the class-compliance of the RME interfaces. Is there a double dB-mapping or something? Also: $ dmesg | grep -b5 'usb 1-1' ... 75253:[ 37.663034] usb 1-1: new high-speed USB device number 2 using ehci_hcd 75327-[ 37.714346] ehci_hcd 0000:00:1a.7: port 1 reset complete, port enabled 75401-[ 37.714360] ehci_hcd 0000:00:1a.7: GetStatus port:1 status 001005 0 ACK POWER sig=se0 PE CONNECT 75502:[ 37.777245] usb 1-1: skipped 1 descriptor after configuration 75567:[ 37.777256] usb 1-1: skipped 7 descriptors after interface 75629:[ 37.777261] usb 1-1: skipped 2 descriptors after interface 75691:[ 37.777268] usb 1-1: skipped 1 descriptor after endpoint 75751:[ 37.777273] usb 1-1: skipped 2 descriptors after interface 75813:[ 37.777278] usb 1-1: skipped 1 descriptor after endpoint 75873:[ 37.777283] usb 1-1: skipped 2 descriptors after interface 75935:[ 37.777288] usb 1-1: skipped 1 descriptor after endpoint 75995:[ 37.777293] usb 1-1: skipped 2 descriptors after interface 76057:[ 37.777298] usb 1-1: skipped 1 descriptor after endpoint 76117:[ 37.777303] usb 1-1: skipped 5 descriptors after interface 76179:[ 37.777308] usb 1-1: skipped 1 descriptor after endpoint 76239:[ 37.777313] usb 1-1: skipped 1 descriptor after endpoint 76299:[ 37.777356] usb 1-1: default language 0x0409 76347:[ 37.777731] usb 1-1: udev 2, busnum 1, minor = 1 76399:[ 37.777738] usb 1-1: New USB device found, idVendor=0424, idProduct=3fd7 76475:[ 37.777746] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 76556:[ 37.777752] usb 1-1: Product: Babyface (23123346) 76609:[ 37.777757] usb 1-1: Manufacturer: RME 76651:[ 37.777761] usb 1-1: SerialNumber: D6E37D3FA346FC8 76705:[ 37.778681] usb 1-1: usb_probe_device 76746:[ 37.778689] usb 1-1: configuration #1 chosen from 1 choice 76808:[ 37.778749] usb 1-1: adding 1-1:1.0 (config #1, interface 0) 76872-[ 37.778872] snd-usb-audio 1-1:1.0: usb_probe_interface 76930-[ 37.778882] snd-usb-audio 1-1:1.0: usb_probe_interface - got id 76997-[ 37.781652] cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x0, type = 4 77085-[ 37.785159] cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x0, type = 4 77173-[ 37.785314] cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0x0, type = 4 77261:[ 37.785372] usb 1-1: adding 1-1:1.1 (config #1, interface 1) 77325:[ 37.785675] usb 1-1: adding 1-1:1.2 (config #1, interface 2) 77389:[ 37.785904] usb 1-1: adding 1-1:1.3 (config #1, interface 3) ... This doesn't look like things are going totally smoothly. But audio output DOES work, and the one volume control that is visible does have some effect. Is this different to your findings with the Fireface UCX? Thanks, Matt |
From: Florian H. <fha...@un...> - 2012-12-28 23:46:17
|
Hi Matt, Thanks for your message! I meant alsamixer not alsa-mixer, there is no hyphen, sorry. I had a quick look in the alsa wiki and as far I as can see, the programs alsamixer and amixer provide a similar functionality. alsamixer came with the alsa-utils package on ubuntu and has an nccurses-based interface. I can not post the output of amixer or dmesg right now because the fireface ucx that I have been using for testing was only borrowed from a friend. I plan to buy my own ucx soon and will post the results then. Anyway, I remember that there was an issue similar to the one you are reporting: > So, we see that exactly one control is provided. At first, I thought > this control had no effect at all, as the audio output only becomes > audibly quieter when this control is well below 10%/-60dB. The rest of > the range sounds like full volume, which is definitely not correct. Moreover, not all the 8 in- and 8 out-channels were displayed correctly. But audio output was also working for me and I could access all channels through jack at sample rates up to 96 kHz. Best, Florian Quoting Matthew Robbetts <win...@gm...>: > Hi Florian, > > On 21/12/12 23:36, Florian Hanisch wrote: >> Hi Matthew, >> >> did you try to use alsa-mixer ? It was not working when I was trying the >> fireface ucx with the modified mixer.c some weeks ago. It would be >> interesting to know whether it is different on your system / with the >> new patch. > > > I'm not sure exactly what you mean by alsa-mixer, as I do not have a > program by that name. > > $ cat /proc/asound/card1/id > Babyface2312334 > > $ amixer --card 1 > Simple mixer control 'Speaker',0 > Capabilities: pvolume pvolume-joined > Playback channels: Mono > Limits: Playback 0 - 130 > Mono: Playback 130 [100%] [0.00dB] > > > So, we see that exactly one control is provided. At first, I thought > this control had no effect at all, as the audio output only becomes > audibly quieter when this control is well below 10%/-60dB. The rest of > the range sounds like full volume, which is definitely not correct. > > So, perhaps there is a bug either in the usb audio driver or in the > class-compliance of the RME interfaces. Is there a double dB-mapping or > something? > > Also: > > $ dmesg | grep -b5 'usb 1-1' > ... > 75253:[ 37.663034] usb 1-1: new high-speed USB device number 2 using > ehci_hcd > 75327-[ 37.714346] ehci_hcd 0000:00:1a.7: port 1 reset complete, port > enabled > 75401-[ 37.714360] ehci_hcd 0000:00:1a.7: GetStatus port:1 status > 001005 0 ACK POWER sig=se0 PE CONNECT > 75502:[ 37.777245] usb 1-1: skipped 1 descriptor after configuration > 75567:[ 37.777256] usb 1-1: skipped 7 descriptors after interface > 75629:[ 37.777261] usb 1-1: skipped 2 descriptors after interface > 75691:[ 37.777268] usb 1-1: skipped 1 descriptor after endpoint > 75751:[ 37.777273] usb 1-1: skipped 2 descriptors after interface > 75813:[ 37.777278] usb 1-1: skipped 1 descriptor after endpoint > 75873:[ 37.777283] usb 1-1: skipped 2 descriptors after interface > 75935:[ 37.777288] usb 1-1: skipped 1 descriptor after endpoint > 75995:[ 37.777293] usb 1-1: skipped 2 descriptors after interface > 76057:[ 37.777298] usb 1-1: skipped 1 descriptor after endpoint > 76117:[ 37.777303] usb 1-1: skipped 5 descriptors after interface > 76179:[ 37.777308] usb 1-1: skipped 1 descriptor after endpoint > 76239:[ 37.777313] usb 1-1: skipped 1 descriptor after endpoint > 76299:[ 37.777356] usb 1-1: default language 0x0409 > 76347:[ 37.777731] usb 1-1: udev 2, busnum 1, minor = 1 > 76399:[ 37.777738] usb 1-1: New USB device found, idVendor=0424, > idProduct=3fd7 > 76475:[ 37.777746] usb 1-1: New USB device strings: Mfr=1, Product=2, > SerialNumber=3 > 76556:[ 37.777752] usb 1-1: Product: Babyface (23123346) > 76609:[ 37.777757] usb 1-1: Manufacturer: RME > 76651:[ 37.777761] usb 1-1: SerialNumber: D6E37D3FA346FC8 > 76705:[ 37.778681] usb 1-1: usb_probe_device > 76746:[ 37.778689] usb 1-1: configuration #1 chosen from 1 choice > 76808:[ 37.778749] usb 1-1: adding 1-1:1.0 (config #1, interface 0) > 76872-[ 37.778872] snd-usb-audio 1-1:1.0: usb_probe_interface > 76930-[ 37.778882] snd-usb-audio 1-1:1.0: usb_probe_interface - got id > 76997-[ 37.781652] cannot get ctl value: req = 0x83, wValue = 0x200, > wIndex = 0x0, type = 4 > 77085-[ 37.785159] cannot get ctl value: req = 0x83, wValue = 0x200, > wIndex = 0x0, type = 4 > 77173-[ 37.785314] cannot get ctl value: req = 0x83, wValue = 0x200, > wIndex = 0x0, type = 4 > 77261:[ 37.785372] usb 1-1: adding 1-1:1.1 (config #1, interface 1) > 77325:[ 37.785675] usb 1-1: adding 1-1:1.2 (config #1, interface 2) > 77389:[ 37.785904] usb 1-1: adding 1-1:1.3 (config #1, interface 3) > ... > > > This doesn't look like things are going totally smoothly. But audio > output DOES work, and the one volume control that is visible does have > some effect. > > > Is this different to your findings with the Fireface UCX? > > > Thanks, > Matt |