Subject: /usr/bin/amixer: report errors for invalid commands

From: Dan Jacobson <[email-masked]>
Date: Sat, 29 Nov 2003 10:16:34 +0800

Package: alsa-utils
Version: 0.9.6-1
Severity: normal
File: /usr/bin/amixer
Tags: upstream

The following proves that amixer accepts nonsense arguments with no
hint to the user that nothing was done,

$ amixer set Master,0 nocap; amixer|sum
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 23 [74%] [on]
  Front Right: Playback 23 [74%] [on]
63938     6
$ amixer set Master,0 cap; amixer|sum
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 23 [74%] [on]
  Front Right: Playback 23 [74%] [on]
63938     6

Furthermore, not even $? was set [shell error value].