mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
Added more sort rules
This commit is contained in:
parent
877896069d
commit
0300bbbbb3
2 changed files with 15 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue