On Wed, 28 Nov 2018 09:07:32 +0100, Kailang wrote:
Hi Takashi,
New Chrome platform need to support HS button function. I sent it to Intel chrome team already.
Could you take a look for attach patch? I think it maybe could upstream. It just waiting for test by Intel Chrome team.
I'd rather like to extend snd_hda_jack_add_kctl() with the key support (maybe adding a new function). You can pass there the combination of SND_JACK_BTN_X with KEY_XXX in an array.
And, how is the unsol event supposed to work for these events? Is it embedded in an event for NID 0x55? If so, your patch seems checking the buttons for every event including for other NIDs, which look bogus.
If it's specific to NID 0x55, the handler can be installed via snd_hda_jack_detect_enable_callback().
thanks,
Takashi
BR, Kailang [2 0000-chrome-headset-btn.patch <application/octet-stream (base64)>]