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>
This commit is contained in:
Pierre-Louis Bossart 2017-08-28 17:49:16 -05:00 committed by Tanu Kaskinen
parent b4d2443249
commit 15d28f21b4
2 changed files with 25 additions and 0 deletions

View file

@ -108,6 +108,7 @@ struct pa_sink {
/* Saved volume state while we're in passthrough mode */
pa_cvolume saved_volume;
bool saved_save_volume:1;
bool is_passthrough_set:1;
pa_asyncmsgq *asyncmsgq;