mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fix dB ops for global volume
Fixed dB ops for global volume.
This commit is contained in:
parent
7bed21e5a1
commit
4165a5bfd1
1 changed files with 6 additions and 1 deletions
|
|
@ -1103,7 +1103,12 @@ static int get_dB_ops(snd_mixer_elem_t *elem,
|
|||
c = &s->ctls[CTL_CAPTURE_VOLUME];
|
||||
else
|
||||
goto _err;
|
||||
if (c->type != 2)
|
||||
if (! c->elem) {
|
||||
c = &s->ctls[CTL_GLOBAL_VOLUME];
|
||||
if (! c->elem)
|
||||
goto _err;
|
||||
}
|
||||
if (c->type != SND_CTL_ELEM_TYPE_INTEGER)
|
||||
goto _err;
|
||||
if ((err = get_volume_ops(elem, dir, channel, &volume)) < 0)
|
||||
goto _err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue