From: Jaroslav Kysela Date: Wed, 19 Oct 2022 07:48:38 +0000 (+0200) Subject: USB-Audio: Add support for Arturia Minifuse 1 X-Git-Tag: v1.2.8~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2942a766b805be3ee070c30f0d034ba8494a8db0;p=alsa-ucm-conf.git USB-Audio: Add support for Arturia Minifuse 1 Recode Minifuse 2 config to support Minifuse 1, too. BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/220 Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/226 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Arturia/Minifuse-12-HiFi.conf b/ucm2/USB-Audio/Arturia/Minifuse-12-HiFi.conf new file mode 100644 index 0000000..644a0bb --- /dev/null +++ b/ucm2/USB-Audio/Arturia/Minifuse-12-HiFi.conf @@ -0,0 +1,189 @@ +Include.pcm_split.File "/common/pcm/split.conf" + +Define { + HasLine3 "y" + HasMic1 "y" + HasMic2 "y" +} + +If.minifuse1 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "USB1c75:af80" + } + True.Define { + HasLine3 "" + HasMic2 "" + } +} + +Macro [ + { + SplitPCM { + Name "minifuse12_stereo_out" + Direction Playback + Channels 2 + HWChannels 4 + HWChannelPos0 FL + HWChannelPos1 FR + HWChannelPos2 FL + HWChannelPos3 FR + } + } + { + SplitPCM { + Name "minifuse12_stereo_in" + Direction Capture + Channels 2 + HWChannels 4 + HWChannelPos0 FL + HWChannelPos1 FR + HWChannelPos2 FL + HWChannelPos3 FR + } + } + { + SplitPCM { + Name "minifuse12_mono_in" + Direction Capture + Channels 1 + HWChannels 4 + HWChannelPos0 MONO + HWChannelPos1 MONO + HWChannelPos2 MONO + HWChannelPos3 MONO + } + } +] + +DefineMacro.ConflictingLine3 { + If.0 { + Condition { + Type String + Empty "${var:HasLine3}" + } + False.ConflictingDevice [ + "Line3" + ] + } +} + +SectionDevice."Line1" { + Comment "Main Output L/R" + + Value { + PlaybackPriority 300 + } + Macro.pcm_split.SplitPCMDevice { + Name "minifuse12_stereo_out" + Direction Playback + HWChannels 4 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos1 FR + } +} + +SectionDevice."Line2" { + Comment "Loopback L/R" + + Value { + PlaybackPriority 200 + CapturePriority 200 + } + Macro.pcm_split1.SplitPCMDevice { + Name "minifuse12_stereo_out" + Direction Playback + HWChannels 4 + Channels 2 + Channel0 2 + Channel1 3 + ChannelPos0 FL + ChannelPos1 FR + } + Macro.pcm_split2.SplitPCMDevice { + Name "minifuse12_stereo_in" + Direction Capture + HWChannels 4 + Channels 2 + Channel0 2 + Channel1 3 + ChannelPos0 FL + ChannelPos1 FR + } +} + +If.line3 { + Condition { + Type String + Empty "${var:HasLine3}" + } + False.SectionDevice."Line3" { + Comment "Stereo Input 1+2 L/R" + + Value { + CapturePriority 100 + } + Macro.pcm_split.SplitPCMDevice { + Name "minifuse12_stereo_in" + Direction Capture + HWChannels 4 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos1 FR + } + } +} + +If.mic1 { + Condition { + Type String + Empty "${var:HasMic1}" + } + False.SectionDevice."Mic1" { + Comment "Mic/Line/Inst 1 (L)" + + Macro.conflict.ConflictingLine3 { } + + Value { + CapturePriority 400 + } + Macro.pcm_split2.SplitPCMDevice { + Name "minifuse12_mono_in" + Direction Capture + HWChannels 4 + Channels 1 + Channel0 0 + ChannelPos0 MONO + } + } +} + +If.mic2 { + Condition { + Type String + Empty "${var:HasMic2}" + } + False.SectionDevice."Mic2" { + Comment "Mic/Line/Inst 2 (R)" + + Macro.conflict.ConflictingLine3 { } + + Value { + CapturePriority 300 + } + Macro.pcm_split2.SplitPCMDevice { + Name "minifuse12_mono_in" + Direction Capture + HWChannels 4 + Channels 1 + Channel0 1 + ChannelPos0 MONO + } + } +} diff --git a/ucm2/USB-Audio/Arturia/Minifuse-2.conf b/ucm2/USB-Audio/Arturia/Minifuse-12.conf similarity index 67% rename from ucm2/USB-Audio/Arturia/Minifuse-2.conf rename to ucm2/USB-Audio/Arturia/Minifuse-12.conf index f761d46..627ffa9 100644 --- a/ucm2/USB-Audio/Arturia/Minifuse-2.conf +++ b/ucm2/USB-Audio/Arturia/Minifuse-12.conf @@ -1,8 +1,8 @@ -Comment "Arturia Minifuse 2" +Comment "Arturia Minifuse 1/2" SectionUseCase."HiFi" { Comment "Default Alsa Profile" - File "/USB-Audio/Arturia/Minifuse-2-HiFi.conf" + File "/USB-Audio/Arturia/Minifuse-12-HiFi.conf" } Define.DirectPlaybackChannels 4 diff --git a/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf b/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf deleted file mode 100644 index 1343220..0000000 --- a/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf +++ /dev/null @@ -1,145 +0,0 @@ -Include.pcm_split.File "/common/pcm/split.conf" - -Macro [ - { - SplitPCM { - Name "minifuse2_stereo_out" - Direction Playback - Channels 2 - HWChannels 4 - HWChannelPos0 FL - HWChannelPos1 FR - HWChannelPos2 FL - HWChannelPos3 FR - } - } - { - SplitPCM { - Name "minifuse2_stereo_in" - Direction Capture - Channels 2 - HWChannels 4 - HWChannelPos0 FL - HWChannelPos1 FR - HWChannelPos2 FL - HWChannelPos3 FR - } - } - { - SplitPCM { - Name "minifuse2_mono_in" - Direction Capture - Channels 1 - HWChannels 4 - HWChannelPos0 MONO - HWChannelPos1 MONO - HWChannelPos2 MONO - HWChannelPos3 MONO - } - } -] - -SectionDevice."Line1" { - Comment "Main Output L/R" - - Value { - PlaybackPriority 300 - } - Macro.pcm_split.SplitPCMDevice { - Name "minifuse2_stereo_out" - Direction Playback - HWChannels 4 - Channels 2 - Channel0 0 - Channel1 1 - ChannelPos0 FL - ChannelPos1 FR - } -} - -SectionDevice."Line2" { - Comment "Loopback L/R" - - Value { - PlaybackPriority 200 - CapturePriority 200 - } - Macro.pcm_split1.SplitPCMDevice { - Name "minifuse2_stereo_out" - Direction Playback - HWChannels 4 - Channels 2 - Channel0 2 - Channel1 3 - ChannelPos0 FL - ChannelPos1 FR - } - Macro.pcm_split2.SplitPCMDevice { - Name "minifuse2_stereo_in" - Direction Capture - HWChannels 4 - Channels 2 - Channel0 2 - Channel1 3 - ChannelPos0 FL - ChannelPos1 FR - } -} - -SectionDevice."Line3" { - Comment "Stereo Input 1+2 L/R" - - Value { - CapturePriority 100 - } - Macro.pcm_split.SplitPCMDevice { - Name "minifuse2_stereo_in" - Direction Capture - HWChannels 4 - Channels 2 - Channel0 0 - Channel1 1 - ChannelPos0 FL - ChannelPos1 FR - } -} - -SectionDevice."Mic1" { - Comment "Mic/Line/Inst 1 (L)" - - ConflictingDevice [ - "Line3" - ] - - Value { - CapturePriority 400 - } - Macro.pcm_split2.SplitPCMDevice { - Name "minifuse2_mono_in" - Direction Capture - HWChannels 4 - Channels 1 - Channel0 0 - ChannelPos0 MONO - } -} - -SectionDevice."Mic2" { - Comment "Mic/Line/Inst 2 (R)" - - ConflictingDevice [ - "Line3" - ] - - Value { - CapturePriority 300 - } - Macro.pcm_split2.SplitPCMDevice { - Name "minifuse2_mono_in" - Direction Capture - HWChannels 4 - Channels 1 - Channel0 1 - ChannelPos0 MONO - } -} diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index bea0749..90a88d4 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -224,13 +224,13 @@ If.kontrolz1 { True.Define.ProfileName "NativeInstruments/Traktor-Kontrol-Z1" } -If.minifuse2 { +If.minifuse12 { Condition { - Type String - Haystack "${CardComponents}" - Needle "USB1c75:af90" + Type RegexMatch + String "${CardComponents}" + Regex "USB1c75:af[89]0" } - True.Define.ProfileName "Arturia/Minifuse-2" + True.Define.ProfileName "Arturia/Minifuse-12" } If.id4-0003 {