mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-26 07:57:57 -04:00
pcm: softvol - do not set TLV access flags for the switch
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
bbd32bbd37
commit
112166dc81
1 changed files with 4 additions and 2 deletions
|
|
@ -725,11 +725,13 @@ static int add_user_ctl(snd_pcm_softvol_t *svol, snd_ctl_elem_info_t *cinfo,
|
||||||
int i;
|
int i;
|
||||||
unsigned int def_val;
|
unsigned int def_val;
|
||||||
|
|
||||||
if (svol->max_val == 1)
|
if (svol->max_val == 1) {
|
||||||
|
snd_ctl_elem_info_set_read_write(cinfo, 1, 1);
|
||||||
err = snd_ctl_add_boolean_elem_set(svol->ctl, cinfo, 1, count);
|
err = snd_ctl_add_boolean_elem_set(svol->ctl, cinfo, 1, count);
|
||||||
else
|
} else {
|
||||||
err = snd_ctl_add_integer_elem_set(svol->ctl, cinfo, 1, count,
|
err = snd_ctl_add_integer_elem_set(svol->ctl, cinfo, 1, count,
|
||||||
0, svol->max_val, 0);
|
0, svol->max_val, 0);
|
||||||
|
}
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
if (svol->max_val == 1)
|
if (svol->max_val == 1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue