Broken configuration for this PCM: no configurations available (chaining dsnoop and LADSPA)

Mathias Weyland <[email protected]> Mon, 17 May 2021 15:04:38 +0200
Newsgroups gmane.linux.alsa.user
Message-ID <[email protected]>
Hello

I have issues with the on-chip audio PHY of an Orange Pi Zero. This 
hardware seems to block the input stream if you
record from it ("audio open error: Device or resource busy"). The 
canonical workaround for this appears to be dsnoop.
Indeed, the following asound config allows for multiple simultaneous 
recorders:

pcm.dsnooped {
     type dsnoop
     ipc_key 321465
     slave {
         pcm "hw:0,0"
         channels 2
     }
}

However, I also wish to use LADSPA to filter my input. Thus, I have to 
chain the aforementioned "dsnooped" block
to a filter block, which I implemented as follows:

pcm.filtered {
     type ladspa
     slave.pcm "dsnooped";
     path "/usr/lib/ladspa";
     plugins [{
         label highpass_iir
         input {
             controls [ 200 10 ]
         }
     }]
}

Any attempt to record from this fails, however:

$ arecord -f dat -V stereo -Dplug:filtered test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, 
Stereo
ALSA lib pcm_params.c:2226:(snd1_pcm_hw_refine_slave) Slave PCM not 
usable
arecord: set_params:1310: Broken configuration for this PCM: no 
configurations available

The filter itself does, however, work: If I replace the slave line with

     slave.pcm "plughw:0,0";

then I get a proper recording, but once again I cannot record multiple 
streams simultaneously. I have some ideas
why this may be but I am unsure and generally lost when it comes down to 
addressing this. Thus, any help is
appreciated. This is not the first time I am fighting asoundrc, thus I 
would be particularly interested in how
to debug this, rather than what the solution is.

Software: Headless armbian buster with linux 5.10.34-sunxi and 
libasound2:armhf 1.1.8-1, no PA. alsa-info.sh here:

http://alsa-project.org/db/?f=8c730f1074ebfc0dc7726c3c0ee4ad2214608afe

Best regards and thank you

Matt