mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
alsa-mixer: add required-any and required-* for enum options
Now you can add required-any to elements in a path and the path will be valid as long as at least one of the elements are present. Also you can have required, required-any and required-absent in element options, causing a path to be unsupported if an option is (not) present (simplified example: to skip line in path if "Capture source" doesn't have a "Line In" option). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
0ce3017b74
commit
b0f72311cf
3 changed files with 91 additions and 12 deletions
|
|
@ -112,6 +112,10 @@ struct pa_alsa_option {
|
|||
char *name;
|
||||
char *description;
|
||||
unsigned priority;
|
||||
|
||||
pa_alsa_required_t required;
|
||||
pa_alsa_required_t required_any;
|
||||
pa_alsa_required_t required_absent;
|
||||
};
|
||||
|
||||
/* And element wraps one specific ALSA element. A series of elements *
|
||||
|
|
@ -129,6 +133,7 @@ struct pa_alsa_element {
|
|||
pa_alsa_enumeration_use_t enumeration_use;
|
||||
|
||||
pa_alsa_required_t required;
|
||||
pa_alsa_required_t required_any;
|
||||
pa_alsa_required_t required_absent;
|
||||
|
||||
pa_bool_t override_map:1;
|
||||
|
|
@ -164,6 +169,9 @@ struct pa_alsa_path {
|
|||
pa_bool_t has_mute:1;
|
||||
pa_bool_t has_volume:1;
|
||||
pa_bool_t has_dB:1;
|
||||
/* These two are used during probing only */
|
||||
pa_bool_t has_req_any:1;
|
||||
pa_bool_t req_any_present:1;
|
||||
|
||||
long min_volume, max_volume;
|
||||
double min_dB, max_dB;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue