alsa-project/alsa-ucm-conf issue #646 was opened from karcsesz:
I have a Behringer XR18 that I am currently trying to write a custom UCM profile for that splits its 18x18 audio interface into separate mono and stereo virtual devices.
I am able to create mono devices using the `SplitPCM` and `SplitPCMDevice` macros, however only when none of the channels higher than Channel0 are defined, as the created Capture/PlaybackPCM configuration values have the channel IDs duplicated:
``` $ alsaucm -c3 dump text [snip] Verb."18x18 Stereo" { Comment "9x9 Stereo Duplex" Device."Ch1 In" { Comment "Ch1 from" Values { CaptureCTL "_ucm0001.hw:XR18" CaptureChannels 2 CapturePCM "_ucm0001.behringer_xr18_stereo_in:XR18,0,0,1,1" PlaybackCTL "_ucm0001.hw:XR18" } } Device."Ch2 In" { Comment "Ch2 from" Values { CaptureCTL "_ucm0001.hw:XR18" CaptureChannels 2 CapturePCM "_ucm0001.behringer_xr18_stereo_in:XR18,0,2,3,3" PlaybackCTL "_ucm0001.hw:XR18" } } [snip] ```
`spa-acp-tool` also fails to find the PCM devices due to this issue ``` $ spa-acp-tool -vvv -c3 [snip] I alsa-ucm.c:2567 Probing profile 18x18 Stereo I alsa-ucm.c:2571 Set ucm verb to 18x18 Stereo D alsa-util.c:714 Trying _ucm0001.behringer_xr18_stereo_in:XR18,0,16,17,17 with SND_PCM_NO_AUTO_FORMAT ... I conf.c:5541 Unknown parameter 4 I conf.c:5712 Parse arguments error: No such file or directory I pcm.c:2722 Unknown PCM behringer_xr18_stereo_in:XR18,0,16,17,17 I alsa-util.c:721 Error opening PCM device _ucm0001.behringer_xr18_stereo_in:XR18,0,16,17,17: No such file or directory I alsa-ucm.c:2611 Profile '18x18 Stereo' mapping '18x18 Stereo: Ch9 In: source': input PCM open failed I alsa-ucm.c:2621 Profile 18x18 Stereo not supported ``` Appropriate snippet from the verb configuration: ``` Include.pcm_split.File "/common/pcm/split.conf"
Macro [ [snip] { SplitPCM { Name "behringer_xr18_stereo_in" Direction Capture Format S24_3LE Channels 2 HWChannels 18 HWChannelPos0 FL HWChannelPos1 FR HWChannelPos2 FL HWChannelPos3 FR HWChannelPos4 FL HWChannelPos5 FR HWChannelPos6 FL HWChannelPos7 FR HWChannelPos8 FL HWChannelPos9 FR HWChannelPos10 FL HWChannelPos11 FR HWChannelPos12 FL HWChannelPos13 FR HWChannelPos14 FL HWChannelPos15 FR HWChannelPos16 FL HWChannelPos17 FR } } [snip] ] [snip] SectionDevice."Ch1 In" { Comment "Ch1 from" Macro.pcm_split.SplitPCMDevice { Name "behringer_xr18_stereo_in" Direction Capture HwChannels 18 Channels 2 Channel0 0 Channel1 1 ChannelPos0 FL ChannelPos1 FR } }
SectionDevice."Ch2 In" { Comment "Ch2 from" Macro.pcm_split.SplitPCMDevice { Name "behringer_xr18_stereo_in" Direction Capture HwChannels 18 Channels 2 Channel0 2 Channel1 3 ChannelPos0 FL ChannelPos1 FR } } [snip] ```
My current hunch is the append within the `SplitPCMDevice_addchn` macro somehow getting called twice (maybe due to [evaluation restart](https://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm__conf.html#autotoc...)
[alsa-info.txt](https://github.com/user-attachments/files/23665421/alsa-info.txt)
Issue URL : https://github.com/alsa-project/alsa-ucm-conf/issues/646 Repository URL: https://github.com/alsa-project/alsa-ucm-conf