[alsa-devel] CX20724 headset button detect
    Takashi Iwai 
    tiwai at suse.de
       
    Wed Apr  4 19:52:25 CEST 2018
    
    
  
On Wed, 04 Apr 2018 18:29:23 +0200,
David Woodhouse wrote:
> 
> > Maybe you can try to enable the GPIO unsolicited event and see whether
> > any unsolicited event is generated.  Though, the datasheet says it's
> > something else individual, but who knows.
> 
> Hm... forgive my ignorance; how do I do that?
If you have hda-verb program installed (included in alsa-tools), it
can be enabled dynamically like
  hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_UNSOLICITED_RSP_MASK, XXX
where XXX is the GPIO pin bit to enable the unsolicited event, 0x01,
0x02, 0x04, etc.  You codec has 7 GPIO pins, so up to 0x40.
Some of them might be already used for the existing purposes (or
shared) like an amp control.
Then watch the tracing output after
    # echo 1 > /sys/kernel/debug/tracing/events/hda/enable
Takashi
    
    
More information about the Alsa-devel
mailing list