Comment 209 for bug 1563110

Revision history for this message
In , js (js-linux-kernel-bugs) wrote :

Hi Andy,

gpio seems to work, the question was more if I should expect
the sound driver to switch off the speaker when headphones
are connected, or if I need a userspace daemon like PA for that.
So it's a question for Takashi about policy.

/sys/kernel/debug/gpio
gpiochip1: GPIOs 397-455, parent: platform/INT33FF:01, INT33FF:01:
 gpio-403 ( |headset ) in lo IRQ

/sys/kernel/debug/pinctrl/INT33FF\:01/gpio-ranges
0: INT33FF:01 GPIOS [397 - 405] PINS [0 - 8]

grep head | /proc/interrupts
 177: 12 0 0 0 chv-gpio 6 headset

/sys/kernel/debug/pinctrl/INT33FF\:01/pins
pin 6 (GPIO_DFX_8) GPIO 0x40108202 0x04c00003

And also:

input-events 13
/dev/input/event13
   bustype : (null)
   vendor : 0x0
   product : 0x0
   version : 0
   name : "chtcx2072x Headset"
   phys : "ALSA"
   bits ev : (null) (null) (null)

waiting for events
21:34:51.111138: (null) ??? 1
21:34:51.111138: (null) ??? 1
21:34:51.111138: (null) code=0 value=0
21:34:54.542011: (null) ??? 0
21:34:54.542011: (null) ??? 0
21:34:54.542011: (null) code=0 value=0
timeout, quitting

Looks a bit strange ??? but the event fires.

I noticed no event happens when the button on the headset
is pressed, is it supposed to work?

I also checked output of "amixer contents" and diffed
unplugged with headphones and headset plugged, it recognizes
both headphones (no mic) and headset (with mic).

Didn't check if recording works.