pulse-server: add port_type and availability-group

This commit is contained in:
Wim Taymans 2020-10-28 12:18:26 +01:00
parent 8116da41b9
commit 0320eca79e
4 changed files with 77 additions and 10 deletions

View file

@ -88,7 +88,7 @@ enum acp_available {
const char *acp_available_str(enum acp_available status);
#define ACP_KEY_PORT_TYPE "port.type" /**< a Port type, like "aux", "speaker", ... */
#define ACP_KEY_PORT_AVAILABLE_GROUP "port.available-group"
#define ACP_KEY_PORT_AVAILABILITY_GROUP "port.availability-group"
/**< An indentifier for the group of ports that share their availability status with
* each other. This is meant especially for handling cases where one 3.5 mm connector
* is used for headphones, headsets and microphones, and the hardware can only tell

View file

@ -139,7 +139,7 @@ pa_device_port *pa_device_port_new(pa_core *c, pa_device_port_new_data *data, si
p->proplist = pa_proplist_new();
pa_proplist_sets(p->proplist, ACP_KEY_PORT_TYPE, str_port_type(data->type));
if (p->availability_group)
pa_proplist_sets(p->proplist, ACP_KEY_PORT_AVAILABLE_GROUP, p->availability_group);
pa_proplist_sets(p->proplist, ACP_KEY_PORT_AVAILABILITY_GROUP, p->availability_group);
p->user_data = (void*)((uint8_t*)p + sizeof(pa_device_port));