multiple audio outputs for cue with Mixvibes CrossDJ with Android Marshmallow

TLDR: If you can’t get multichannel USB audio working with CrossDJ on Android 6+, editing the /system/etc/audio_policy.conf file might help, if your device is rooted, and you don’t care about your warranty.

read on for how to do it, if you are comfortable with Linux shell commands and throwing your warranty to the wind. This is an updated version of a post I made to the Mixvibes support forum that they got a bit nervous about and locked…

I have been using Mixvibes Cross DJ Android as my portable mini DJ system for a while, and its been great – except the lack of extra output for headphone cue monitoring, without losing stereo. This has limited me to just basic level DJing with it.

The new Cross DJ release with Android 6 multi channel audio support promised to fix that for me!
So I upgraded my trusty Samsung Galaxy Note 8 tablet from Samsung Android 4.2.2 to Cyanogenmod 13 (Android 6.0.1).

And tried multi channel audio.. the first thing I tried was just a stereo USB sound card and hoping cueing would work on the tablets headphone outs, but no dice – a pity this doesn’t work, but I guess thats an Android thing.. so now to get a 4 channel sound card…

The only one I have is my Numark Mixtrack Pro.. even though none of the knobs and buttons work, it does show up as a sound card and works.. but it didn’t work as a multi channel with my setup.
Even though if I connect to the Linux terminal and check the driver status:

# cat /proc/asound/card1/stream0
Numark MixTrack Pro at usb-s5p-ohci-1, full speed : USB Audio

Playback:
Status: Running
Interface = 1
Altset = 1
URBs = 2 [ 5 6 ]
Packet Size = 376
Momentary freq = 44100 Hz (0x2c.199a)
Interface 1
Altset 1
Format: S16_LE
Channels: 4
Endpoint: 2 OUT (ADAPTIVE)
Rates: 44100

that tells me it is multi channel (Channels: 4).
But a bit of reading ( i.e. https://source.android.com/devices/audio/usb.html ) and it seems there is a layer of Android stuff on top of linux also setting audio policy, in the file /system/etc/audio_policy.conf

Looking in the /system/etc/audio_policy.conf I see the following section:


usb {
outputs {
usb_accessory {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
}
}
}

So as the /system filesystem on my device is mounted read only, I mount it read/write with

mount -r remount,rw /system

and edit the above lines to say:

usb {
outputs {
usb_accessory {
sampling_rates 44100
# channel_masks AUDIO_CHANNEL_OUT_STEREO
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
sampling_rates 44100
# channel_masks AUDIO_CHANNEL_OUT_STEREO
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
}
}
}

and reboot the tablet.
The first try it didn’t work.. but I dis-connected and reconnected the USB interface from the OTG connector and restarted CrossDJ and I suddenly had the option “Normal” / “Dual” / “Mixer” selecting dual, and the headphone output and main stereo output on my Numark mixtrack pro are now working with CrossDJ.

Now I’ll be clear that my tablet is well out of warranty, rooted, and running an non-Samsung rom and I’m comfortable with editing text config files in a terminal , if you aren’t familiar with this these hints may not be for you.

Also every time I’ve done this so far, I’ve had to start up Cross DJ, stop it, disconnect the USB audio interface and reconnect, and start Cross DJ again, and then the “Normal / Dual / Mixer” options have become available.

Now to find a small, portable 4 channel USB sound card with good sound quality complete my Ultimate portable rig…..