Servus ihr Linux-Fachleute,
als notorischer Linux-Dauernoob möchte ich meinen DJ-Controller Pioneer DDJ-ERGO-V unter Linux einrichten, um ihn auf meinem Laptop und anschließend eventuell sogar auf einem RPi 4B (4GB) mit Mixxx zu betreiben. Das Ding läuft zwar plug+play unter Windows mit der Software Virtual DJ, aber ich will jetzt von Windows komplett weg. Bitte darüber keine Diskussion, es ist einfach so
Solche DJ-Konsolen sind prinzipiell ein USB-Gerät mit Hub(?), an dem ein HID-Gerät, sozusagen eine aufgemotzte Tastatur (allerdings als MIDI-Gerät) und eine USB-Soundkarte mit zwei Stereo-Ausgängen (Masterausgang und Kopfhörerausgang zum Vorhören) und einem Stereoeingang (für Mikrofon oder externe Audioquelle) hängen. Die eigentliche Steuerung und Berechnung der Audiodaten erfolgt komplett in der DJ-Software.
Teil 1, die Umsetzung (Mapping) der einzelnen Bedienelemente über MIDI dürfte in Linux out-of-the-box funktionieren. Unter Linux (Mint) wird auf meinem Laptop beim Anstecken des DDJ-ERGO-V an USB die Gerätedatei /dev/midi1 angelegt. Mit cat /dev/midi1 sieht man die Datenbytes, die von der DJ-Konsole an den PC gesendet werden. Ebenso ist ein schreibender Zugriff problemlos möglich. Die für's Mapping erforderlichen Werte sind in der Bedienungsanleitung ab Seite 25, "Liste der MIDI-Meldungen" aufgeführt. Für erste Tests habe ich ganz einfache C++-Programme erstellt und die waren prinzipiell erfolgreich.
Mit Teil 2, der Audioanbindung habe ich Probleme:
Die Soundeinheit des DDJ-ERGO-V wird unter Linux zwar als USB-Soundkarte nach USB-Audio-Class 1(?) für den Treiber snd-usb-audio erkannt, aber natürlich kommt kein Ton heraus, denn sonst wär's ja einfach.
Bus 002 Device 003: ID 04f2:b1d6 Chicony Electronics Co., Ltd CNF9055 Toshiba Webcam
Bus 002 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 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 08e4:0161 Pioneer Corp.
Bus 003 Device 002: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
An USB-Port/Bus 003 hängt also der DDJ-ERGO-V als Device 003
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/5p, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 3: Dev 3, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 3, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 3, If 3, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 3, If 4, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 3, If 5, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
|__ Port 5: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 5: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/5p, 480M
Display More
Es handelt sich also um ein USB1.1-Gerät mit einer Übertragungsrate von 12Mbit, bestehend aus 5 Einträgen "snd-usb-audio" und einem "Human Interface Device" für die MIDI-Steuerung.
Karte 0: SB [HDA ATI SB], Gerät 0: ALC259 Analog [ALC259 Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 1: HDMI [HDA ATI HDMI], Gerät 3: HDMI 0 [HDMI 0]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Karte 2: DDJERGO [PIONEER DDJ-ERGO], Gerät 0: USB Audio [USB Audio]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
Auch von ALSA wird "die Soundkarte" erkannt und offenbar als USB-Audio-Class-konformes Gerät eingebunden.
für die, die es interessiert
Bus 003 Device 003: ID 08e4:0161 Pioneer Corp.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x08e4 Pioneer Corp.
idProduct 0x0161
bcdDevice 1.20
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 298
bNumInterfaces 6
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
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 53
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 4
wChannelConfig 0x0000
iChannelNames 7
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bSourceID 1
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0603 Line Connector
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0000
iChannelNames 5
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 3
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 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 4
bSubframeSize 3
bBitResolution 24
bSamFreqType 1 Discrete
tSamFreq[ 0] 44100
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0220 1x 544 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 4
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 3
bBitResolution 24
bSamFreqType 1 Discrete
tSamFreq[ 0] 44100
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 13
Transfer Type Isochronous
Synch Type Synchronous
Usage Type Data
wMaxPacketSize 0x0110 1x 272 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 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 3
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 9
bInCollection 1
baInterfaceNr( 0) 4
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 3 MIDI Streaming
bInterfaceProtocol 0
iInterface 3
MIDIStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 65
MIDIStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (MIDI_IN_JACK)
bJackType 1 Embedded
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 9
bDescriptorType 36
bDescriptorSubtype 3 (MIDI_OUT_JACK)
bJackType 1 Embedded
bJackID 3
bNrInputPins 1
baSourceID( 0) 2
BaSourcePin( 0) 1
iJack 0
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 0
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 5
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 1
baAssocJackID( 0) 1
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 0
bRefresh 0
bSynchAddress 0
MIDIStreaming Endpoint Descriptor:
bLength 5
bDescriptorType 37
bDescriptorSubtype 1 (GENERAL)
bNumEmbMIDIJack 1
baAssocJackID( 0) 3
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 4
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 53
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0020 1x 32 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Display More
Dann hat es mich interessiert, wie der DDJ-ERGO-V im Inneren aufgebaut ist und habe ihn geöffnet, in der Hoffnung, auf einen linus-bekannten Chipsatz zu stoßen. Aber als USB-Baustein wurde der (mittlerweile von TI als deprecated klassifizierte) Baustein TUSB3200A verwendet. eigentlich ein cooles Teil mit integriertem 8052-µC. Daran hängen zwei DAC-Wandler AK4387 (Audioausgänge) und ein ADC-Wandler AK5358 (Audioeingang) und dahinter jeweils entsprechende Audio-OpAmps vom Typ RC4580:
-------------
| | ---------------- ----------------------
| |===| AK5358 (ADC) |===| RC4580 audio OpAmp | <-- mic/aux in
| | ---------------- ----------------------
| |
----------- | | ---------------- ----------------------
| USB-1.1 |===| TUSB3200A |===| AK4387 (DAC) |===| RC4580 audio OpAmp | --> master out
----------- | | ---------------- ----------------------
| |
| | ---------------- ----------------------
| |===| AK4387 (DAC) |===| RC4580 audio OpAmp | --> headphones
| | ---------------- ----------------------
-------------
|
|__________ MIDI control
Display More
bzw. hier als Foto:
und jetzt die Frage: Wie bindet man das in Linux ein? Die Anzahl der Audiokanäle wird nicht (richtig) erkannt.
Momentan denke ich, dass es vielleicht funzt, wenn man die ALSA-Steuerdatei /etc/asound.conf bzw. ~/.asoundrc erstellt.
Mit aplay fand ich heraus, dass die DDJ-ERGO-V-Soundkarte nativ eine WAV mit signed24bit-PWM verarbeitet. Allerdings wird die Anzahl der Audiokanäle nicht richtig erkannt
$ aplay -D hw:2,0 /media/peter/Musik/01_GloanaBauer_16bit.wav # Originaldatei
Wiedergabe: WAVE '/media/peter/Musik/01_GloanaBauer_16bit.wav' : Signed 16 bit Little Endian, Rate: 44100 Hz, stereo
aplay: set_params:1233: Sample-Format nicht unterstützt
Available formats:
- S24_3LE
$ aplay -D hw:2,0 -c 2 /media/peter/Musik/03_gloanaBauer_signed24bit_PCM.wav # Mit audacity angepasste Audiodatei
Wiedergabe: WAVE '/media/peter/Musik/03_gloanaBauer_signed24bit_PCM.wav' : Signed 24 bit Little Endian in 3bytes, Rate: 44100 Hz, stereo
aplay: set_params:1239: Kanalanzahl nicht unterstützt
hierbei ist es auch egal, wie viele Kanäle man mit dem Parameter -c <Kanalanzahl> angibt. Ich habe es von 0 bis 10 durchprobiert.
Hier noch ein paar Dateien