]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: Audient iD4 - use SplitPCM macro
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2022 16:44:45 +0000 (18:44 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 27 May 2022 08:28:13 +0000 (10:28 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Audient/Audient-iD4-HiFi.conf

index cc3abc8190f245a3f91c79c51ceb50352693cd65..05a1d1ea9fe55391a8103e839bd21f5fb28d3a0a 100644 (file)
@@ -1,95 +1,47 @@
-LibraryConfig.pcm.Config {
-       pcm.id4_stereo_out {
-               @args [ CARD CHN0 CHN1 ]
-               @args {
-                       CARD.type string
-                       CHN0.type integer
-                       CHN1.type integer
-               }
-               type dshare
-               ipc_key 5678493
-               ipc_perm 0600
-               slave {
-                       pcm {
-                               type hw
-                               card $CARD
-                               device 0
-                       }
-                       channels 4
-               }
-               bindings.0 $CHN0
-               bindings.1 $CHN1
-       }
-
-       pcm.id4_stereo_in {
-               @args [ CARD CHN0 CHN1 ]
-               @args {
-                       CARD.type string
-                       CHN0.type integer
-                       CHN1.type integer
-               }
-               type dsnoop
-               ipc_key 5678493
-               ipc_perm 0600
-               slave {
-                       pcm {
-                               type hw
-                               card $CARD
-                               device 0
-                       }
-                       channels 4
-               }
-               bindings.0 $CHN0
-               bindings.1 $CHN1
-       }
+Include.pcm_split.File "/common/pcm/split.conf"
 
-       pcm.id4_monitor {
-               @args [ CARD ]
-               @args.CARD.type string
-               type empty
-               slave.pcm {
-                       @func concat
-                       strings [ "id4_stereo_out:" $CARD ",0,1" ]
+Macro [
+       {
+               SplitPCM {
+                       Name "id4_stereo_out"
+                       Direction Playback
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
                }
        }
-
-       pcm.id4_speaker {
-               @args [ CARD ]
-               @args.CARD.type string
-               type empty
-               slave.pcm {
-                       @func concat
-                       strings [ "id4_stereo_out:" $CARD ",2,3" ]
+       {
+               SplitPCM {
+                       Name "id4_stereo_in"
+                       Direction Capture
+                       Channels 2
+                       HWChannels 4
+                       HWChannelPos0 FL
+                       HWChannelPos1 FR
+                       HWChannelPos2 FL
+                       HWChannelPos3 FR
                }
        }
-
-       pcm.id4_mic {
-               @args [ CARD ]
-               @args.CARD.type string
-               type empty
-               slave.pcm {
-                       @func concat
-                       strings [ "id4_stereo_in:" $CARD ",0,1" ]
-               }
-       }
-
-       pcm.id4_di {
-               @args [ CARD ]
-               @args.CARD.type string
-               type empty
-               slave.pcm {
-                       @func concat
-                       strings [ "id4_stereo_in:" $CARD ",2,3" ]
-               }
-       }
-}
+]
 
 SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
                PlaybackPriority 100
-               PlaybackPCM "id4_speaker:${CardId}"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "id4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
        }
 }
 
@@ -98,7 +50,16 @@ SectionDevice."Headphones" {
 
        Value {
                PlaybackPriority 200
-               PlaybackPCM "id4_monitor:${CardId}"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "id4_stereo_out"
+               Direction Playback
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
        }
 }
 
@@ -107,15 +68,33 @@ SectionDevice."Mic" {
 
        Value {
                CapturePriority 200
-               CapturePCM "id4_mic:${CardId}"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "id4_stereo_in"
+               Direction Capture
+               HWChannels 4
+               Channels 2
+               Channel0 0
+               Channel1 1
+               ChannelPos0 FL
+               ChannelPos1 FR
        }
 }
 
-SectionDevice."Line2" {
-       Comment "Line In"
+SectionDevice."Line1" {
+       Comment "Line Input"
 
        Value {
                CapturePriority 100
-               CapturePCM "id4_di:${CardId}"
+       }
+       Macro.pcm_split.SplitPCMDevice {
+               Name "id4_stereo_in"
+               Direction Capture
+               HWChannels 4
+               Channels 2
+               Channel0 2
+               Channel1 3
+               ChannelPos0 FL
+               ChannelPos1 FR
        }
 }