]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2 profile for MOTU M4 interface
authorReza Jahanbakhshi <reza.jahanbakhshi@gmail.com>
Fri, 27 May 2022 12:22:33 +0000 (14:22 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 12 Jun 2022 17:31:21 +0000 (19:31 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/158
Signed-off-by: Reza Jahanbakhshi <reza.jahanbakhshi@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/MOTU/M4-HiFi.conf [new file with mode: 0644]
ucm2/USB-Audio/MOTU/M4.conf [new file with mode: 0644]
ucm2/USB-Audio/USB-Audio.conf

diff --git a/ucm2/USB-Audio/MOTU/M4-HiFi.conf b/ucm2/USB-Audio/MOTU/M4-HiFi.conf
new file mode 100644 (file)
index 0000000..bfefcf1
--- /dev/null
@@ -0,0 +1,186 @@
+Include.pcm_split.File "/common/pcm/split.conf"
+
+Macro [
+       {
+               SplitPCM {
+                       Name "m4_stereo_out"
+                       Direction Playback
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
+               }
+       }
+       {
+               SplitPCM {
+                       Name "m4_mono_in"
+                       Direction Capture
+                       Channels 1
+                       HWChannels 4
+                       HWChannelPos0 MONO
+                       HWChannelPos1 MONO
+                       HWChannelPos2 MONO
+                       HWChannelPos3 MONO
+               }
+       }
+       {
+               SplitPCM {
+                       Name "m4_stereo_in"
+                       Direction Capture
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
+               }
+       }
+]
+
+SectionDevice."Line1" {
+       Comment "Headphone + Monitor Out"
+       Value {
+               PlaybackPriority 200
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Line2" {
+       Comment "Line Out"
+
+       Value {
+               PlaybackPriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Mic In 1L"
+
+       Value {
+               CapturePriority 200
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_mono_in"
+               Direction Capture
+               HWChannels 4
+               Channels 1
+               Channel0 0
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Mic In 2R"
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_mono_in"
+               Direction Capture
+               HWChannels 4
+               Channels 1
+               Channel0 1
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Line3" {
+       Comment "Line In L"
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_mono_in"
+               Direction Capture
+               HWChannels 4
+               Channels 1
+               Channel0 2
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Line4" {
+       Comment "Line In R"
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_mono_in"
+               Direction Capture
+               HWChannels 4
+               Channels 1
+               Channel0 3
+               ChannelPos0 MONO
+       }
+}
+
+SectionDevice."Mic3" {
+       Comment "Stereo Mic In 1L+1R"
+
+       ConflictingDevice [
+               "Mic1"
+               "Mic2"
+       ]
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_stereo_in"
+               Direction Capture
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
+SectionDevice."Line5" {
+       Comment "Stereo Line In L+R"
+
+       ConflictingDevice [
+               "Line3"
+               "Line4"
+       ]
+
+       Value {
+               CapturePriority 100
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "m4_stereo_in"
+               Direction Capture
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
+       }
+}
+
diff --git a/ucm2/USB-Audio/MOTU/M4.conf b/ucm2/USB-Audio/MOTU/M4.conf
new file mode 100644 (file)
index 0000000..f753ac6
--- /dev/null
@@ -0,0 +1,12 @@
+Comment "MOTU M4"
+
+SectionUseCase."HiFi" {
+       Comment "Analog Stereo Outputs + Inputs"
+       File "/USB-Audio/MOTU/M4-HiFi.conf"
+}
+
+Define.DirectPlaybackChannels 4
+Define.DirectCaptureChannels 4
+
+Include.dhw.File "/common/direct.conf"
+
index 43abc6f554799151155abeca3fb51a598317f3fe..ee2bec3f8b6455530caec936f17b1b51376ca359 100644 (file)
@@ -62,6 +62,15 @@ If.steinberg-ur44 {
        True.Define.ProfileName "Steinberg/UR44"
 }
 
+If.M4 {
+       Condition {
+               Type String
+               Haystack "${CardComponents}"
+               Needle "USB07fd:000b"
+       }
+       True.Define.ProfileName "MOTU/M4"
+}
+
 If.dell-wd15 {
        Condition {
                Type RegexMatch