]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Adding Focusrite Scarlett 2i4 gen2
authorPatrick Lang <patrick.lang@sdf.org>
Tue, 23 Aug 2022 06:03:43 +0000 (23:03 -0700)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Aug 2022 15:18:56 +0000 (17:18 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/203
Signed-off-by: Patrick Lang <patrick.lang@sdf.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf b/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf
new file mode 100644 (file)
index 0000000..5ee5076
--- /dev/null
@@ -0,0 +1,95 @@
+Include.pcm_split.File "/common/pcm/split.conf"
+
+Macro [
+       {
+               SplitPCM {
+                       Name "scarlett2i4_stereo_out"
+                       Direction Playback
+                       Format S32_LE
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
+               }
+       }
+       {
+               SplitPCM {
+                       Name "scarlett2i4_mono_in"
+                       Direction Capture
+                       Format S32_LE
+                       Channels 1
+                       HWChannels 2
+                       HWChannelPos0 MONO
+                       HWChannelPos1 MONO
+               }
+       }
+]
+
+SectionDevice."Line1" {
+       Comment "Line 1-2"
+       Value {
+               PlaybackPriority 200
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "scarlett2i4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Line2" {
+       Comment "Line 3-4"
+
+       Value {
+               PlaybackPriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "scarlett2i4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Input 1"
+
+       Value {
+               CapturePriority 200
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "scarlett2i4_mono_in"
+               Direction Capture
+               HWChannels 2
+               Channels 1
+               Channel0 0
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Input 2"
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "scarlett2i4_mono_in"
+               Direction Capture
+               HWChannels 2
+               Channels 1
+               Channel0 1
+               ChannelPos0 MONO
+       }
+}
diff --git a/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf b/ucm2/USB-Audio/Focusrite/Scarlett-2i4-gen2.conf
new file mode 100644 (file)
index 0000000..ffc296d
--- /dev/null
@@ -0,0 +1,11 @@
+Comment "Focusrite Scarlett 2i4 Gen 2"
+
+SectionUseCase."HiFi" {
+    Comment "Default"
+    File "/USB-Audio/Focusrite/Scarlett-2i4-gen2-HiFi.conf"
+}
+
+Define.DirectPlaybackChannels 4
+Define.DirectCaptureChannels 2
+
+Include.dhw.File "/common/direct.conf"
index 5bdcf0c03926e74fa93b2440c0e0c2ed673462ca..673ebdb367a4bebee55bd6779d6826d8eacd60b0 100644 (file)
@@ -120,6 +120,17 @@ If.goxlr {
        True.Define.ProfileName "GoXLR/GoXLR"
 }
 
+If.focusrite-scarlett-2i4-gen2 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB1235:8200"
+       }
+       True.Define {
+               ProfileName "Focusrite/Scarlett-2i4-gen2"
+       }
+}
+
 If.behringer-umc204hd {
        Condition {
                Type String