]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
Behringer UCM204HD - use S32_LE format for dshare/dsnoop
authorJaroslav Kysela <perex@perex.cz>
Mon, 1 Aug 2022 15:48:48 +0000 (17:48 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 1 Aug 2022 15:48:50 +0000 (17:48 +0200)
BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/192
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/Behringer/UMC204HD-HiFi.conf
ucm2/common/pcm/split.conf

index ae0f477bf79a9e81c9c0f9a6bcf817e50a85a922..19660d214fcc10ac4c412f8367aed7f8574bed17 100644 (file)
@@ -5,6 +5,7 @@ Macro [
                SplitPCM {
                        Name "umc204hd_stereo_out"
                        Direction Playback
+                       Format S32_LE
                        Channels 2
                        HWChannels 4
                        HWChannelPos0 FL
@@ -17,6 +18,7 @@ Macro [
                SplitPCM {
                        Name "umc204hd_mono_in"
                        Direction Capture
+                       Format S32_LE
                        Channels 1
                        HWChannels 2
                        HWChannelPos0 MONO
index a92a3b21c249bda340eca4b36c79668dbaaaca88..be47f7264ddcf9bbc556a0c7175152ff8d98f878 100644 (file)
@@ -11,6 +11,7 @@
 # Arguments:
 #   Name - PCM name (alsa-lib)
 #   Direction - "Playback" or "Capture"
+#   [Format] - sample format like S16_LE or S32_LE
 #   Channels - application channels
 #   HWChannels - hardware channels
 #   HWChannelPos0 - channel position (MONO FR FL etc. - see alsa-lib's strings)
@@ -39,6 +40,13 @@ DefineMacro.SplitPCM.If.0 {
                        True.Define.__buffer_time 500000
                        False.Define.__buffer_time "${var:SplitPCMBufferTime}"
                }
+               If.format {
+                       Condition {
+                               Type String
+                               Empty "${var:-__Format}"
+                       }
+                       True.Define.__Format S16_LE
+               }
 
                LibraryConfig.pcm.SubstiConfig.pcm."${var:__Name}" {
                        @args [ CARD DEV CHN0 ]
@@ -56,6 +64,7 @@ DefineMacro.SplitPCM.If.0 {
                                        device $DEV
                                        chmap [ "${var:__HWChannelPos0}" ]
                                }
+                               format "${var:__Format}"
                                channels "${evali:$__HWChannels}"
                                period_time "${evali:$__period_time}"
                                buffer_time "${evali:$__buffer_time}"