[alsa-devel] Rane SL-4 USB sound card
Hello, I've been hacking to get Rane SL-4 USB audio (http://dj.rane.com/products/sl4-for-serato-scratch-live) which have 4 Input and 4 output channel to work with ALSA. After digging the lsusb and snoops I have separated endpoints for input (0x82) and output (0x06). They are just USB Isochronous I/O. I have compiled kernel and tried to get USB-quirks to work with this but then I have to admit that even Reloop Play seems be very similar it doesn't do the trick (No error but card doesn't come up eather) nor using Ranel SL-1 approach which just shoots the error
[ 3555.009349] usb 1-5: Audio class v2 interfaces need an interface association [ 3555.009373] snd-usb-audio: probe of 1-5:1.0 failed with error -5 [ 3555.009394] usb 1-5: cannot find UAC_HEADER [ 3555.009401] snd-usb-audio: probe of 1-5:1.1 failed with error -5 [ 3555.009421] usb 1-5: cannot find UAC_HEADER [ 3555.009427] snd-usb-audio: probe of 1-5:1.2 failed with error -5
If I need interface association how to do that? Trying to adjust mixer values in mixer_maps.c.
If someone have a time to give some guidance if this doable with Quirks or do I have to write some more specific driver? I attach lsusb below here. HID device seems to be adjusting buffer size and 48 Khz and 96 Khz output.
Bus 001 Device 003: ID 1cc5:000f Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 255 bDeviceProtocol 255 bMaxPacketSize0 64 idVendor 0x1cc5 idProduct 0x000f bcdDevice 1.00 iManufacturer 1 Rane Corporation iProduct 2 Rane SL 4 iSerial 3 RH.01.00 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 235 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 1 bInterfaceProtocol 32 iInterface 4 SL 4 Audio ** UNRECOGNIZED: 09 24 01 00 02 0a 4b 00 00 ** UNRECOGNIZED: 08 24 0a 05 01 01 00 00 ** UNRECOGNIZED: 11 24 02 01 01 01 00 05 0a 00 00 00 00 05 00 00 00 ** UNRECOGNIZED: 0c 24 03 02 02 06 00 01 05 00 00 00 ** UNRECOGNIZED: 11 24 02 03 02 06 00 05 0a 00 00 00 00 0f 00 00 00 ** UNRECOGNIZED: 0c 24 03 04 01 01 00 03 05 00 00 00 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 2 bInterfaceProtocol 32 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 2 bInterfaceProtocol 32 iInterface 0 ** UNRECOGNIZED: 10 24 01 01 00 01 01 00 00 00 0a 00 00 00 00 05 ** UNRECOGNIZED: 06 24 02 01 04 18 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0208 1x 520 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 2 bInterfaceProtocol 32 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 2 bInterfaceProtocol 32 iInterface 0 ** UNRECOGNIZED: 10 24 01 03 00 01 01 00 00 00 0a 00 00 00 00 0f ** UNRECOGNIZED: 06 24 02 01 04 18 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 37 Transfer Type Isochronous Synch Type Asynchronous Usage Type Implicit feedback Data wMaxPacketSize 0x0208 1x 520 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 28 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 255 bDeviceProtocol 255 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered)
Thanks you for your time and any tips would be nice.
Sincerely, Tuukka
Tuukka Pasanen wrote:
I've been hacking to get Rane SL-4 USB audio ... to work with ALSA. I have compiled kernel and tried to get USB-quirks to work with this ... it doesn't do the trick
If I need interface association how to do that?
The interface association descriptor should have been provided by the firmware.
Anyway, try the following quirk:
{ USB_DEVICE(0x1cc5, 0x000f), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_COMPOSITE, .data = (const struct snd_usb_audio_quirk[]) { { .ifnum = 1, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = 2, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = -1, } } } },
Regards, Clemens
Hello, Thanks you for you reply. That did the trick almost. It only gives sysdefault with two channels and error:
[176317.418587] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5) [176317.419156] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)
I figured out this kind of QUIRK which seems to be working (go to test tomorrow more). I would go with first quirck as it's looking simpler but I can't add rates to it?
{ USB_DEVICE(0x1cc5, 0x000f), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_COMPOSITE, .data = (const struct snd_usb_audio_quirk[]) { { .ifnum = 1, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S24_3LE, .channels = 4, .iface = 1, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x06, .ep_attr = USB_ENDPOINT_XFER_ISOC, .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000, .rate_min = 48000, .rate_max = 96000, .nr_rates = 2, .rate_table = (unsigned int[]) { 48000, 96000 } } }, { .ifnum = 2, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S24_3LE, .channels = 4, .iface = 2, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x82, .ep_attr = USB_ENDPOINT_XFER_ISOC, .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000, .rate_min = 48000, .rate_max = 96000, .nr_rates = 2, .rate_table = (unsigned int[]) { 48000, 96000 } } }, { .ifnum = -1, } } } },
Sincerely, Tuukka
05.07.2015, 20:32, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
I've been hacking to get Rane SL-4 USB audio ... to work with ALSA. I have compiled kernel and tried to get USB-quirks to work with this ... it doesn't do the trick If I need interface association how to do that?
The interface association descriptor should have been provided by the firmware.
Anyway, try the following quirk:
{ USB_DEVICE(0x1cc5, 0x000f), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_COMPOSITE, .data = (const struct snd_usb_audio_quirk[]) { { .ifnum = 1, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = 2, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = -1, } } } },
Regards, Clemens
Hello, Thanks you for you reply. That did the trick almost. It only gives sysdefault with two channels and error:
[176317.418587] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5) [176317.419156] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)
I figured out this kind of QUIRK which seems to be working (go to test tomorrow more). I would go with first quirck as it's looking simpler but I can't add rates to it?
{ USB_DEVICE(0x1cc5, 0x000f), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_COMPOSITE, .data = (const struct snd_usb_audio_quirk[]) { { .ifnum = 1, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S24_3LE, .channels = 4, .iface = 1, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x06, .ep_attr = USB_ENDPOINT_XFER_ISOC, .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000, .rate_min = 48000, .rate_max = 96000, .nr_rates = 2, .rate_table = (unsigned int[]) { 48000, 96000 } } }, { .ifnum = 2, .type = QUIRK_AUDIO_FIXED_ENDPOINT, .data = &(const struct audioformat) { .formats = SNDRV_PCM_FMTBIT_S24_3LE, .channels = 4, .iface = 2, .altsetting = 1, .altset_idx = 1, .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE, .endpoint = 0x82, .ep_attr = USB_ENDPOINT_XFER_ISOC, .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000, .rate_min = 48000, .rate_max = 96000, .nr_rates = 2, .rate_table = (unsigned int[]) { 48000, 96000 } } }, { .ifnum = -1, } } } },
Sincerely, Tuukka
05.07.2015, 20:32, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
I've been hacking to get Rane SL-4 USB audio ... to work with ALSA. I have compiled kernel and tried to get USB-quirks to work with this ... it doesn't do the trick If I need interface association how to do that?
The interface association descriptor should have been provided by the firmware.
Anyway, try the following quirk:
{ USB_DEVICE(0x1cc5, 0x000f), .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { .ifnum = QUIRK_ANY_INTERFACE, .type = QUIRK_COMPOSITE, .data = (const struct snd_usb_audio_quirk[]) { { .ifnum = 1, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = 2, .type = QUIRK_AUDIO_STANDARD_INTERFACE }, { .ifnum = -1, } } } },
Regards, Clemens
Tuukka Pasanen wrote:
[176317.418587] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)
So it doesn't actually conform with the audio class.
I figured out this kind of QUIRK which seems to be working (go to test tomorrow more).
Hmm, the descriptors claim it uses S24_LE ...
Do all channels work? Does it correctly switch between 48/96 kHz? Is it possible to use different rates for playback/capture?
Regards, Clemens
Hello, Thank you that 24_LE. I'll test tommorrow and find answers to there questions. I'll think that 48/96 won't work because it seems to be behind that HID.. but that this after I get sound out and in.
Tuukka
06.07.2015, 16:07, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
[176317.418587] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)
So it doesn't actually conform with the audio class.
I figured out this kind of QUIRK which seems to be working (go to test tomorrow more).
Hmm, the descriptors claim it uses S24_LE ...
Do all channels work? Does it correctly switch between 48/96 kHz? Is it possible to use different rates for playback/capture?
Regards, Clemens
Hello, I've tested Quirck and it worked (at least channels 1-2 input/output) fine when changed S24_LE. Problem is that currently it doesn't have Mixer so pulseaudio or jackd can't see it without .asoundrc. I digged little bit mixer_map.c but didn't get it working.
Sincerely, Tuukka
06.07.2015, 16:07, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
[176317.418587] usb 1-5: parse_audio_format_rates_v2(): unable to retrieve number of sample rates (clock 5)
So it doesn't actually conform with the audio class.
I figured out this kind of QUIRK which seems to be working (go to test tomorrow more).
Hmm, the descriptors claim it uses S24_LE ...
Do all channels work? Does it correctly switch between 48/96 kHz? Is it possible to use different rates for playback/capture?
Regards, Clemens
Tuukka Pasanen wrote:
I've tested Quirck and it worked (at least channels 1-2 input/output) fine when changed S24_LE. Problem is that currently it doesn't have Mixer
According to the descriptors, it does not have mixer controls. Does the Windows driver have mixer controls that affect the hardware?
so pulseaudio or jackd can't see it without .asoundrc.
That should make no difference.
Regards, Clemens
Hello, No it doesn't. Hmm... I got to examine this more because even Yast2 cant see this or alsaconf..
Tuukka
07.07.2015, 10:23, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
I've tested Quirck and it worked (at least channels 1-2 input/output) fine when changed S24_LE. Problem is that currently it doesn't have Mixer
According to the descriptors, it does not have mixer controls. Does the Windows driver have mixer controls that affect the hardware?
so pulseaudio or jackd can't see it without .asoundrc.
That should make no difference.
Regards, Clemens
Hello, More digging on this. Pulseaudio and jackd (portaudio) are supporting 24_3LE (Tree byte) that is why they didn't work with 24_LE. Is 24_LE just 32_LE (4 bytes) and first byte is just zeroed? If that is so I can use 32_LE and applications just work?
Sincerely, Tuukka
07.07.2015, 10:23, Clemens Ladisch kirjoitti:
Tuukka Pasanen wrote:
I've tested Quirck and it worked (at least channels 1-2 input/output) fine when changed S24_LE. Problem is that currently it doesn't have Mixer
According to the descriptors, it does not have mixer controls. Does the Windows driver have mixer controls that affect the hardware?
so pulseaudio or jackd can't see it without .asoundrc.
That should make no difference.
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Tuukka Pasanen