Hey, On Wed, 25 Mar 2020, sylvain.bertrand@xxxxxxxxx wrote: > On this issue, I am doing something fundamentaly wrong, but I don't see how to > do it right. > > While configuring a pcm, I should not use sw_params if it is a "direct-ed" > (direct::dmix) real hw pcm: in pcm_direct.c, snd_pcm_direct_sw_params > function is empty and it seems coherent with the fact the real hw pcm is > actually shared and was probably already configured. how does the problem appear in your program? Applications should just use the ALSA PCM API and not have any special casing for different types of PCMs (unless the differences show up via the public PCM API). If applications started doing plugin specifics, writing and deploying new ALSA plugins would become much harder and kind of defeat the whole purpose of the plugin API. In case of dmix, the pcm.c:snd_pcm_sw_params() should do the right thing and your application should get the cached values. Br, Kai