On Tue, 2015-05-05 at 17:01 +0200, David Henningsson wrote: > Signed-off-by: David Henningsson <david.henningsson at canonical.com> > --- > Â src/pulsecore/device-port.c | 1 + > Â src/pulsecore/device-port.h | 1 + > Â 2 files changed, 2 insertions(+) > > diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c > index cfe2a80..38f7354 100644 > --- a/src/pulsecore/device-port.c > +++ b/src/pulsecore/device-port.c > @@ -98,6 +98,7 @@ static void device_port_free(pa_object *o) { > Â Â Â Â Â if (p->profiles) > Â Â Â Â Â Â Â Â Â pa_hashmap_free(p->profiles); > Â > +Â Â Â Â pa_xfree(p->preferred_profile); > Â Â Â Â Â pa_xfree(p->name); > Â Â Â Â Â pa_xfree(p->description); > Â Â Â Â Â pa_xfree(p); > diff --git a/src/pulsecore/device-port.h b/src/pulsecore/device-port.h > index f35d07c..ec45a54 100644 > --- a/src/pulsecore/device-port.h > +++ b/src/pulsecore/device-port.h > @@ -43,6 +43,7 @@ struct pa_device_port { > Â > Â Â Â Â Â char *name; > Â Â Â Â Â char *description; > +Â Â Â Â char *preferred_profile; > Â > Â Â Â Â Â unsigned priority; > Â Â Â Â Â pa_available_t available;Â Â Â Â Â Â Â Â Â /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */ It's not actually a profile that the port prefers. When the user changes from stereo to surround, the analog-output-speakers port doesn't care which profile gets restored, as long as the profile contains a surround sink. Therefore, the field should be named preferred_sink. --Â Tanu