]> code.delx.au - pulseaudio/commit
alsa-mixer: Make speaker get available=no when headphones are plugged in
authorDavid Henningsson <david.henningsson@canonical.com>
Thu, 23 Feb 2012 06:17:07 +0000 (07:17 +0100)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 11 Mar 2012 06:53:46 +0000 (12:23 +0530)
commite02cb7fb2e7865affed612693935c7fd698e3a6b
tree54a4ef2c0486fb1ced8d62974f03d3477d48718b
parent793f46320e98aa10dca16bcc1b3a421a4f2b6b7e
alsa-mixer: Make speaker get available=no when headphones are plugged in

While developing the new UI we had to ask ourselves the question of whether
"speakers" should be considered available when headphones are plugged in.
In most cases, they are not available and therefore we should list them
as such.

OTOH, we don't want unplugging the headphones to be considered an act of
wanting to use the speakers (the user might prefer HDMI), and there might
be line-outs that keeps the speakers from unmuting anyway. So, at this point,
I think the most reasonable would be to make the speakers have
PA_PORT_AVAILABLE_NO when headphones are plugged in and
PA_PORT_AVAILABLE_UNKNOWN when they are not. But we might want to revisit
this decision once we have the priority lists up and running.

The same reasoning applies for "Internal Mic", which should become unavailable
when any other mic is plugged in.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/alsa/alsa-mixer.c
src/modules/alsa/alsa-mixer.h
src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
src/modules/alsa/mixer/paths/analog-output-speaker.conf
src/modules/alsa/module-alsa-card.c
src/modules/module-switch-on-port-available.c
src/pulsecore/device-port.c