[alsa-devel] [PATCH] Maya44+ Support in ALSA
I found some problems on Maya44+ USB support in linux. Using ubuntu 13.04 , Ubuntu 13.10 with alsa driver alsa-driver-1.0.25+dfsg i found that this card isn't supported. Only 2 of 4 channels work and they are mixed . This card mounts TI TUSB3200AC chip. This chip is also used in Re Loop devices and in Herlcues DJ Console. To fix this problem i found on google a patch for Reloop device. I chanaged VID and PID for MAYA44+ and now it works . This patch involves in edititing ./sound/usb/quirks-table.h according to attached patch
Also i provide an .asoundrc. With this .asoundrc you are able to use each input and output channel
maya44+ patch
--- a/sound/usb/quirks-table.h 2013-11-12 12:43:24.380251603 +0100 +++ b/sound/usb/quirks-table.h 2013-11-06 12:28:20.000000000 +0100 @@ -320,6 +320,93 @@ #undef YAMAHA_DEVICE #undef YAMAHA_INTERFACE
+ +/* Reloop Play */ +{ + USB_DEVICE(0x200c, 0x100b), + .bInterfaceClass = USB_CLASS_PER_INTERFACE, + .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 = 0, + .type = QUIRK_AUDIO_STANDARD_MIXER, + }, + { + .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 = 0x01, + .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE, + .rates = SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000, + .rate_min = 44100, + .rate_max = 48000, + .nr_rates = 2, + .rate_table = (unsigned int[]) { + 44100, 48000 + } + } + }, + { + .ifnum = -1 + } + } + } +}, + +/* Maya44 USB+ Play */ +{ + USB_DEVICE(0x2573, 0x0008), + .bInterfaceClass = USB_CLASS_PER_INTERFACE, + .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 = 0, + .type = QUIRK_AUDIO_STANDARD_MIXER, + }, + { + .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 = 0x01, + .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE, + .rates = SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000, + .rate_min = 44100, + .rate_max = 48000, + .nr_rates = 2, + .rate_table = (unsigned int[]) { + 44100, 48000 + } + } + }, + { + .ifnum = -1 + } + } + } +}, + + + + + /* * Roland/RolandED/Edirol/BOSS devices */
.asoundrc example:
pcm.dshare { type dmix ipc_key 2048 slave { pcm "hw:1" rate 44100 period_time 0 period_size 1024 buffer_size 8192 channels 4 } bindings { 0 0 1 1 2 2 3 3 } }
pcm.dsnooped { type dsnoop ipc_key 2048 slave { pcm "hw:1" rate 48000 periods 0 period_time 0 period_size 1024 buffer_size 4096 channels 4 } }
pcm.mayaAin1 { type plug slave { pcm "dsnooped" channels 4 } ttable.0.0 1 } pcm.mayaAin2 { type plug slave { pcm "dsnooped" channels 4 } ttable.0.1 1 } pcm.mayaAin3 { type plug slave { pcm "dsnooped" channels 4 } ttable.0.2 1 } pcm.mayaAin4 { type plug slave { pcm "dsnooped" channels 4 } ttable.0.3 1 }
pcm.mayaAout1 { type plug slave { pcm "dshare" channels 4 } ttable.0.0 1 } pcm.mayaAout2 { type plug slave { pcm "dshare" channels 4 } ttable.0.1 1 } pcm.mayaAout3 { type plug slave { pcm "dshare" channels 4 } ttable.0.2 1 }
pcm.mayaAout4 { type plug slave { pcm "dshare" channels 4 } ttable.0.3 1 }
Simone Camporeale wrote:
I found some problems on Maya44+ USB support in linux. Only 2 of 4 channels work and they are mixed . To fix this problem i found on google a patch for Reloop device. I chanaged VID and PID for MAYA44+ and now it works .
What is the output of "lsusb -v" for this device?
Regards, Clemens
Hi Clements, this is lsub output
[simone@ubuntu: ~]$ lsusb Bus 007 Device 002: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 002: ID 2573:0008 Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 002: ID 0a5c:5800 Broadcom Corp. Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Best Regards, Simone
On Sat, Nov 16, 2013 at 7:04 PM, Clemens Ladisch clemens@ladisch.de wrote:
Simone Camporeale wrote:
I found some problems on Maya44+ USB support in linux. Only 2 of 4 channels work and they are mixed . To fix this problem i found on google a patch for Reloop device. I
chanaged
VID and PID for MAYA44+ and now it works .
What is the output of "lsusb -v" for this device?
Regards, Clemens
This is lsusb -v -d 2573:0008 output:
Bus 006 Device 002: ID 2573:0008 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x2573 idProduct 0x0008 bcdDevice 3.01 iManufacturer 1 ESI Audiotechnik GmbH iProduct 2 MAYA44 USB+ iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 295 bNumInterfaces 4 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x00 (Missing must-be-set bit!) (Bus Powered) MaxPower 250mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 1 Control Device bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdADC 1.00 wTotalLength 142 bInCollection 2 baInterfaceNr( 0) 1 baInterfaceNr( 1) 2 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 5 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0603 Line Connector bAssocTerminal 0 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 4 bSourceID 3 bControlSize 1 bmaControls( 0) 0x01 Mute bmaControls( 1) 0x02 Volume bmaControls( 2) 0x02 Volume iFeature 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0603 Line Connector bAssocTerminal 9 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 1 bControlSize 1 bmaControls( 0) 0x01 Mute bmaControls( 1) 0x02 Volume bmaControls( 2) 0x02 Volume iFeature 0 AudioControl Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 4 (MIXER_UNIT) bUnitID 6 bNrInPins 3 baSourceID( 0) 5 baSourceID( 1) 4 baSourceID( 2) 2 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 bmControls 0x00 iMixer 0 junk at descriptor end: 00 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 7 bSourceID 6 bControlSize 1 bmaControls( 0) 0x01 Mute bmaControls( 1) 0x02 Volume bmaControls( 2) 0x02 Volume iFeature 0 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 8 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 7 iTerminal 0 AudioControl Interface Descriptor: bLength 12 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 9 wTerminalType 0x0603 Line Connector bAssocTerminal 1 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 iTerminal 0 AudioControl Interface Descriptor: bLength 10 bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 10 bSourceID 9 bControlSize 1 bmaControls( 0) 0x01 Mute bmaControls( 1) 0x02 Volume bmaControls( 2) 0x02 Volume iFeature 0 AudioControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 4 (MIXER_UNIT) Warning: Descriptor too short bUnitID 11 bNrInPins 1 baSourceID( 0) 10 bNrChannels 2 wChannelConfig 0x0003 Left Front (L) Right Front (R) iChannelNames 0 bmControls 0x00 iMixer 9 AudioControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 12 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 11 iTerminal 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 5 bDelay 1 frames wFormatTag 1 PCM AudioStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 4 bSubframeSize 2 bBitResolution 16 bSamFreqType 2 Discrete tSamFreq[ 0] 44100 tSamFreq[ 1] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 9 Transfer Type Isochronous Synch Type Adaptive Usage Type Data wMaxPacketSize 0x0180 1x 384 bytes bInterval 1 bRefresh 0 bSynchAddress 0 AudioControl Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0 Undefined Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 12 bDelay 1 frames wFormatTag 1 PCM AudioStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 4 bSubframeSize 2 bBitResolution 16 bSamFreqType 2 Discrete tSamFreq[ 0] 44100 tSamFreq[ 1] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 13 Transfer Type Isochronous Synch Type Synchronous Usage Type Data wMaxPacketSize 0x0180 1x 384 bytes bInterval 1 bRefresh 0 bSynchAddress 0 AudioControl Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 0 Undefined wLockDelay 0 Undefined Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.00 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 52 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 16 Device Status: 0x0001 Self Powered
On Tue, Nov 19, 2013 at 1:03 PM, Clemens Ladisch clemens@ladisch.de wrote:
Simone Camporeale wrote:
this is lsub output
And what is the output of "lsusb -v -d 2573:0008"?
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Simone Camporeale