pulseaudio/src/modules/alsa
Hui Wang c8653c13fa alsa: adjust ucm sink/source priority according to ports priority
On the machines with the ucm used, the different input/output devices
often have different pcm stream, so they often belong to different
sources and sinks, this is greatly different from the design of all
devices connected to a codec (without ucm).

For example, on a machine with ucm2 used:
the internal dmic is on source#0
the external mic is on the source#1
the internal spk is on sink#0
the external headphone is on sink#1

Users expect that after plugging the external device, it will become
the active device automatically. The switch-on-port-available could
make it to be the active_port on its own source/sink, but can't make
source/sink to be default_source/sink since the sources/sinks belong
to the same profile (HiFi usually).

If we adjust the source/sink priority according to ucm ports priority,
the device_port.c could handle the default_source/sink changing then.
Usually we set higher priority for external device than internal
device in the ucm.

In order to bring the lowest side effect on the source/sink priority,
I change the ucm priority to units digit first, then add it to the
original priority.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2020-07-17 09:20:50 +00:00
..
mixer alsa: Document that mixer elements can be identified by a combination of name and index 2020-02-14 11:01:04 +02:00
90-pulseaudio.rules alsa-mixer: add support for LucidSound LS31, and create usb-gaming-headset profile 2019-12-05 03:02:28 +00:00
alsa-mixer.c alsa: legacy card - implement device port type parser and assignment 2020-06-17 06:06:12 +00:00
alsa-mixer.h alsa: legacy card - implement device port type parser and assignment 2020-06-17 06:06:12 +00:00
alsa-sink.c alsa: adjust ucm sink/source priority according to ports priority 2020-07-17 09:20:50 +00:00
alsa-sink.h update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
alsa-source.c alsa: adjust ucm sink/source priority according to ports priority 2020-07-17 09:20:50 +00:00
alsa-source.h update FSF addresses to FSF web page 2015-01-14 22:20:40 +02:00
alsa-ucm.c alsa-ucm: Fix NULL pointer handling 2020-07-06 12:47:19 +03:00
alsa-ucm.h alsa ucm: set device port type 2020-06-17 06:06:12 +00:00
alsa-util.c alsa-mixer: do the quick card number lookup to save mixer instances 2019-12-23 11:10:44 +00:00
alsa-util.h alsa: rewrite mixer open/close, cache mixer accesses in probe 2019-12-23 11:10:44 +00:00
meson.build meson: link libintl if it's not provided by libc 2019-09-25 04:42:03 +00:00
module-alsa-card.c alsa-ucm: add support for HDMI ELD 2019-12-23 11:10:44 +00:00
module-alsa-sink.c alsa: Document that mixer elements can be identified by a combination of name and index 2020-02-14 11:01:04 +02:00
module-alsa-source.c alsa: Document that mixer elements can be identified by a combination of name and index 2020-02-14 11:01:04 +02:00