summaryrefslogtreecommitdiff
path: root/src/pulsecore/device-port.c
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-11-25 15:17:13 +0100
committerTanu Kaskinen <tanuk@iki.fi>2011-11-26 16:46:42 +0200
commit0dced7f2758970b672b8f0d0409c57cddaaaca43 (patch)
treee8227c43fec22573520d87df0174db653ae1345d /src/pulsecore/device-port.c
parentd9685ec85db3722bf3988a64dda4d8ee21c7777b (diff)
downloadpulseaudio-panda-0dced7f2758970b672b8f0d0409c57cddaaaca43.tar.gz
pulseaudio-panda-0dced7f2758970b672b8f0d0409c57cddaaaca43.tar.bz2
pulseaudio-panda-0dced7f2758970b672b8f0d0409c57cddaaaca43.zip
Cards now has ports directly, and device port has list of profiles
This forms the base for being able to expose all ports of all profiles (even inactive ones) to clients. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Diffstat (limited to 'src/pulsecore/device-port.c')
-rw-r--r--src/pulsecore/device-port.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
index 09646ee8..8aeb173c 100644
--- a/src/pulsecore/device-port.c
+++ b/src/pulsecore/device-port.c
@@ -32,6 +32,8 @@ static void device_port_free(pa_object *o) {
pa_assert(p);
pa_assert(pa_device_port_refcnt(p) == 0);
+ if (p->profiles)
+ pa_hashmap_free(p->profiles, NULL, NULL);
pa_xfree(p->name);
pa_xfree(p->description);
pa_xfree(p);
@@ -50,6 +52,9 @@ pa_device_port *pa_device_port_new(const char *name, const char *description, si
p->description = pa_xstrdup(description);
p->priority = 0;
p->available = PA_PORT_AVAILABLE_UNKNOWN;
+ p->profiles = NULL;
+ p->is_input = FALSE;
+ p->is_output = FALSE;
return p;
}