On 2014-10-31 22:01, Sjoerd Simons wrote:
When using a jack being plugged in to disable an output (e.g. make
line-out become unavailable if headset is plugged in) it should override
the available of any other state a jack on that output might have.
I think this makes sense, but it should be merged with patch 1/6 and
commented properly. Right now this patch somewhat invalidates the
comment "Prefer going towards _YES in case of multiple jacks".
---
src/modules/alsa/module-alsa-card.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/modules/alsa/module-alsa-card.c
b/src/modules/alsa/module-alsa-card.c
index 0026e0f..563c1ea 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -333,6 +333,11 @@ static void report_port_state(pa_device_port *p, struct
userdata *u) {
if (p != port)
continue;
+ if (jack->plugged_in && jack->state_plugged == PA_AVAILABLE_NO) {
+ pa = PA_AVAILABLE_NO;
+ break;
+ }
+
cpa = jack->plugged_in ? jack->state_plugged : jack->state_unplugged;
/* Prefer going towards _YES in case of multiple jacks */
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss