mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-26 01:40:07 -05:00
pcm: use new APIs to add a control element set for softvol plugin
In previous commit, some APIs to add a single element are discouraged to continue using. This commit replaces usage of the old APIs with new APIs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1680ea4768
commit
d932e0184c
1 changed files with 4 additions and 3 deletions
|
|
@ -670,10 +670,11 @@ static int add_user_ctl(snd_pcm_softvol_t *svol, snd_ctl_elem_info_t *cinfo, int
|
||||||
unsigned int def_val;
|
unsigned int def_val;
|
||||||
|
|
||||||
if (svol->max_val == 1)
|
if (svol->max_val == 1)
|
||||||
err = snd_ctl_elem_add_boolean(svol->ctl, &cinfo->id, count);
|
err = snd_ctl_elem_add_boolean_set(svol->ctl, &cinfo->id, 1,
|
||||||
|
count);
|
||||||
else
|
else
|
||||||
err = snd_ctl_elem_add_integer(svol->ctl, &cinfo->id, count,
|
err = snd_ctl_elem_add_integer_set(svol->ctl, &cinfo->id, 1,
|
||||||
0, svol->max_val, 0);
|
count, 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