sink: force suspend/resume on passthrough transitions
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 28 Aug 2017 22:49:16 +0000 (17:49 -0500)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 5 Sep 2017 10:46:27 +0000 (13:46 +0300)
commit15d28f21b4c00bd38a3797461b28bb6f90709aae
tree07cdfecb21d6f5c2e57c5877cac547f801c42174
parentb4d2443249c2ab31f58ed97a968db41c1fe61b49
sink: force suspend/resume on passthrough transitions

A race condition prevents the AES non-audio bit from being set
when enabling IEC61937 passthrough on resume with no sink-input
connected (pa_sink_is_passthrough returns false). The non-audio
bit should really be set when opening the sink.

Force the sink to suspend/resume when actually entering passthrough
mode, and likewise force a suspend-resume on leaving passthrough mode.

Tested with E-AC3 streams which do need the AES bit set for my
Onkyon receiver to detect the format instead of playing it as
PCM.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
src/pulsecore/sink.c
src/pulsecore/sink.h