Make headphone work on Huawei Matebook D15
authorMark Brown <broonie@kernel.org>
Fri, 8 Apr 2022 11:08:37 +0000 (12:08 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 8 Apr 2022 11:08:37 +0000 (12:08 +0100)
Merge series from Mauro Carvalho Chehab <mchehab@kernel.org>:

Huawei Matebook D15 uses two different GPIOs are used to control the output:

- gpio0 controls the speaker output;
- gpio1 controls the headphone output.

Changing both at the same time cause spurious events that are mis-interpreted
as input events, causing troubles on apps. So, a delay is needed before turning
on such gpios.

Also, the headset microphone is connected to MIC1, instead of MIC2 port.

With this patch, plugging a headphone causes a jack event to trigger the speaker
supply, powering down the speaker and powering up the headphone output.
Removing the headphone also triggers the power supply, powering up the speaker
and powering down the headphone.

The headset microphone also works.


Trivial merge