On Tue, 2015-10-27 at 16:09 +0100, David Henningsson wrote: > It can be useful for routing modules to know if a profile consists > of an output and input part, in order to e g change output profile > while keeping the input profile unchanged. It would be nice if the commit message would address the confusion that was indicated in our earlier discussion. That is, it's not interesting *if* a profile consists of output and input parts, but *what* outputs and inputs the profile consists of. The "if" question is already answered by n_sinks and n_sources. > 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 at canonical.com> > --- > Â src/pulsecore/card.c | 2 ++ > Â src/pulsecore/card.h | 6 ++++++ > Â 2 files changed, 8 insertions(+) > > diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c > index c8b97b7..bb21d0f 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 3e2c004..8f85000 100644 > --- a/src/pulsecore/card.h > +++ b/src/pulsecore/card.h > @@ -40,6 +40,12 @@ typedef struct pa_card_profile { > Â Â Â Â Â char *name; > Â Â Â Â Â char *description; > Â > +Â Â Â Â /* Indication in case the profile is built from an output and an input part. > +Â Â Â Â Â Â Â 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; The comment still doesn't explain how the strings are supposed to be generated and used. That said, I don't really care that much, since I'm planning to soon change these struct fields anyway. --Â Tanu