]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
Add support for the Traktor Kontrol Z1
authorGabriel de Perthuis <g2p.code@gmail.com>
Wed, 22 Jun 2022 16:00:18 +0000 (18:00 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Jul 2022 14:43:47 +0000 (16:43 +0200)
This is a small DJ mixer with a main output and a monitor output.
The outputs appear as a single subdevice, we use the SplitPCM macros to
present separate outputs.

Link: https://www.native-instruments.com/en/products/traktor/dj-controllers/traktor-kontrol-z1/specifications/
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/176
Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf [new file with mode: 0644]
ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf b/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf
new file mode 100644 (file)
index 0000000..2199b5d
--- /dev/null
@@ -0,0 +1,52 @@
+Include.pcm_split.File "/common/pcm/split.conf"
+
+Macro [
+       {
+               SplitPCM {
+                       Name "z1_stereo_out"
+                       Direction Playback
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
+               }
+       }
+]
+
+SectionDevice."Line" {
+       Comment "Line Out"
+
+       Value {
+               PlaybackPriority 200
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "z1_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Headphone" {
+       Comment "Headphone Out"
+       Value {
+               PlaybackPriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "z1_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
diff --git a/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1.conf b/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1.conf
new file mode 100644 (file)
index 0000000..e88b4ea
--- /dev/null
@@ -0,0 +1,11 @@
+Comment "Traktor Kontrol Z1"
+
+SectionUseCase."Mixer" {
+       Comment "Default"
+       File "/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf"
+}
+
+Define.DirectPlaybackChannels 2
+
+Include.dhw.File "/common/direct.conf"
+
index 776e4e71403f665460fc26f953214bd38dff03d4..1f5bf0054d13c4e85a5d3b993646899e9b3a9deb 100644 (file)
@@ -158,6 +158,15 @@ If.lenovo-p620-main {
        True.Define.ProfileName "Lenovo/ThinkStation-P620-Main"
 }
 
+If.kontrolz1 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB17cc:1210"
+       }
+       True.Define.ProfileName "NativeInstruments/Traktor-Kontrol-Z1"
+}
+
 If.minifuse2 {
        Condition {
                Type String