All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: codecs: pm4125: Enable MBHC jack detection
@ 2026-10-15 14:13 Mohammad Rafi Shaik
  2026-10-15 14:13 ` [PATCH v1 1/4] ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties Mohammad Rafi Shaik
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Mohammad Rafi Shaik @ 2026-10-15 14:13 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alexey Klimov, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-arm-msm, linux-sound, devicetree, linux-kernel,
	Mohammad Rafi Shaik

The pm4125 codec registers with the WCD MBHC framework, but it only
provides the electrical bias and button threshold callbacks and leaves the
rest of struct wcd_mbhc_cb empty. The framework can fall back to driving
some of the shared register fields itself, but it has no fallback for the
ones that control hardware it cannot describe generically, so ADC based
plug type detection runs without the MBHC RCO clock, without a micbias
ramp and without the headset ground detection comparator, and never gets a
usable ADC reading. On top of that, the one threshold path that does exist
programs the register wrongly, and a reference counting bug in the micbias
code turns a jack insertion during playback into silence.

This series fixes those issues and fills in the missing callbacks so a
3.5mm jack can be detected, together with the binding needed to describe
one.

Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>

---
Mohammad Rafi Shaik (4):
      ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties
      ASoC: codecs: pm4125: Fix MBHC button threshold programming
      ASoC: codecs: pm4125: Keep the micbias reference count balanced
      ASoC: codecs: pm4125: Add the MBHC callbacks needed for jack detection

 .../bindings/sound/qcom,pm4125-codec.yaml          |  18 ++
 sound/soc/codecs/pm4125.c                          | 206 ++++++++++++++++++++-
 sound/soc/codecs/pm4125.h                          |  13 ++
 3 files changed, 233 insertions(+), 4 deletions(-)
---
base-commit: 686b3eff603871bd500434e00ff15394a0c782bc
change-id: 20261015-pm4125_mbhc_support-42fbbccd2b51

Best regards,
--  
Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>


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

end of thread, other threads:[~2026-10-15 14:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 14:13 [PATCH 0/4] ASoC: codecs: pm4125: Enable MBHC jack detection Mohammad Rafi Shaik
2026-10-15 14:13 ` [PATCH v1 1/4] ASoC: dt-bindings: qcom,pm4125-codec: Add the MBHC jack properties Mohammad Rafi Shaik
2026-10-15 14:13 ` [PATCH v1 2/4] ASoC: codecs: pm4125: Fix MBHC button threshold programming Mohammad Rafi Shaik
2026-10-15 14:27   ` sashiko-bot
2026-10-15 14:13 ` [PATCH v1 3/4] ASoC: codecs: pm4125: Keep the micbias reference count balanced Mohammad Rafi Shaik
2026-10-15 14:25   ` sashiko-bot
2026-10-15 14:13 ` [PATCH v1 4/4] ASoC: codecs: pm4125: Add the MBHC callbacks needed for jack detection Mohammad Rafi Shaik
2026-10-15 14:27   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.