public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH/alsa-lib] amixer: fix 'cset' operation to set several channels
Date: Mon, 06 Apr 2015 09:13:42 +0200	[thread overview]
Message-ID: <s5hr3rxwwyh.wl-tiwai@suse.de> (raw)
In-Reply-To: <1428287450-3665-1-git-send-email-o-takashi@sakamocchi.jp>

At Mon,  6 Apr 2015 11:30:50 +0900,
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>

Did you really test this patch...?

amixer.c: In function ‘sset_enum’:
amixer.c:1295:5: error: ‘chn’ undeclared (first use in this function)
	  

Takashi

> ---
>  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;
> -- 
> 2.1.0
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2015-04-06  7:13 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 ` [PATCH/alsa-utils] " Takashi Sakamoto
2015-04-06  7:13 ` Takashi Iwai [this message]
2015-04-06  7:42   ` 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=s5hr3rxwwyh.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=o-takashi@sakamocchi.jp \
    /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