On 07. 12. 21 4:20, Takashi Sakamoto wrote:
As another topic, the runtime of alsa-lib application largely differs between process user due to the result of parsing text files for configuration space. I can easily imagine that developers unfamiliar to alsa-lib carelessly adds invalid or inadequate configurations to files under target path of alsa-lib configuration space, and they are puzzled since they are unaware of the fact that the kselftest is affected by userspace stuffs for the runtime.
The alsa-lib configuration can be restricted. I would suggest to use snd_ctl_open_lconf() function with a simple configuration which defines only ctl.hw device. In this case, the global configuration is not used, so the user errors are eliminated. Another way is to use the environment variable for the global alsa-lib configuration - ALSA_CONFIG_DIR.
I will try prepare a patch for snd_ctl_open_lconf().
Jaroslav
BTW: Thank you Mark for this test.