From 16c71662eb7258e782212a5b26b178bbbdcd1ce8 Mon Sep 17 00:00:00 2001 From: beatboxa Date: Mon, 13 May 2024 16:25:18 -0400 Subject: [PATCH] USB-Audio: Add support for Motu 828 Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/416 Signed-off-by: beatboxa Signed-off-by: Jaroslav Kysela --- ucm2/USB-Audio/MOTU/D828-HiFi.conf | 601 +++++++++++++++++++++++++++++ ucm2/USB-Audio/MOTU/D828.conf | 11 + ucm2/USB-Audio/USB-Audio.conf | 17 +- 3 files changed, 628 insertions(+), 1 deletion(-) create mode 100644 ucm2/USB-Audio/MOTU/D828-HiFi.conf create mode 100644 ucm2/USB-Audio/MOTU/D828.conf diff --git a/ucm2/USB-Audio/MOTU/D828-HiFi.conf b/ucm2/USB-Audio/MOTU/D828-HiFi.conf new file mode 100644 index 00000000..71c1214c --- /dev/null +++ b/ucm2/USB-Audio/MOTU/D828-HiFi.conf @@ -0,0 +1,601 @@ +# MOTU 828 (28x32), released in 2024, Factory Defaults +# This is how the MOTU 828 initially appears in its included CueMix5 software for Mac OSX and Windows + +# ***** Still needs to be done*****: +# 1) ADAT mode for banks A & B of optical ports (8ch each in + out, each bank). Removed these for now, as the macro only supports 2 channel parameters +# 2) Related: a conflict switch for optical Bank A between 2-channel TOSLink and 8-channel ADAT +# 3) Surround mapping (eg. 7.1 configuration, like 0,1,4,5,6,7,8,9 map to FL,FR,FC,LFE,SL,SR,RL,RR respectively +# 4) Headphone mixdown + surround, so line outs play surround, while headphones mixdown surround to stereo + + + +#---------------------- +#---This section uses the referenced macro for the device configuration---: +# While the MOTU 828 can support mono outputs, I do not foresee ever needing this in practical usage. It can be added in the future if necessary. +#---------------------- + +Include.pcm_split.File "/common/pcm/split.conf" + +Macro [ + { + SplitPCM { + Name "motu828_stereo_out" + Direction Playback + Channels 2 + HWChannels 32 + HWChannelPos0 FL + HWChannelPos1 FR + } + } + { + SplitPCM { + Name "motu828_mono_in" + Direction Capture + Channels 1 + HWChannels 30 + HWChannelPos0 MONO + HWChannelPos1 MONO + } + } + { + SplitPCM { + Name "motu828_stereo_in" + Direction Capture + Channels 2 + HWChannels 30 + HWChannelPos0 FL + HWChannelPos1 FR + } + } +] + +#----------------------- +#---Physical Outputs---: +#----------------------- + +# On the back of the MOTU 828, these are XLR connectors: "MAIN OUT (A)" +# These are controlled by the [AB ON], [A], and [B] buttons on the front of the MOTU 828 + +SectionDevice."Line 1" { + Comment "Main Out A (1-2)" + + Value { + PlaybackPriority 320 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the back of the MOTU 828, these are 1/4" connectors: "LINE OUT (B): 3 | 4" +# These are controlled by the [AB ON], [A], and [B] buttons on the front of the MOTU 828 + +SectionDevice."Line 2" { + Comment "Main Out B / Line Out (3-4)" + + Value { + PlaybackPriority 310 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 2 + Channel1 3 + ChannelPos0 FL + ChannelPos1 FR + } +} + +#On the back of the MOTU 828, these are 1/4" connectors: "LINE OUT" + +SectionDevice."Line 3" { + Comment "Line Out (5-6)" + + Value { + PlaybackPriority 300 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 4 + Channel1 5 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line 4" { + Comment "Line Out (7-8)" + + Value { + PlaybackPriority 290 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 6 + Channel1 7 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line 5" { + Comment "Line Out (9-10)" + + Value { + PlaybackPriority 280 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 8 + Channel1 9 + ChannelPos0 FL + ChannelPos1 FR + } +} + +#On the front of the MOTU 828, these are 1/4" TRS connectors: (Headphone icons) + +SectionDevice."Headphones 1" { + Comment "Headphones (1)" + + Value { + PlaybackPriority 270 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 10 + Channel1 11 + ChannelPos0 FL + ChannelPos1 FR + } +} +SectionDevice."Headphones 2" { + Comment "Headphones (2)" + + Value { + PlaybackPriority 260 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 12 + Channel1 13 + ChannelPos0 FL + ChannelPos1 FR + } +} + +#On the back of the MOTU 828, this is a single RCA connector: "S/PDIF OUT": + +SectionDevice."SPDIF 1" { + Comment "S/PDIF Out (RCA)" + + Value { + PlaybackPriority 250 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + Channel0 14 + Channel1 15 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the back of the MOTU 828, these are 2 optical input connectors: "OPTICAL IN A" and "OPTICAL IN B". +# BANK A (only) can be configured as either: +# 2-channel TOSLINK, or +# 8-channel ADAT +# in the MOTU 828's menu +# Currently, only the 2-channel TOSLINK mode is supported + +SectionDevice."SPDIF 2" { + Comment "Optical Out A (TOSLink)" + + Value { + PlaybackPriority 240 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_out" + Direction Playback + HWChannels 32 + Channels 2 + + Channel0 16 + Channel1 17 + + ChannelPos0 FL + ChannelPos1 FR + } +} + +#---------------------- +#---Physical Inputs---: +#---------------------- + +# On the front of the MOTU 828, these are Combo (XLR + 1/4" TRS) connectors: "MIC / LINE / INSTRUMENT" +# and they are paired with the "MIC INSERT" balanced 1/4" TRS connectors on the back of the MOTU 828: +# These are defined as mono here; but there is a separate section with alternate stereo configuration and conflict resolution + +SectionDevice."Mic 1" { + Comment "Mic / Line / Instrument In (1)" + + Value { + CapturePriority 300 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 0 + ChannelPos0 MONO + } +} + +SectionDevice."Mic 2" { + Comment "Mic / Line / Instrument In (2)" + + Value { + CapturePriority 290 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 1 + ChannelPos0 MONO + } +} + +# On the back of the MOTU 828, these are balanced 1/4" TRS connectors: "LINE IN" +# These are stereo bridges; but there is a separate section with alternate mono configuration +# Conflict resolution due to duplication of connections is handled here in the stereo devices + +SectionDevice."Line 6" { + Comment "Line In (3-4)" + + ConflictingDevice [ + "Line 11" + "Line 12" + ] + Value { + CapturePriority 280 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 2 + Channel1 3 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line 7" { + Comment "Line In (5-6)" + + ConflictingDevice [ + "Line 13" + "Line 14" + ] + + Value { + CapturePriority 270 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 4 + Channel1 5 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line 8" { + Comment "Line In (7-8)" + + ConflictingDevice [ + "Line 15" + "Line 16" + ] + + Value { + CapturePriority 260 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 6 + Channel1 7 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line 9" { + Comment "Line In (9-10)" + + ConflictingDevice [ + "Line 17" + "Line 18" + ] + + Value { + CapturePriority 250 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 8 + Channel1 9 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# This is an internal loopback device provided by the MOTU 828. It does not have a physical external connection, other than the USB cable +# By default, it appears here, assigned to physical channels 11-12, after the physical Line Inputs #1-10. +# However, it can be reconfigured in the CueMix5 software (under "DEVICE" -> "Loopback Location") to appear as the first two channels (1-2), presumably shifting all other LINE channel assignments +# Make sure it is set to "USB in 11-12 (Default)" + +SectionDevice."Line 10" { + Comment "Internal Loopback" + + Value { + CapturePriority 240 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 10 + Channel1 11 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the back of the MOTU 828, this is a single RCA connector: "S/PDIF IN": +# Because these each use a single physical connection, there is no alternate mono definition for these + +SectionDevice."SPDIF 3" { + Comment "S/PDIF In (RCA)" + + Value { + CapturePriority 230 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 12 + Channel1 13 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the back of the MOTU 828, these are 2 optical input connectors: "OPTICAL IN A" and "OPTICAL IN B" +# BANK A (only) can be configured as either: +# 2-channel TOSLINK, or +# 8-channel ADAT +# in the MOTU 828's menu +# Because these each use a single physical connection, there is no alternate mono definition for these +# Currently, only the 2-channel TOSLINK mode is supported + +SectionDevice."SPDIF 4" { + Comment "Optical A In (TOSLink)" + + Value { + CapturePriority 220 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + + Channel0 14 + Channel1 15 + + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the front of the MOTU 828, these are Combo (XLR + 1/4" TRS) connectors: "MIC / LINE / INSTRUMENT" +# and they are paired with the "MIC INSERT" balanced 1/4" TRS connectors on the back of the MOTU 828 +# These are defined as a stereo pair here; but there is a separate section with alternate mono configuration + +SectionDevice."Mic 3" { + Comment "Mic / Line / Instrument In (1-2)" + + ConflictingDevice [ + "Mic 1" + "Mic 2" + ] + + Value { + CapturePriority 199 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_stereo_in" + Direction Capture + HWChannels 30 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos1 FR + } +} + +# On the back of the MOTU 828, these are balanced 1/4" TRS connectors: "LINE IN" +# These are defined as mono here; but there is a separate section with alternate stereo configuration and conflict resolution + +SectionDevice."Line 11" { + Comment "Line In (3)" + + Value { + CapturePriority 198 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 2 + ChannelPos0 MONO + } +} + +SectionDevice."Line 12" { + Comment "Line In (4)" + + Value { + CapturePriority 197 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 3 + ChannelPos0 MONO + } +} + +SectionDevice."Line 13" { + Comment "Line In (5)" + + Value { + CapturePriority 196 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 4 + ChannelPos0 MONO + } +} + +SectionDevice."Line 14" { + Comment "Line In (6)" + + Value { + CapturePriority 195 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 5 + ChannelPos0 MONO + } +} + +SectionDevice."Line 15" { + Comment "Line In (7)" + + Value { + CapturePriority 194 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 6 + ChannelPos0 MONO + } +} + +SectionDevice."Line 16" { + Comment "Line In (8)" + + Value { + CapturePriority 193 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 7 + ChannelPos0 MONO + } +} + +SectionDevice."Line 17" { + Comment "Line In (9)" + + Value { + CapturePriority 192 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 8 + ChannelPos0 MONO + } +} + +SectionDevice."Line 18" { + Comment "Line In (10)" + + Value { + CapturePriority 191 + } + Macro.pcm_split.SplitPCMDevice { + Name "motu828_mono_in" + Direction Capture + HWChannels 30 + Channels 1 + Channel0 9 + ChannelPos0 MONO + } +} diff --git a/ucm2/USB-Audio/MOTU/D828.conf b/ucm2/USB-Audio/MOTU/D828.conf new file mode 100644 index 00000000..ebeec39e --- /dev/null +++ b/ucm2/USB-Audio/MOTU/D828.conf @@ -0,0 +1,11 @@ +Comment "MOTU D828" + +SectionUseCase."HiFi" { + Comment "Factory Settings - Stereo Outputs + Inputs" + File "/USB-Audio/MOTU/D828-HiFi.conf" +} + +Define.DirectPlaybackChannels 32 #32 channels via physical outputs +Define.DirectCaptureChannels 30 #28 channels via physical inputs + 2 internal loopback inputs + +Include.dhw.File "/common/direct.conf" diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index 3b90a605..fa147d9c 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -1,4 +1,4 @@ -Syntax 6 +Syntax 7 Define.ProfileName "" Define.MixerRemap "" @@ -195,6 +195,21 @@ If.motu-ultralite-mk5 { True.Define.ProfileName "MOTU/UltraLite-mk5" } +If.motu-D828 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "USB07fd:000e" + } + True.If.D828 { + Condition { + Type String + Haystack "${CardLongName}" + Needle "MOTU 828" + } + True.Define.ProfileName "MOTU/D828" +} + If.dell-wd15 { Condition { Type RegexMatch