conf: namehint - add omit_noargs to the hint section

Do not list simple surround devices in the namehint function by default.

Fixes: https://github.com/alsa-project/alsa-lib/issues/27

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2020-03-01 19:57:06 +01:00
parent 27c7927842
commit 09e78da4ca
7 changed files with 11 additions and 1 deletions

View file

@ -287,10 +287,14 @@ static int try_config(snd_config_t *config,
err = -EINVAL;
goto __cleanup;
}
if (list->card < 0 &&
snd_config_search(cfg, "omit_noargs", &n) >= 0 &&
snd_config_get_bool(n) > 0)
goto __skip_add;
if (level == 1 &&
snd_config_search(cfg, "show", &n) >= 0 &&
snd_config_get_bool(n) <= 0)
goto __skip_add;
goto __skip_add;
if (buf1 == NULL &&
snd_config_search(cfg, "description", &n) >= 0 &&
snd_config_get_string(n, &str) >= 0) {