mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
core: Internally deprecate pa_port_available_t to use pa_available_t
Generalize the availability flag in order to be used beyond the scope of ports. However, pa_port_availability_t is left unchanged to avoid modifying the protocol and the client API. This should be replaced by pa_available_t after a validation phase of this new generic enum type.
This commit is contained in:
parent
3aefdd995c
commit
8851644a3c
12 changed files with 68 additions and 58 deletions
|
|
@ -313,11 +313,11 @@ static void report_port_state(pa_device_port *p, struct userdata *u)
|
|||
{
|
||||
void *state;
|
||||
pa_alsa_jack *jack;
|
||||
pa_port_available_t pa = PA_PORT_AVAILABLE_UNKNOWN;
|
||||
pa_available_t pa = PA_AVAILABLE_UNKNOWN;
|
||||
pa_device_port *port;
|
||||
|
||||
PA_HASHMAP_FOREACH(jack, u->jacks, state) {
|
||||
pa_port_available_t cpa;
|
||||
pa_available_t cpa;
|
||||
|
||||
if (u->use_ucm)
|
||||
port = pa_hashmap_get(u->card->ports, jack->name);
|
||||
|
|
@ -334,11 +334,11 @@ static void report_port_state(pa_device_port *p, struct userdata *u)
|
|||
cpa = jack->plugged_in ? jack->state_plugged : jack->state_unplugged;
|
||||
|
||||
/* "Yes" and "no" trumphs "unknown" if we have more than one jack */
|
||||
if (cpa == PA_PORT_AVAILABLE_UNKNOWN)
|
||||
if (cpa == PA_AVAILABLE_UNKNOWN)
|
||||
continue;
|
||||
|
||||
if ((cpa == PA_PORT_AVAILABLE_NO && pa == PA_PORT_AVAILABLE_YES) ||
|
||||
(pa == PA_PORT_AVAILABLE_NO && cpa == PA_PORT_AVAILABLE_YES))
|
||||
if ((cpa == PA_AVAILABLE_NO && pa == PA_AVAILABLE_YES) ||
|
||||
(pa == PA_AVAILABLE_NO && cpa == PA_AVAILABLE_YES))
|
||||
pa_log_warn("Availability of port '%s' is inconsistent!", p->name);
|
||||
else
|
||||
pa = cpa;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue