First off, many, many thanks to everyone involved in the Mixxx project! Mixxx is a killer application. I had many problems with Serato in the past, such as the triggering of effects crashing the whole application, or samplers that buzz in the end of the sample.
Mixxx on the other way is rock solid, it doesn’t crash, the samples don’t buzz and you can actually download the source code and modify it to your needs. And running Mixxx on Linux with JACK and a realtime PREEMPT kernel is a must if you can afford all the RAM that it locks. Simply a better DJ setup than what you would achieve on Windows or even Mac.
I recently got the Pioneer DDJ-SR2 working fully on Linux and this is a thread to document it.
Well, the first thing you need is to patch your kernel. Nobody said it was gonna be easy, eh? But it’s actually a very simple patch. I already submitted the patch to Takashi Iwai and according to him it will be mainlined for kernel 5.11 if everything goes smooth.
So, before it is mainlined, I need your help. If you happen to run Linux and got a Pioneer DDJ-SR2 please test the following instructions and leave your feedback here on this thread, so we can know it’s really working for everybody, i.e. not just working for me
Since the formatting here screws up the patch, I’ll just upload it.
ddj-sr2.patch (2.4 KB)
Well, that was the easy part, since it was just a matter of figuring out the audio endpoints (same as DDJ-RB already on quirks table) and how many inputs and outputs the DDJ-SR2 has.
Now, for the hard part.
Once you apply this patch you will be able to configure Mixxx sound hardware to use ALSA or preferably JACK. Inputs 5-6 record the MASTER + MIC so you will want to configure Mixxx to use that, but you will see inputs 1-2 and 3-4 are muted and Vinyl Control / Passthrough doesn’t work.
This is because the DDJ-SR2 mixes the inputs in hardware. We will need to put it into Serato Mode so that it activates the inputs and mutes the hardware input signal path. One caveat: activating the PHONE/LINE inputs will also mute the MIC on inputs 5-6 it seems.
So, before I tell you how to put the DDJ-SR2 in Serato Mode let me just give you some background on how I achieved that. I ran a Windows 10 VM as a guest on Linux both with VirtualBox and QEMU.
VirtualBox only allowed me to capture the first MIDI SysEx message that Serato sends as part of the authentication handshake. QEMU fully ran Serato with the nec-usb-xhci USB driver but I was lucky that the other QEMU USB drivers didn’t fully work
Because that allowed me to capture the MIDI SysEx messages one by one without a deluge of information. I used Wireshark for the capture of usbmon.
Oh, and by the way, before you do this turn off your DDJ-SR2, boot it while holding SHIFT + PLAY, and make sure left KEYLOCK is lit off (Serato Mode enabled) and right KEYLOCK is lit on (Mix in software while in Serato Mode).
Specifically if Serato Mode is disabled the MIDI SysEx messages that turn it on will make your controller unresponsive to MIDI commands (first SysEx message) and after that it will stop sending MIDI messages altogether (second SysEx message). This freezes Serato even on a real Windows machine.
Ok, so I will spare you the details and just leave the commands for activating Serato Mode. This assumes DDJ-SR2 is your only MIDI device connected. Run:
- amidi -p “hw:1,0,0” -S “f0 00 20 04 7f 01 02 04 01 01 5f 04 0c 0e 05 04 03 0a 07 04 0f 02 06 04 0b 05 0f 04 01 05 03 06 00 f7”
The controller will now send what I believe is license information, so I will omit the reply. You can capture the reply with amidi -p “hw:1,0,0” -d
- amidi -p “hw:1,0,0” -S “f0 00 20 7f 01 02 01 01 63 09 04 0e 05 0c 06 09 05 00 01 0a 04 0b 07 07 0c f7”
OK, that’s it, basically. Spin some Vinyl on one of the PHONO inputs and set that deck to PHONO/LINE. You should hear nothing. If that’s the case, congratulations, it worked, fire up Mixxx and set Vinyl to PASS (that’s assuming you correctly configured Vinyl Control 1 for inputs 1-2 and Vinyl Control 2 for inputs 3-4) and now you should hear your record on the MASTER.