All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: clemens@ladisch.de, tiwai@suse.de
Cc: alsa-devel@alsa-project.org, ffado-devel@lists.sf.net
Subject: [PATCH 07/10] pcm: use new APIs to add a control element set for softvol plugin
Date: Sun, 12 Jun 2016 17:16:08 +0900	[thread overview]
Message-ID: <1465719371-27721-8-git-send-email-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <1465719371-27721-1-git-send-email-o-takashi@sakamocchi.jp>

In previous commit, some APIs to add a single element are deprecated.

This commit replaces the usage of the old APIs with new APIs.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 src/pcm/pcm_softvol.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/pcm/pcm_softvol.c b/src/pcm/pcm_softvol.c
index 5492db8..459ff8e 100644
--- a/src/pcm/pcm_softvol.c
+++ b/src/pcm/pcm_softvol.c
@@ -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;
 	
 	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
-		err = snd_ctl_elem_add_integer(svol->ctl, &cinfo->id, count,
-					       0, svol->max_val, 0);
+		err = snd_ctl_elem_add_integer_set(svol->ctl, &cinfo->id, 1,
+						   count, 0, svol->max_val, 0);
 	if (err < 0)
 		return err;
 	if (svol->max_val == 1)
-- 
2.7.4

  parent reply	other threads:[~2016-06-12  8:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12  8:16 [alsa-lib][PATCH 00/10 v2] ctl: add APIs for control element set Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 01/10] ctl: add an overview for design of ALSA control interface Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 02/10] ctl: improve comments for handling element data Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 03/10] ctl: add functions to add an element set Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 04/10] ctl: improve comments for API to add an element of IEC958 type Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 05/10] ctl: change former APIs as wrapper functions of element set APIs Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 06/10] ctl: deprecate APIs to add an element set with a single element Takashi Sakamoto
2016-06-13 12:51   ` Takashi Iwai
2016-06-14 11:25     ` Takashi Sakamoto
2016-06-14 11:46       ` Takashi Iwai
2016-06-15  6:57         ` Takashi Sakamoto
2016-06-15  6:59           ` Takashi Iwai
2016-06-15  7:23             ` Takashi Sakamoto
2016-06-12  8:16 ` Takashi Sakamoto [this message]
2016-06-12  8:16 ` [PATCH 08/10] ctl: add explaination about threshold level feature Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 09/10] ctl: improve API documentation for threshold level operations Takashi Sakamoto
2016-06-12  8:16 ` [PATCH 10/10] ctl: add test program for control element set Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465719371-27721-8-git-send-email-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=ffado-devel@lists.sf.net \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.