I have a NativeInstruments Audio Kontrol 1 USB audio interface.
It ist supported by Linux and got 4 outputs. so i can use it as effect output (stereo) and and two mono synth outputs which are going in my mixer.
The problem is that i see in mod-ui only 2 outputs.
I found a Blog which says there is a special configuration needed:
# Makes the subdevices aka channel 1&2 and 3&4 available for alsa applications
pcm_slave.sl12 {
pcm "hw:AudioKontrol1,0,0"
format S24_3BE
channels 2
rate 192000
}
pcm.channel12 {
type plug
slave sl12
}
pcm_slave.sl34 {
pcm "hw:AudioKontrol1,0,1"
format S24_3BE
channels 2
rate 192000
}
pcm.channel34 {
type plug
slave sl34
}
# create a virtual four-channel device with two sound devices:
# This is in fact two interleaved stereo streams in
# different memory locations, so JACK will complain that it
# cannot get mmap-based access. see below.
pcm.multi {
type multi;
slaves.a.pcm "hw:AudioKontrol1,0,0";
slaves.a.channels 2;
slaves.b.pcm "hw:AudioKontrol1,0,1";
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
# JACK will be unhappy if there is no mixer to talk to, so we set
# this to the usb card.
ctl.multi {
type hw;
card AudioKontrol1;
}
# This creates a 4 channel interleaved pcm stream based on
# the multi device. JACK will work with this one.
pcm.ttable {
type route;
slave.pcm "multi";
slave.channels 4;
ttable.0.0 1;
ttable.1.1 1;
ttable.2.2 1;
ttable.3.3 1;
}
# see above.
ctl.ttable {
type hw;
card AudioKontrol1;
}
I put the config in the file /etc/alsa/conf.d/asound.conf which should be read by alsa.
I had never anything to do with alsa config. Can someone tell something about this?
Regards Jens
Try backing up and then replacing /etc/asound.conf with this and see if you get any further. If this works then I would further suggest that you try to reduce the samplerate from 192000 to 480000 or 44100. There is almost no advantage of running at 192k whilst it is very likely to bog your CPU down running at such a high samplerate.
This may not work though! The configuration is presenting alternative stereo audio sources which may result in only stereo being available - either 1/2 or 3/4. (I am not sure about this.) I am using an 18 input / 20 output USB device and my /etc/asound.conf does not mention it so this may not be required but try it and see.
Hi,
it was late yesterday so i forgot to mention that i put samplerate to 44100.
i will try to replay the default /etc/asound.conf .
I searched this interface before buying and i thought i got 4 channels output by default. But there are only two in mod-ui.
so i searched and found the blog post and assumed that i need to configure something special to get 4 channels.
root@zynthian:~# aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
channel12
channel34
multi
ttable
hw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct hardware device without any conversions
plughw:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Hardware device with all software conversions
default:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
sysdefault:CARD=b1
bcm2835 HDMI 1, bcm2835 HDMI 1
Default Audio Device
dmix:CARD=b1,DEV=0
bcm2835 HDMI 1, bcm2835 HDMI 1
Direct sample mixing device
hw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct hardware device without any conversions
plughw:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Hardware device with all software conversions
default:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
sysdefault:CARD=Headphones
bcm2835 Headphones, bcm2835 Headphones
Default Audio Device
dmix:CARD=Headphones,DEV=0
bcm2835 Headphones, bcm2835 Headphones
Direct sample mixing device
hw:CARD=AudioKontrol1,DEV=0
Audio Kontrol 1, Audio Kontrol 1
Direct hardware device without any conversions
plughw:CARD=AudioKontrol1,DEV=0
Audio Kontrol 1, Audio Kontrol 1
Hardware device with all software conversions
default:CARD=AudioKontrol1
Audio Kontrol 1, Audio Kontrol 1
Default Audio Device
sysdefault:CARD=AudioKontrol1
Audio Kontrol 1, Audio Kontrol 1
Default Audio Device
dmix:CARD=AudioKontrol1,DEV=0
Audio Kontrol 1, Audio Kontrol 1
Direct sample mixing device
[Edit] Also, you could try starting jack using ttable as the device, e.g. /usr/local/bin/jackd -P 70 -t 2000 -d alsa -d ttable -r 44100 -p 256 -n 2 -s -S -X raw which could be done by setting the Jackd Options in webconf to -P 70 -t 2000 -d alsa -d ttable -r 44100 -p 256 -n 2 -s -S -X raw.
I put it in webconf and after reboot the ui is restarting so i stopped it with systemctl stop zynthian
I startet jack from commandline:
root@zynthian:~# /usr/local/bin/jackd -P 70 -t 2000 -d alsa -d ttable -r 44100 -p 256 -n 2 -s -S -X
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... ttable|ttable|256|2|44100|0|0|nomon|swmeter|soft-mode|16bit
ATTENTION: The capture (recording) device "ttable" is already in use. Please stop the application using it and run JACK again
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
root@zynthian:~#
But to be honest, let’s do not put too much time in this. On the internet there are many posts with this problem with no solution.
i can work with two outputs and will get a behringer interface.
Stopping zynthian does not stop jack2 service which is what is using the interface.
systemctl stop jack2 will stop the jack service.
There is an awkward issue that zynthian doesn’t necessarily restart after restarting jack. There are various dependancies and not all of them are properly configured so things don’t automatically stop and start.
It would be interesting to see what happens if you can start jack2 binding to ttable and run aplay -L and jack_lsp.
root@zynthian:~# systemctl stop jack2
root@zynthian:~# systemctl stop zynthian
root@zynthian:~# /usr/local/bin/jackd -P 70 -t 2000 -d alsa -d ttable -r 44100 -p 256 -n 2 -s -S -X raw
jackdmp 1.9.14
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2019 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 70
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... ttable|ttable|256|2|44100|0|0|nomon|swmeter|soft-mode|16bit
ATTENTION: The capture (recording) device "ttable" is already in use. Please stop the application using it and run JACK again
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
root@zynthian:~#
Any way to the which process opens which device? will try lsof
So i cant stop and did some searching. I found the following thread:
After reading i now there is an error in my asound.conf file. It must look like sys:
root@zynthian:~# cat /etc/asound.conf
# Makes the subdevices aka channel 1&2 and 3&4 available for alsa applications
pcm_slave.sl12 {
pcm "hw:AudioKontrol1,0,0"
format S24_3BE
channels 2
rate 44100
}
pcm.channel12 {
type plug
slave sl12
}
pcm_slave.sl34 {
pcm "hw:AudioKontrol1,0,1"
format S24_3BE
channels 2
rate 44100
}
pcm.channel34 {
type plug
slave sl34
}
# create a virtual four-channel device with two sound devices:
# This is in fact two interleaved stereo streams in
# different memory locations, so JACK will complain that it
# cannot get mmap-based access. see below.
pcm.multi {
type multi;
slaves.a.pcm "channel12";
slaves.a.channels 2;
slaves.b.pcm "channel34";
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
# JACK will be unhappy if there is no mixer to talk to, so we set
# this to the usb card.
ctl.multi {
type hw;
card AudioKontrol1;
}
# This creates a 4 channel interleaved pcm stream based on
# the multi device. JACK will work with this one.
pcm.ttable {
type route;
slave.pcm "multi";
slave.channels 4;
ttable.0.0 1;
ttable.1.1 1;
ttable.2.2 1;
ttable.3.3 1;
}
# see above.
ctl.ttable {
type hw;
card AudioKontrol1;
}
I had some troble testing jack on command line. Errors like “cant set capture device”. But i put this string in JAck config on web UI: -P 70 -t 2000 -d alsa -P ttable -C hw:AudioKontrol1 -i 2 -o 4 -r 44100 -p 256 -n 2 -s -S -X raw
After restart:
root@zynthian:~# jack_lsp
system:capture_1
system:capture_2
system:playback_1
system:playback_2
system:playback_3
system:playback_4
system:midi_capture_1
system:midi_playback_1
system:midi_capture_2
system:midi_capture_3
system:midi_playback_2
system:midi_playback_3
ttymidi:MIDI_in
ttymidi:MIDI_out
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0
zynthstep:input
zynthstep:output
jackpeak:input_a
jackpeak:input_b
ZynMidiRouter:main_out
SNIP
And in Mod.ui i have 4 outputs.
I will test it Tomorrow…
Well done in persevering until a result. We should capture what you did so that we can add the configuration and make this device supported out of the box.