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

Takashi Sakamoto o-takashi at sakamocchi.jp
Mon Apr 6 09:42:02 CEST 2015


On Apr 06 2015 16:13, Takashi Iwai wrote:
> 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 at 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)

I workd on 6f9835f. After testing, rebase to current master. Then I 
missed 1a19ec1. I should have compile again in this tree. (missing 
enough caution...)

Well, I think the 1a19ec1 still includes a bug. It cannot parse this 
option correctly.

$ amixer sset enum-element-13,1019 A,B,,D

In this case, no values should be set to the third channel of the 
element. But current implementation set D to the channel and the last 
channel is not changed.

I'll post a new patch, later.


Thanks for your indication.

Takashi Sakamoto


More information about the Alsa-devel mailing list