]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd119282ba84c872c73387ec0fea363c706c76114
tree4364a70bfef4bde8ff54949161cc07393ba1753f
parentaa0da8c5ce3bff322fcd596e048172b31aa78d36
parent6cabb6e0208e0830e9a849929f5b4032e5f2c9df
Make headphone work on Huawei Matebook D15

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.