]> git.alsa-project.org Git - alsa-lib.git/commitdiff
conf: namehint - add omit_noargs to the hint section
authorJaroslav Kysela <perex@perex.cz>
Sun, 1 Mar 2020 18:57:06 +0000 (19:57 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 2 Mar 2020 08:45:55 +0000 (09:45 +0100)
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>
src/conf/pcm/surround21.conf
src/conf/pcm/surround40.conf
src/conf/pcm/surround41.conf
src/conf/pcm/surround50.conf
src/conf/pcm/surround51.conf
src/conf/pcm/surround71.conf
src/control/namehint.c

index 1cf1b7af8dc6080bc8dc05f6da9c1fca0a496458..ad19507bba58271adfac15d8d3baf154f791e5bf 100644 (file)
@@ -57,5 +57,6 @@ pcm.!surround21 {
        hint {
                description "2.1 Surround output to Front and Subwoofer speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index 9788ad4884fd3ee9d957cb674d5411880fab3df8..7c615022f5006f9dae9ae066db0a613eb69e54eb 100644 (file)
@@ -55,5 +55,6 @@ pcm.!surround40 {
        hint {
                description "4.0 Surround output to Front and Rear speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index 7b4ef3beb43adf313320e9f9640a7b6a98f4837e..cb6c0445ae07127781aba825f6437e4ada06fbdc 100644 (file)
@@ -61,5 +61,6 @@ pcm.!surround41 {
        hint {
                description "4.1 Surround output to Front, Rear and Subwoofer speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index 7d9a9e798fd86ab563ae289d3158adabac2ffd80..70d54069f8a3bd6cea149424b4e6c70cce01183d 100644 (file)
@@ -61,5 +61,6 @@ pcm.!surround50 {
        hint {
                description "5.0 Surround output to Front, Center and Rear speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index e67f007ef305e8916b3c675a043033f92b315570..d0236e42d3329c387cbb2f5972c18f191fea2bd7 100644 (file)
@@ -57,5 +57,6 @@ pcm.!surround51 {
        hint {
                description "5.1 Surround output to Front, Center, Rear and Subwoofer speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index a26c3f36c437e8c746af988c1c93cf04444c2b52..66792ddebbc030d38bd5eb218580dd1d2d7960f4 100644 (file)
@@ -59,5 +59,6 @@ pcm.!surround71 {
        hint {
                description "7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"
                device_output $DEV
+               omit_noargs true
        }
 }
index 60c48ae32877a2f1adabc0c55dffc5c4d41d94e3..169bd4215fc55f2290d275b350d4dc5890f3da54 100644 (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) {