aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@intel.com>2011-07-08 04:59:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-07-08 17:02:24 -0400
commit35b5ddb6466f66c511217abd8b3f490e759dae3e (patch)
tree1dc16b502e3a0d69e5fdd70bc4ab393613ef953e
parent0aee58894551d7a9992f79d77d89f5846eb5e938 (diff)
sst: report correct jack event
The status of jack event is compared bitwise: [in sound/core/jack.c:snd_jack_report()] for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) { int testbit = 1 << i; if (jack->type & testbit) input_report_switch(jack->input_dev, jack_switch_types[i], status & testbit); } So in order to report the correct events, 3 should be passed instead of 1. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/intel_sst/intelmid_v2_control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/intel_sst/intelmid_v2_control.c b/drivers/staging/intel_sst/intelmid_v2_control.c
index 000378a35c1f..46ab55eb8097 100644
--- a/drivers/staging/intel_sst/intelmid_v2_control.c
+++ b/drivers/staging/intel_sst/intelmid_v2_control.c
@@ -1090,7 +1090,7 @@ static void nc_pmic_irq_cb(void *cb_data, u8 intsts)
1090 if (intsts & 0x1) { 1090 if (intsts & 0x1) {
1091 pr_debug("SST DBG:MAD headset detected\n"); 1091 pr_debug("SST DBG:MAD headset detected\n");
1092 /* send headset detect/undetect */ 1092 /* send headset detect/undetect */
1093 present = (value == 0x1) ? 1 : 0; 1093 present = (value == 0x1) ? 3 : 0;
1094 jack_event_flag = 1; 1094 jack_event_flag = 1;
1095 mjack->jack.type = SND_JACK_HEADSET; 1095 mjack->jack.type = SND_JACK_HEADSET;
1096 hp_automute(SND_JACK_HEADSET, present); 1096 hp_automute(SND_JACK_HEADSET, present);