mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
device-port: introduce available_group member
In some cases, the I/O connector functionality can be shared and we cannot determine the proper purpose automatically. We just know that something was inserted to the jack. Introduce a group identifier (a simple string - unique per group) which helps to determine the proper ports for the application. The user interface may be used to set the wanted behaviour. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
9315bbdfe5
commit
861836c5f7
7 changed files with 54 additions and 8 deletions
|
|
@ -3205,8 +3205,11 @@ static void sink_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sin
|
|||
pa_tagstruct_puts(t, p->name);
|
||||
pa_tagstruct_puts(t, p->description);
|
||||
pa_tagstruct_putu32(t, p->priority);
|
||||
if (c->version >= 24)
|
||||
if (c->version >= 24) {
|
||||
pa_tagstruct_putu32(t, p->available);
|
||||
if (c->version >= 34)
|
||||
pa_tagstruct_puts(t, p->available_group);
|
||||
}
|
||||
}
|
||||
|
||||
pa_tagstruct_puts(t, sink->active_port ? sink->active_port->name : NULL);
|
||||
|
|
@ -3275,8 +3278,11 @@ static void source_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_s
|
|||
pa_tagstruct_puts(t, p->name);
|
||||
pa_tagstruct_puts(t, p->description);
|
||||
pa_tagstruct_putu32(t, p->priority);
|
||||
if (c->version >= 24)
|
||||
if (c->version >= 24) {
|
||||
pa_tagstruct_putu32(t, p->available);
|
||||
if (c->version >= 34)
|
||||
pa_tagstruct_puts(t, p->available_group);
|
||||
}
|
||||
}
|
||||
|
||||
pa_tagstruct_puts(t, source->active_port ? source->active_port->name : NULL);
|
||||
|
|
@ -3358,8 +3364,11 @@ static void card_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_car
|
|||
PA_HASHMAP_FOREACH(p, port->profiles, state2)
|
||||
pa_tagstruct_puts(t, p->name);
|
||||
|
||||
if (c->version >= 27)
|
||||
if (c->version >= 27) {
|
||||
pa_tagstruct_puts64(t, port->latency_offset);
|
||||
if (c->version >= 34)
|
||||
pa_tagstruct_puts(t, port->available_group);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue