Blob Blame History Raw
From 725b1cdc0b58b4015a7dd5526f05a9d1b2d458cf Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Fri, 12 Apr 2013 11:56:17 +0200
Subject: [PATCH 2/2] alsa-mixer: Add more jack detection for Headset mic path

On some machines which has a headset jack, the headset mic does not have its own
jack detection. Then we can look at the headphone jack to get some indication:
We know that if the headphone is unplugged, so is the headset mic. The opposite
is not guaranteed since the user might have plugged in a headphone, not a headset.

Also, there exist multi-function jacks which support both Headphone, Mic in headphone jack
and Headset Mic. In this case the jack name will be "Headphone Mic", not "Headphone", so
we need to include this name too.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 src/modules/alsa/mixer/paths/analog-input-headset-mic.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf b/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
index c5aff1c..83f7d29 100644
--- a/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf
@@ -30,6 +30,12 @@ state.plugged = unknown
 state.unplugged = unknown
 required-any = any
 
+[Jack Headphone]
+state.plugged = unknown
+
+[Jack Headphone Mic]
+state.plugged = unknown
+
 [Element Headset Mic Boost]
 required-any = any
 switch = select
-- 
1.8.5.3