mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04: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
|
|
@ -1034,9 +1034,15 @@ static int read_ports(struct userdata *u, pa_tagstruct *t) {
|
|||
pa_log("Parse failure");
|
||||
return -PA_ERR_PROTOCOL;
|
||||
}
|
||||
if (u->version >= 24 && pa_tagstruct_getu32(t, &priority) < 0) { /* available */
|
||||
pa_log("Parse failure");
|
||||
return -PA_ERR_PROTOCOL;
|
||||
if (u->version >= 24) {
|
||||
if (pa_tagstruct_getu32(t, &priority) < 0) { /* available */
|
||||
pa_log("Parse failure");
|
||||
return -PA_ERR_PROTOCOL;
|
||||
}
|
||||
if (u->version >= 34 && pa_tagstruct_gets(t, &s) < 0) { /* available_group */
|
||||
pa_log("Parse failure");
|
||||
return -PA_ERR_PROTOCOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue