From: Clément Hermann Date: Sat, 12 Mar 2022 20:56:03 +0000 (+0100) Subject: USB-Audio: Add Use Case for Arturia Minifuse 2 X-Git-Tag: v1.2.7~10 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=cecce9ea791c43a0bb179be19a9c28b911c2d241;p=alsa-ucm-conf.git USB-Audio: Add Use Case for Arturia Minifuse 2 Arturia Minifuse 2 (https://www.arturia.com/products/audio/minifuse/minifuse2) is an USB audio interface with 2 mono inputs and 2 channel outputs. It uses 1 subinterface with 4 capture and 4 playback channels: Capture channels: - Mic/Line/Inst 1 (Mono) - Mic/Line/Inst 2 (Mono) - Loopback (Stereo, L+R) Playback: - Main (Stereo, L+R) - Loopback (L+R) The Loopback capture and playback are intended to ease recording sound from the computer, e.g if you're doing a podcast and want to record something that plays from the computer. Of course us linux user don't need that, since we have many tools able to do that. However, without a dedicated use case, alsa treats the channels as surround 4.0, which make the card difficult to use. At this stage, no controls are available. TODO/FIXMEs: - add a channel map override on the pcm device ? Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/145 Signed-off-by: Clément Hermann Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf b/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf new file mode 100644 index 0000000..282fb5e --- /dev/null +++ b/ucm2/USB-Audio/Arturia/Minifuse-2-HiFi.conf @@ -0,0 +1,179 @@ +LibraryConfig.pcm.Config { + + pcm.minifuse2_stereo_p { + @args [ CARD CHN0 CHN1 ] + @args { + CARD.type string + CHN0.type integer + CHN1.type integer + } + type dshare + ipc_key 583542 + slave { + pcm { + type hw + card $CARD + device 0 + } + channels 4 + } + bindings.0 $CHN0 + bindings.1 $CHN1 + } + + pcm.minifuse2_stereo_c { + @args [ CARD CHN0 CHN1 ] + @args { + CARD.type string + CHN0.type integer + CHN1.type integer + } + type dsnoop + ipc_key 583542 + slave { + pcm { + type hw + card $CARD + device 0 + } + channels 4 + } + bindings.0 $CHN0 + bindings.1 $CHN1 + } + + pcm.minifuse2_mono_c { + @args [ CARD CHN0 ] + @args { + CARD.type string + CHN0.type integer + } + type dsnoop + ipc_key 583542 + slave { + pcm { + type hw + card $CARD + device 0 + } + channels 4 + } + bindings.0 $CHN0 + } + + pcm.minifuse2_main_p { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_stereo_p:" $CARD ",0,1" ] + } + } + + pcm.minifuse2_loopback_p { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_stereo_p:" $CARD ",2,3" ] + } + } + + pcm.minifuse2_loopback_c { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_stereo_c:" $CARD ",2,3" ] + } + } + + pcm.minifuse2_mic1_c { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_mono_c:" $CARD ",0" ] + } + } + + pcm.minifuse2_mic2_c { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_mono_c:" $CARD ",1" ] + } + } + + pcm.minifuse2_combo_c { + @args [ CARD ] + @args.CARD.type string + type empty + slave.pcm { + @func concat + strings [ "minifuse2_stereo_c:" $CARD ",0,1" ] + } + } +} + +SectionDevice."Main" { + Comment "Main Playback L/R" + Value { + PlaybackPriority 300 + PlaybackChannels 2 + PlaybackPCM "minifuse2_main_p:${CardId}" + } +} + +SectionDevice."Loopback_p" { + Comment "Loopback Playback L/R" + Value { + PlaybackPriority 200 + PlaybackChannels 2 + PlaybackPCM "minifuse2_loopback_p:${CardId}" + } +} + +SectionDevice."Loopback_c" { + Comment "Loopback Capture L/R" + Value { + CapturePriority 200 + CaptureChannels 2 + CapturePCM "minifuse2_loopback_c:${CardId}" + } +} + +SectionDevice."Combo_c" { + Comment "Stereo Capture 1+2 L/R" + Value { + CapturePriority 100 + CaptureChannels 2 + CapturePCM "minifuse2_combo_c:${CardId}" + } +} + +SectionDevice."Mic1" { + Comment "Mic/Line/Inst 1 (L)" + + Value { + CapturePriority 300 + CaptureChannels 1 + CapturePCM "minifuse2_mic1_c:${CardId}" + } +} + +SectionDevice."Mic2" { + Comment "Mic/Line/Inst 2 (R)" + + Value { + CapturePriority 200 + CaptureChannels 1 + CapturePCM "minifuse2_mic2_c:${CardId}" + } +} diff --git a/ucm2/USB-Audio/Arturia/Minifuse-2.conf b/ucm2/USB-Audio/Arturia/Minifuse-2.conf new file mode 100644 index 0000000..492d521 --- /dev/null +++ b/ucm2/USB-Audio/Arturia/Minifuse-2.conf @@ -0,0 +1,5 @@ +Comment "Arturia Minifuse 2" +SectionUseCase."HiFi" { + Comment "Default Alsa Profile" + File "/USB-Audio/Arturia/Minifuse-2-HiFi.conf" +} diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index c495981..14c6a4f 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -129,6 +129,15 @@ If.mixremap { } } +If.minifuse2 { + Condition { + Type String + Haystack "${CardComponents}" + Needle "USB1c75:af90" + } + True.Define.ProfileName "Arturia/Minifuse-2" +} + If.inc { Condition { Type String