public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@alsa-project.org, perex@perex.cz
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH/alsa-utils] amixer: fix 'cset' operation to set several channels
Date: Mon, 06 Apr 2015 11:33:45 +0900	[thread overview]
Message-ID: <5521F089.6000702@sakamocchi.jp> (raw)
In-Reply-To: <1428287450-3665-1-git-send-email-o-takashi@sakamocchi.jp>

 > [PATCH/alsa-lib] amixer: fix 'cset' operation to set several channels

Oops. This patch is for alsa-utils, sorry...

On Apr 06 2015 11:30, Takashi Sakamoto wrote:
> For an enumerated element with several channels, when given comma-separated
> string values, 'cset' operation sets these values just to the first channel,
> instead of corresponding channels.
>
> This commit adds missing-increment to fix this bug.
>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
>   amixer/amixer.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/amixer/amixer.c b/amixer/amixer.c
> index 36c92eb..e9fe735 100644
> --- a/amixer/amixer.c
> +++ b/amixer/amixer.c
> @@ -1290,8 +1290,10 @@ static int sset_enum(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
>   			if (snd_mixer_selem_set_enum_item(elem, item++, ival) >= 0)
>   				check_flag = 1;
>   			/* skip separators */
> -			while (*ptr == ',' || isspace(*ptr))
> +			while (*ptr == ',' || isspace(*ptr)) {
>   				ptr++;
> +				chn++;
> +			}
>   		}
>   	}
>   	return check_flag;
>

  reply	other threads:[~2015-04-06  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06  2:30 [PATCH/alsa-lib] amixer: fix 'cset' operation to set several channels Takashi Sakamoto
2015-04-06  2:33 ` Takashi Sakamoto [this message]
2015-04-06  7:13 ` Takashi Iwai
2015-04-06  7:42   ` [PATCH/alsa-utils] " 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=5521F089.6000702@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=perex@perex.cz \
    --cc=tiwai@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox