sink/source: Initialize port before fixate hook (fixes volume/mute not saved) 72/21972/1
authorDavid Henningsson <david.henningsson@canonical.com>
Fri, 21 Mar 2014 09:19:19 +0000 (10:19 +0100)
committerIsmo Puustinen <ismo.puustinen@intel.com>
Wed, 28 May 2014 09:40:05 +0000 (12:40 +0300)
commit6e192efa638f7313abb881b7a507a039de57f400
tree71c519eca6c430ccd9f30901378bd12617aa6675
parentb92930b0c26762534f0af89e517280020a9bbafb
sink/source: Initialize port before fixate hook (fixes volume/mute not saved)

In case a port has not yet been saved, which is e g often the case
if a sink/source has only one port, reading volume/mute will be done
without port, whereas writing volume/mute will be done with port.

Work around this by setting a default port before the fixate hook,
so module-device-restore can read volume/mute for the correct port.

Change-Id: Iea6a742f0667771712059cb39b8082785b2a6887
BugLink: https://bugs.launchpad.net/bugs/1289515
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/pulsecore/device-port.c
src/pulsecore/device-port.h
src/pulsecore/sink.c
src/pulsecore/source.c