mbox series

[v3,0/3] Make headphone work on Huawei Matebook D15

Message ID cover.1649177516.git.mchehab@kernel.org (mailing list archive)
Headers show
Series Make headphone work on Huawei Matebook D15 | expand

Message

Mauro Carvalho Chehab April 5, 2022, 4:57 p.m. UTC
At Huawei Matebook D15 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.

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.

---

v3:
  - add a patch changing GPIO quirk speaker naming. Patch 2 got rebased on the top of it.

Mauro Carvalho Chehab (2):
  ASoC: Intel: sof_es8336: support a separate gpio to control headphone
  ASoC: Intel: sof_es8336: Huawei Matebook D15 uses a headphone gpio

Pierre-Louis Bossart (1):
  ASoC: Intel: sof_es8336: simplify speaker gpio naming

 sound/soc/intel/boards/sof_es8336.c | 97 +++++++++++++++++++++--------
 1 file changed, 72 insertions(+), 25 deletions(-)