]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added more sort rules
authorJaroslav Kysela <perex@perex.cz>
Fri, 16 Mar 2001 16:46:05 +0000 (16:46 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 16 Mar 2001 16:46:05 +0000 (16:46 +0000)
src/control/hcontrol.c
src/mixer/simple.c

index 00e8ee4d9461b4afba3800d5c35b8048637bcff8..572e45dfee8c860a87ad62cedbcee31ac1f25b38 100644 (file)
@@ -170,12 +170,18 @@ static int get_compare_weight(const char *name)
                "Rear",
                "Pan",
                "Output",
+               "-",
                NULL
        };
        static char *names2[] = {
                "Switch",
                "Volume",
                "Bypass",
+               "Depth",
+               "Wide",
+               "Space",
+               "Level",
+               "Center",
                NULL
        };
        int res, res1;
index 6acf94731165446804b322eb1c564182945f203a..492598ddf832762a271bdfad3674d2298f484209 100644 (file)
@@ -110,8 +110,15 @@ static int get_compare_weight(const char *name, int index)
                "Master",
                "Master Mono",
                "Master Digital",
+               "Headphone",
                "Bass",
                "Treble",
+               "3D Control - Switch",
+               "3D Control - Depth",
+               "3D Control - Wide",
+               "3D Control - Space",
+               "3D Control - Level",
+               "3D Control - Center",
                "PCM",
                "Surround",
                "Synth",
@@ -633,7 +640,8 @@ static int base_len(const char *name, selem_ctl_type_t *type)
                size_t l;
                if (nlen > slen) {
                        l = nlen - slen;
-                       if (strncmp(name + l, p->suffix, slen) == 0) {
+                       if (strncmp(name + l, p->suffix, slen) == 0 &&
+                           (l < 1 || name[l-1] != '-')) {      /* 3D Control - Switch */
                                *type = p->type;
                                return l;
                        }