device-port: Add a card pointer to the ports.

This way we can directly access the card that owns the port instead of
iterating over all cards.
This commit is contained in:
poljar (Damir Jelić) 2013-01-17 20:55:14 +01:00 committed by Tanu Kaskinen
parent ed6f30c79a
commit 9d6eb21c7e
3 changed files with 12 additions and 1 deletions

View file

@ -92,6 +92,7 @@ pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *des
p->name = pa_xstrdup(name);
p->description = pa_xstrdup(description);
p->core = c;
p->card = NULL;
p->priority = 0;
p->available = PA_PORT_AVAILABLE_UNKNOWN;
p->profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);