[PATCH v2] ALSA: hda - bind headset buttons to the headphone jack

Takashi Iwai tiwai at suse.de
Fri Mar 5 15:19:21 CET 2021


On Fri, 05 Mar 2021 10:26:08 +0100,
Hui Wang wrote:
> 
> With the HDA driver, if the headset buttons are supported, an audio
> Jack will be created for them. This audio Jack is a bit confusing to
> users since it can't report headphone/mic insertion events but it
> claims to support these events.
> 
> And in addition, the driver already builds a headphone Jack and a mic
> Jack, and most of those buttons are used for headphone playback, so
> do some change to bind those buttons to the headphone Jack. After this
> change, the key events are generated from NID 0x55, and are reported
> to the input layer via headphone jack (NID 0x21).
> 
> If there is no headphone Jack, then build an audio jack to support
> those buttons same as previously.
> 
> Signed-off-by: Hui Wang <hui.wang at canonical.com>
> ---
> In the v2, add a function snd_hda_jack_set_button_state(),
> the codec driver calls it to report the button state.

Thanks, applied now to for-next branch.


Takashi


More information about the Alsa-devel mailing list