]> git.alsa-project.org Git - alsa-lib.git/commit
UCM: Deprecate index on Section{Device,Modifier}
authorStephen Warren <swarren@nvidia.com>
Fri, 3 Jun 2011 20:56:30 +0000 (14:56 -0600)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Jun 2011 16:20:00 +0000 (18:20 +0200)
commit866fa538d4c23b0579b8232f0bf93ef68195a997
tree00fd12041387018448a0c1f29acf0cba3a86068f
parente1c876a2f0df6c658a5ea0ddde14ee7201fd124b
UCM: Deprecate index on Section{Device,Modifier}

The previous supported "legacy" syntax was:

SectionDevice."Speaker".0 {
SectionModifier."Capture Voice".0 {

This change supports new syntax:

SectionDevice."Speaker" {
SectionModifier."Capture Voice" {

... but also allows the old syntax, iff the index is exactly "0". If an
index is present, but not exactly "0", parsing will appear to succeed,
but produce an empty device or modifier.

When naming devices and modifiers, even if the legacy format is used,
any index is not included in the name; i.e. both sets of syntax above
name the device just "Speaker".

The SupportedDevice list syntax still also accepts either "x" or "x.0",
but internally strips ".0" from the tail of any device name. Any other
name including "." is disallowed.

Finally, when comparing device or modifier names, a simple exact string
compare is now used, since no index data is ever present in device or
modifier names.

The one functional change introduced here is that a SupportedDevice
entry of just "x" will now only ever match a single device. It previously
acted as a wildcard for any device named "x.foo".

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c
src/ucm/parser.c