Skip to content

module-default-device-restore: reset sink when restoring an unavailable sink

Libin Yang requested to merge libinyang/pulseaudio:restore_sink into master

When pulseaudio is launching, it will try to restore the sink which is last used.

Let's imagine that the headphone is the default sink. Then user powers off the machine. This means the saved default sink is the headphone. After machine is powered off, user disconnects the headphone and powers on the machine. After the machine is powered on, Pulseaudio will set the default sink to headphone. This is wrong because the headphone is unavailable now.

This patch checks whether the port is available or not. If the port is not available, it will call pa_core_update_default_sink() to pick a reasonable sink as the default sink.

Signed-off-by: Libin Yang libin.yang@intel.com

Merge request reports