pulseaudio/src/modules
Tanu Kaskinen 23c15c3b52 switch-on-port-available: prefer ports that have been selected by the user
Let's assume that there are two output ports, and they are on
different profiles:

    * Integrated speakers (priority: 10000, available)
    * HDMI                (priority:  5900, not available)

Then the user plugs in an HDMI monitor with speakers. Since the HDMI
priority is lower than the speaker priority, we don't route to HDMI by
default. However, the user manually switches the profile to use the
HDMI output.

Then the user plugs out the monitor, so we switch back to speakers.
When the monitor is plugged back in, the user needs to manually switch
the audio output again. That should be improved: if the user preferred
to the HDMI output over the speakers, we should remember that and
automatically switch to HDMI whenever it becomes available.

The lack of automatic switching is even worse when the monitor goes to
a sleep mode after some period of inactivity. The monitor audio may
become unavailable, and PulseAudio can't distinguish that from the
case where the monitor is physically unplugged. Even worse, the
monitor may become unavailable for a short while when adjusting the
display parameters (for example, media center software may adjust the
display parameters to match the media that is being played back). In
these cases we clearly should switch automatically back to HDMI when
it becomes available again.

This patch fixes the problem by setting pa_card.preferred_input_port
and pa_card.preferred_output_port when the user changes the card
profile or a port, and switching to the preferred port when it becomes
available.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=93946
2016-05-03 11:49:35 +05:30
..
alsa alsa-mixer: Support for Creative SoundBlaster Omni Surround 5.1 USB sound card with latest firmware 2016-04-19 16:44:41 +03:00
bluetooth bluetooth: Prevent aborts caused by invalid module arguments 2016-01-15 16:20:53 +05:30
dbus core, pulse, modules: Fix undefined behavior with array subscript of invalid type 2015-12-08 08:56:07 +05:30
echo-cancel echo-cancel: rework move handling 2016-04-25 13:47:08 +03:00
gconf modules: Fix struct namespace collision on Solaris 2015-07-29 08:09:41 +05:30
jack update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
macosx coreaudio: Catch devices with more channels than we support 2016-02-12 19:34:58 +05:30
oss oss: Use the correct fd when interacting with the mixer 2015-04-30 13:21:02 +03:00
raop update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
rtp rtp: Do all receive side rate calculations in sink-input domain 2016-04-02 21:41:10 +03:00
x11 Rename functions with "tostring" in the name to one with "to_string" to conform with the convention. 2015-09-25 17:29:02 +05:30
xen xen: Resource leak in local function alloc_gref() - alloc_fd and dev_fd 2015-07-21 16:40:03 +02:00
ladspa.h update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
Makefile build-sys: readd stub makefiles to subdirectories to make building with emacs easier 2012-05-15 14:17:58 +02:00
module-always-sink.c always-sink: simplify hook management with pa_module_hook_connect() 2015-12-21 05:37:28 +02:00
module-augment-properties.c conf-parser: add support for .d directories 2015-12-14 13:45:39 +01:00
module-card-restore.c card-restore: restore preferred ports 2016-05-03 11:49:35 +05:30
module-cli.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-combine-sink.c combine-sink: Fix unsafe message handling 2015-07-21 20:05:13 +03:00
module-combine.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-console-kit.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-default-device-restore.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-defs.h.m4 Remove pa_bool_t and replace it with bool. 2013-07-04 12:25:30 +03:00
module-detect.c detect: Don't deprecate module-detect on non-Linux systems 2016-04-25 19:44:10 +03:00
module-device-manager.c device-manager, filter-apply: don't reroute streams that have a filter 2016-04-25 13:50:47 +03:00
module-device-restore.c module-*-restore: use pa_module_hook_connect 2015-04-10 09:26:40 +02:00
module-equalizer-sink.c equalizer: Handle underlying sink going away better when autoloaded 2015-06-12 12:43:18 +05:30
module-esound-compat-spawnfd.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-esound-compat-spawnpid.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-esound-sink.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-filter-apply.c filter-apply: simplify proplist updating 2016-04-25 13:50:47 +03:00
module-filter-heuristics.c module-filter-*: use pa_module_hook_connect 2015-04-10 09:26:47 +02:00
module-hal-detect-compat.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-intended-roles.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-ladspa-sink.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-lirc.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-loopback.c loopback: refactor proplist updating 2016-04-25 13:50:47 +03:00
module-match.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-mmkbd-evdev.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-native-protocol-fd.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-null-sink.c null-sink: correct update of timestamp when state changes to RUNNING or IDLE 2015-10-25 16:36:51 +02:00
module-null-source.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-pipe-sink.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-pipe-source.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-position-event-sounds.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-protocol-stub.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-remap-sink.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-remap-source.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-rescue-streams.c rescue-streams : Fix a typo 2016-02-02 14:56:36 +05:30
module-role-cork.c role-cork: prepare merge with role-ducking: replace "cork" with "interact" where appropriate 2016-03-15 13:02:04 +02:00
module-role-ducking.c role-ducking: Add support for ducking group 2016-04-20 16:31:31 +03:00
module-rygel-media-server.c Rename functions with "tostring" in the name to one with "to_string" to conform with the convention. 2015-09-25 17:29:02 +05:30
module-sine-source.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-sine.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-solaris.c solaris: Catch up with newer API 2016-01-22 13:25:29 +05:30
module-stream-restore.c stream-restore: With dbus-proto fix segfault if e->device is NULL. 2016-04-29 15:52:51 +03:00
module-suspend-on-idle.c module-suspend-on-idle: use pa_module_hook_connect 2015-04-10 09:26:43 +02:00
module-switch-on-connect.c module-switch-*: use pa_module_hook_connect 2015-04-10 09:26:49 +02:00
module-switch-on-port-available.c switch-on-port-available: prefer ports that have been selected by the user 2016-05-03 11:49:35 +05:30
module-systemd-login.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-tunnel-sink-new.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-tunnel-source-new.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-tunnel.c pstream: Support memfd blocks transport 2016-04-02 05:55:14 +02:00
module-udev-detect.c Rename functions with "tostring" in the name to one with "to_string" to conform with the convention. 2015-09-25 17:29:02 +05:30
module-virtual-sink.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-virtual-source.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-virtual-surround-sink.c lfe-filter: change the crossover frequency as a parameter 2015-03-30 10:52:30 +02:00
module-volume-restore.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-waveout.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-zeroconf-discover.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
module-zeroconf-publish.c module: Remove redundant core argument from pa_module_unload() 2015-12-07 09:31:58 +01:00
reserve-monitor.c reserve: Move get_name_owner() to the public rd_device API 2013-01-31 13:56:25 +02:00
reserve-monitor.h More spelling fixes 2011-08-25 11:27:47 +01:00
reserve-wrap.c update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
reserve-wrap.h update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
reserve.c reserve: Fix leaking NameLost signals after release+acquire 2013-01-31 14:04:45 +02:00
reserve.h reserve: Move get_name_owner() to the public rd_device API 2013-01-31 13:56:25 +02:00
stream-interaction.c stream-interaction: Fix crash in case of invalid argument for volume 2016-04-20 16:37:18 +03:00
stream-interaction.h role-cork: prepare merge with role-ducking: replace "cork" with "interact" where appropriate 2016-03-15 13:02:04 +02:00
udev-util.c udev: Deal with unavailable bus property 2015-04-13 08:35:53 +05:30
udev-util.h update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00