From: Jaroslav Kysela Date: Mon, 23 May 2022 16:44:45 +0000 (+0200) Subject: USB-Audio: Audient iD4 - use SplitPCM macro X-Git-Tag: v1.2.7~6 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=edff753fd22661a4208b30aa3af1307b7f78dff2;p=alsa-ucm-conf.git USB-Audio: Audient iD4 - use SplitPCM macro Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/USB-Audio/Audient/Audient-iD4-HiFi.conf b/ucm2/USB-Audio/Audient/Audient-iD4-HiFi.conf index cc3abc8..05a1d1e 100644 --- a/ucm2/USB-Audio/Audient/Audient-iD4-HiFi.conf +++ b/ucm2/USB-Audio/Audient/Audient-iD4-HiFi.conf @@ -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 } }