Ticket #1335 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Sometimes get wrong event from kerel when plug/unplug headset

Reported by: sean_chiang@… Owned by: andy@…
Priority: high Milestone:
Component: Core System Version: unspecified
Severity: normal Keywords:
Cc: buglog@…, willie_chen@…, sean_chiang@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

unplug headset:
00007c0 2c86 4800 b195 0005 0005 0002 0000 0000
00007d0 2c86 4800 b1eb 0005 0000 0000 0000 0000
00007e0 2c86 4800 cd61 0005 0005 0002 0001 0000
00007f0 2c86 4800 cda1 0005 0000 0000 0000 0000
0000800 2c86 4800 cf7e 0005 0005 0002 0000 0000
0000810 2c86 4800 cf9f 0005 0000 0000 0000 0000

plugin headset:
0000bb0 2d1a 4800 3287 0007 0005 0002 0001 0000
0000bc0 2d1a 4800 32db 0007 0000 0000 0000 0000
0000bd0 2d1a 4800 73f4 0007 0005 0002 0000 0000
0000be0 2d1a 4800 7455 0007 0000 0000 0000 0000
0000bf0 2d1a 4800 7994 0007 0005 0002 0001 0000
0000c00 2d1a 4800 79c2 0007 0000 0000 0000 0000

But sometimes when plugin headset I will get this from /dev/input/event0:

0000a60 2cca 4800 967a 0003 0005 0002 0001 0000
0000a70 2cca 4800 96cf 0003 0000 0000 0000 0000
0000a80 2cca 4800 9a78 0003 0005 0002 0000 0000
0000a90 2cca 4800 9aac 0003 0000 0000 0000 0000
0000aa0 2cca 4800 9abd 0003 0000 0000 0000 0000
0000ab0 2cca 4800 abff 0003 0005 0002 0001 0000
0000ac0 2cca 4800 ac6e 0003 0000 0000 0000 0000
0000ad0 2cca 4800 0a92 0004 0005 0002 0000 0000
0000ae0 2cca 4800 0ae8 0004 0000 0000 0000 0000
0000af0 2cca 4800 169e 0004 0005 0002 0001 0000
0000b00 2cca 4800 16e6 0004 0000 0000 0000 0000
0000b10 2cca 4800 193c 0004 0005 0002 0000 0000
0000b20 2cca 4800 1993 0004 0000 0000 0000 0000
0000b30 2cca 4800 2b0e 0004 0005 0002 0001 0000
0000b40 2cca 4800 2b69 0004 0000 0000 0000 0000

When this happen, my code would say:unplug the headset, but actually we plug in
headset.

Change History

comment:1 Changed 11 years ago by sean_chiang@…

  • Cc sean_chiang@… added

comment:2 Changed 11 years ago by sean_chiang@…

  • blocked set to 1321

comment:3 Changed 11 years ago by willie_chen@…

When I slowly plug/unplug headset, it is true to generate more interrupts. But I
find the final value is always correct. Like

  • Plug

:
:

xxxxxxx xxxx xxxx xxxx xxxx 0005 0002 0001 0000

  • Unplug

:
:

xxxxxxx xxxx xxxx xxxx xxxx 0005 0002 0000 0000

Can this help you?

comment:4 Changed 11 years ago by andy@…

  • Status changed from new to assigned

I added a patch to andy branch to take care about debounce for this in kernel.
Maybe someone can confirm it solves the issue.

comment:5 Changed 11 years ago by sean_chiang@…

  • Status changed from assigned to closed
  • Resolution set to fixed

It works fine. Now the detect of headset status is correct.

Note: See TracTickets for help on using tickets.