mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
accept enum items for other volumes and switches.
This commit is contained in:
parent
7f3942d827
commit
3b6ee2ad97
1 changed files with 8 additions and 0 deletions
|
|
@ -887,12 +887,20 @@ static int simple_add1(snd_mixer_class_t *class, const char *name,
|
||||||
case CTL_GLOBAL_SWITCH:
|
case CTL_GLOBAL_SWITCH:
|
||||||
case CTL_PLAYBACK_SWITCH:
|
case CTL_PLAYBACK_SWITCH:
|
||||||
case CTL_CAPTURE_SWITCH:
|
case CTL_CAPTURE_SWITCH:
|
||||||
|
if (info.type == SND_CTL_ELEM_TYPE_ENUMERATED) {
|
||||||
|
type = CTL_ENUMLIST;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (info.type != SND_CTL_ELEM_TYPE_BOOLEAN)
|
if (info.type != SND_CTL_ELEM_TYPE_BOOLEAN)
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case CTL_GLOBAL_VOLUME:
|
case CTL_GLOBAL_VOLUME:
|
||||||
case CTL_PLAYBACK_VOLUME:
|
case CTL_PLAYBACK_VOLUME:
|
||||||
case CTL_CAPTURE_VOLUME:
|
case CTL_CAPTURE_VOLUME:
|
||||||
|
if (info.type == SND_CTL_ELEM_TYPE_ENUMERATED) {
|
||||||
|
type = CTL_ENUMLIST;
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (info.type != SND_CTL_ELEM_TYPE_INTEGER)
|
if (info.type != SND_CTL_ELEM_TYPE_INTEGER)
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue