From: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>,
elena.popa@nxp.com, cosmin.stoica@nxp.com
Cc: patches@opensource.cirrus.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] ASoC: wm8962: make GPIO-based HP detection work
Date: Fri, 27 Nov 2026 19:00:36 +0200 [thread overview]
Message-ID: <20261127170039.663-1-laurentiumihalcea111@gmail.com> (raw)
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
next reply other threads:[~2026-11-27 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 17:00 Laurentiu Mihalcea [this message]
2026-11-27 17:00 ` [PATCH 1/3] ASoC: wm8962: implement GPIO .get callback Laurentiu Mihalcea
2026-11-27 17:00 ` [PATCH 2/3] ASoC: wm8962: add GPIO interrupt controller support Laurentiu Mihalcea
2026-11-27 17:00 ` [PATCH 3/3] ASoC: wm8962: fix interrupt mis-firing during runtime_resume() Laurentiu Mihalcea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261127170039.663-1-laurentiumihalcea111@gmail.com \
--to=laurentiumihalcea111@gmail.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=cosmin.stoica@nxp.com \
--cc=elena.popa@nxp.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=sebastian.krzyszkowiak@puri.sm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®