summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2015-11-17 15:10:29 +0100
committerTanu Kaskinen <tanuk@iki.fi>2015-11-22 04:59:19 +0200
commitb9818b016f021a80ab8c4ca9f2360756eefe2a87 (patch)
treeaeb69f803bf8eeafe510ed0e738dda8509c26223
parenta01354db002aa8f7ce5eb08acd85e75fde8df4a8 (diff)
downloadpulseaudio-b9818b016f021a80ab8c4ca9f2360756eefe2a87.tar.gz
card: Add variables for splitting up a profile
It can be useful for routing modules to know a profile's input and output parts, in order to e g change output profile while keeping the input profile unchanged. For now filling in these fields is optional and a routing module must be able to handle NULL in these fields. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/pulsecore/card.c2
-rw-r--r--src/pulsecore/card.h8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index c8b97b746..bb21d0f14 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -52,6 +52,8 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
void pa_card_profile_free(pa_card_profile *c) {
pa_assert(c);
+ pa_xfree(c->input_name);
+ pa_xfree(c->output_name);
pa_xfree(c->name);
pa_xfree(c->description);
pa_xfree(c);
diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
index 3e2c00423..a72c8c254 100644
--- a/src/pulsecore/card.h
+++ b/src/pulsecore/card.h
@@ -40,6 +40,14 @@ typedef struct pa_card_profile {
char *name;
char *description;
+ /* Identifiers for the profile's input and output parts, i e, if two different profiles
+ have the same input_name string, they have the same source(s).
+ Same for output_name and sink(s).
+ Can be NULL (and in case of an input- or output- only profile, the other direction
+ will be NULL). */
+ char *input_name;
+ char *output_name;
+
unsigned priority;
pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */