]> 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)
commit8079b5dacca7d7f0472aac76d5ee823b2a9e2408
tree4364a70bfef4bde8ff54949161cc07393ba1753f
parentce1b91212b21220d028d8878998b87fb35c0beb6
parent93f94c3e795f27f021d999231029f00838e7635f
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.