#include "device-port.h"
#include <pulsecore/card.h>
+#include <pulsecore/core-util.h>
PA_DEFINE_PUBLIC_CLASS(pa_device_port, pa_object);
pa_xfree(data->description);
}
+void pa_device_port_set_preferred_profile(pa_device_port *p, const char *new_pp) {
+ pa_assert(p);
+
+ if (!pa_safe_streq(p->preferred_profile, new_pp)) {
+ pa_xfree(p->preferred_profile);
+ p->preferred_profile = pa_xstrdup(new_pp);
+ }
+}
+
void pa_device_port_set_available(pa_device_port *p, pa_available_t status) {
pa_assert(p);
if (p->profiles)
pa_hashmap_free(p->profiles);
+ pa_xfree(p->preferred_profile);
pa_xfree(p->name);
pa_xfree(p->description);
pa_xfree(p);
char *name;
char *description;
+ char *preferred_profile;
unsigned priority;
pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */
void pa_device_port_set_available(pa_device_port *p, pa_available_t available);
void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset);
+void pa_device_port_set_preferred_profile(pa_device_port *p, const char *new_pp);
pa_device_port *pa_device_port_find_best(pa_hashmap *ports);