From: Gabriel de Perthuis Date: Wed, 22 Jun 2022 16:00:18 +0000 (+0200) Subject: Add support for the Traktor Kontrol Z1 X-Git-Tag: v1.2.7.2~8 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=291a1acf38ab1ee22f6e154f32d078f0256032a3;p=alsa-ucm-conf.git Add support for the Traktor Kontrol Z1 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 Signed-off-by: Jaroslav Kysela --- 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 index 0000000..2199b5d --- /dev/null +++ b/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1-Mixer.conf @@ -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 index 0000000..e88b4ea --- /dev/null +++ b/ucm2/USB-Audio/NativeInstruments/Traktor-Kontrol-Z1.conf @@ -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" + diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index 776e4e7..1f5bf00 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -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