pulseaudio/src
Tanu Kaskinen 8a87af380a stream-restore: Fix NULL preferred device handling
When an application sets a device for a newly created stream, we treat
that as a temporary setting, and don't save it as the preferred device
for future streams. The handling for this was broken, however: if the
stream already had a preferred device saved in the stream-restore
database, that was unset.

This was a regression introduced in
bc0e728320 and
70bbbcdc84. These commits tried to detect
in subscribe_callback() when the preferred device is cleared, but as a
side effect the preferred device started to get cleared from the
database also when a stream was created with a device set by the
application.

There's no way for subscribe_callback() to distinguish the different
cases of the preferred device being NULL. This problem is solved by
using the PREFERRED_SINK/SOURCE_CHANGED hooks. The hooks are only called
when the preferred device really changes.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1063
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/535>
2021-04-05 15:17:15 +00:00
..
daemon build-sys: drop autotools build system 2021-03-15 18:25:06 +00:00
modules stream-restore: Fix NULL preferred device handling 2021-04-05 15:17:15 +00:00
pulse message-params: clean up 2021-03-27 11:18:22 +00:00
pulsecore sink-input, source-output: Add hooks for preferred device changes 2021-04-05 15:17:15 +00:00
tests json: add JSON encoder 2021-03-27 11:18:22 +00:00
utils message-params: clean up 2021-03-27 11:18:22 +00:00
.gitignore buildsys/autotools: add pulseaudio-x11.service.in 2021-03-01 15:25:09 +00:00
depmod.py update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
meson.build message-params: clean up 2021-03-27 11:18:22 +00:00