alsa-mixer: Introduce "description-key" option for paths

Previously the path description was looked up based on the
path name only. Since there can be multiple paths that use
the same description, it had to be possible to have multiple
paths with the same name.

Having the same name with multiple paths makes identifying
the paths more complex than necessary, so the plan is to
make it impossible to have paths with the same name. This
patch prepares for that by retaining the possibility to
still have the same description with multiple paths. Instead
of the path name, the path description is looked up by using
the "path description key" if it is set (path name is still
used as a fallback lookup key).
This commit is contained in:
Tanu Kaskinen 2012-06-29 18:04:57 +03:00 committed by Arun Raghavan
parent 66aeea7f72
commit 3c1ca6d4b8
20 changed files with 43 additions and 27 deletions

View file

@ -55,7 +55,13 @@
; [General]
; priority = ... # Priority for this path
; description = ...
; description-key = ... # The path description is looked up from a table in path_verify() in
; # src/modules/alsa/alsa-mixer.c. By default the path name (i.e. the file name
; # minus the ".conf" suffix) is used as the lookup key, but if this option is
; # set, then the given string is used as the key instead. In any case the
; # "description" option can be used to override the path description.
; description = ... # Description for this path. Overrides the normal description lookup logic, as
; # described in the "description-key" documentation above.
; mute-during-activation = yes | no # If this path supports hardware mute, should the hw mute be used while activating this
; # path? In some cases this can reduce extra noises during port switching, while in other
; # cases this can increase such noises. Default: no.