Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: wm8962: make GPIO-based HP detection work
@ 2026-11-27 17:00 Laurentiu Mihalcea
  2026-11-27 17:00 ` [PATCH 1/3] ASoC: wm8962: implement GPIO .get callback Laurentiu Mihalcea
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Laurentiu Mihalcea @ 2026-11-27 17:00 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Charles Keepax, Sebastian Krzyszkowiak,
	elena.popa, cosmin.stoica
  Cc: patches, linux-sound, linux-kernel

From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>

Hello everyone,

This series contains a little bit of a mix of patches (2 features and 1
bug fix) that are needed to (partially) make the headphone detection
using the GPIO2 and GPIO5 pins work on NXP's MR-NAVQ95 board.

A little bit about the setup:

I'm using a MR-NAVQ95 board. This uses the codec's GPIO5 pin to detect
if the headphones are plugged into the jack and the GPIO2 pin to signal
if a codec interrupt has occurred.

Also, the WM8962 codec has an external XTAL tied to the XTI/MCLK pins and
is configured to use the FLL as the MCLK source.

For this to work, I've confiured GPIO5 as a GPIO input and GPIO2 to
operate in IRQ mode (i.e. IRQ function) using the "gpio-cfg" DT property.

About the patches:

1) ASoC: wm8962: implement GPIO .get callback

- needed because the soc-jack core needs to be able to read the value of
the headphone detection pin (i.e. GPIO5).

2) ASoC: wm8962: add GPIO interrupt controller support

- needed because the soc-jack core needs to be notified whenever an IRQ
was raised by the codec (which would happen if GPIO5 changes its state).

3) ASoC: wm8962: fix interrupt mis-firing during runtime_resume()

- fixes an annoying issue that would cause some unwanted transitions on
the codec's IRQ line. This would sometimes make the downstream IRQ
controller think an interrupt was raised by the codec.

Apart from this, there's still an issue with the FLL lock interrupt, which
I haven't managed to get working right yet. What I've tried is enabling
SYSCLK after configuring and enabling the FLL but this doesn't seem to do
the trick all the time since there's still some cases in which the IRQ
doesn't fire. The datasheet doesn't seem to specify the conditions under
which said interrupt should fire?

Laurentiu Mihalcea (3):
  ASoC: wm8962: implement GPIO .get callback
  ASoC: wm8962: add GPIO interrupt controller support
  ASoC: wm8962: fix interrupt mis-firing during runtime_resume()

 sound/soc/codecs/wm8962.c | 201 ++++++++++++++++++++++++++++++++++----
 1 file changed, 183 insertions(+), 18 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-27 17:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 17:00 [PATCH 0/3] ASoC: wm8962: make GPIO-based HP detection work Laurentiu Mihalcea
2026-11-27 17:00 ` [PATCH 1/3] ASoC: wm8962: implement GPIO .get callback Laurentiu Mihalcea
2026-11-27 17:22   ` sashiko-bot
2026-11-27 17:00 ` [PATCH 2/3] ASoC: wm8962: add GPIO interrupt controller support Laurentiu Mihalcea
2026-11-27 17:36   ` sashiko-bot
2026-11-27 17:00 ` [PATCH 3/3] ASoC: wm8962: fix interrupt mis-firing during runtime_resume() Laurentiu Mihalcea
2026-11-27 17:30   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox