mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
Notify port available status changes, and update protocol version
The recommended way of setting available status is to call pa_device_port_set_available, which will send a subscription event to the relevant card. It will also fire a hook. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
0dced7f275
commit
47f28a5843
9 changed files with 67 additions and 11 deletions
|
|
@ -35,10 +35,15 @@
|
|||
#include <pulsecore/object.h>
|
||||
#include <pulsecore/hashmap.h>
|
||||
|
||||
/* Note: Including core.h here leads to circular references
|
||||
(device-port.h -> core.h -> sink.h -> device-port.h), hence the line below instead */
|
||||
typedef struct pa_core pa_core;
|
||||
|
||||
typedef struct pa_device_port pa_device_port;
|
||||
|
||||
struct pa_device_port {
|
||||
pa_object parent; /* Needed for reference counting */
|
||||
pa_core *core;
|
||||
|
||||
char *name;
|
||||
char *description;
|
||||
|
|
@ -58,8 +63,13 @@ PA_DECLARE_PUBLIC_CLASS(pa_device_port);
|
|||
|
||||
#define PA_DEVICE_PORT_DATA(d) ((void*) ((uint8_t*) d + PA_ALIGN(sizeof(pa_device_port))))
|
||||
|
||||
pa_device_port *pa_device_port_new(const char *name, const char *description, size_t extra);
|
||||
pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *description, size_t extra);
|
||||
|
||||
void pa_device_port_hashmap_free(pa_hashmap *h);
|
||||
|
||||
#include <pulsecore/core.h>
|
||||
|
||||
/* The port's available status has changed */
|
||||
void pa_device_port_set_available(pa_device_port *p, pa_port_available_t available);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue