[Pkg-alsa-devel] [PATCH] amixer and special 'front...' channels

David Decotigny com.d2 at free.fr
Sat Jul 7 20:22:13 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

Imagine you have this kind of control:

Simple mixer control 'Input Source',0
  Capabilities: enum
  Items: 'Mic' 'Front Mic' 'Line'
  Item0: 'Mic'

... and you want to set it to 'Front Mic':

shell> amixer sset 'Input Source' 'Front Mic'
Simple mixer control 'Input Source',0
  Capabilities: enum
  Items: 'Mic' 'Front Mic' 'Line'
  Item0: 'Mic'

This does not work ! Because amixer will think that 'Front' is a
modifier for 'Mic'.

Attached is a patch against alsa-utils-1.0.13-1ubuntu5 that solves this.
With this patch, one can bypass the modifier parsing: one simply escapes
the parameter with one or more backslash(es), and that's all:

shell> amixer sset 'Input Source' '\Front Mic'
Simple mixer control 'Input Source',0
  Capabilities: enum
  Items: 'Mic' 'Front Mic' 'Line'
  Item0: 'Front Mic'

What this patch also does, is that it adds correct identification of
items. With the original version, given the following enumeration:
  foo foobar
Then the parameter 'foobar' will be identified as 'foo', not 'foobar'.
The patch should solve this potential problem (not tested though).

Bye,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGj/X0ld7vhusVrCERAjIZAJ9w9GLD+QBwDCaTs32hpW6i9nVMfgCfdS5w
jhipZ2jm87fq4zx4f5Q9Vsc=
=M2KP
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: au.diff
Type: text/x-patch
Size: 2416 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/attachments/20070707/3d764d82/attachment.bin 


More information about the Pkg-alsa-devel mailing list