mbox series

[v3,0/4] ASoC: codecs: wcd934x: add Headset and button detection support

Message ID 20210604115230.23259-1-srinivas.kandagatla@linaro.org
Headers show
Series ASoC: codecs: wcd934x: add Headset and button detection support | expand

Message

Srinivas Kandagatla June 4, 2021, 11:52 a.m. UTC
This patchset adds support to MBHC(Multi Button Headset Control) block found in
Qualcomm WCD codecs. MBHC support headset type detection, both Mechanical and
electrical insert/removal detection along with 8 buttons detection,
Over current interrupts on HPHL/R, Impedance Measurements on HPHL/R.

Eventhough MBHC block supports things like OverCurrent detection, Currently its
reported as a kernel debug message. Should this be reported as an uevent to
userspace? like the way USB reports? 
Any suggestions?

First patch adds a common mbhc driver and the second one wcd934x specific driver
changes along with sdm845 soundcard related changes.

Common wcd-mbhc-v2 driver should be reusable across multiple codecs like
WCD9335, WCD934x, WCD937x and WCD938x.

Most of the work is derived from downstream Qualcomm kernels.
Credits to various Qualcomm authors from Patrick Lai's team who have
contributed to this code.

Changes since v2:
- switched to EXPORT_SYMBOL_GPL from EXPORT_SYMBOL 
- converted one of the if else to switch case.

Srinivas Kandagatla (4):
  ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection
  ASoC: codecs: wcd: add multi button Headset detection support
  ASoC: codecs: wcd934x: add mbhc support
  ASoC: qcom: sdm845: add jack support for WCD934x

 .../bindings/sound/qcom,wcd934x.yaml          |   30 +
 include/linux/mfd/wcd934x/registers.h         |   57 +
 sound/soc/codecs/Kconfig                      |    4 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/wcd-mbhc-v2.c                | 1475 +++++++++++++++++
 sound/soc/codecs/wcd-mbhc-v2.h                |  340 ++++
 sound/soc/codecs/wcd934x.c                    |  884 +++++++++-
 sound/soc/qcom/sdm845.c                       |    8 +
 8 files changed, 2785 insertions(+), 15 deletions(-)
 create mode 100644 sound/soc/codecs/wcd-mbhc-v2.c
 create mode 100644 sound/soc/codecs/wcd-mbhc-v2.h

-- 
2.21.0

Comments

Mark Brown June 4, 2021, 4:32 p.m. UTC | #1
On Fri, 4 Jun 2021 12:52:26 +0100, Srinivas Kandagatla wrote:
> This patchset adds support to MBHC(Multi Button Headset Control) block found in

> Qualcomm WCD codecs. MBHC support headset type detection, both Mechanical and

> electrical insert/removal detection along with 8 buttons detection,

> Over current interrupts on HPHL/R, Impedance Measurements on HPHL/R.

> 

> Eventhough MBHC block supports things like OverCurrent detection, Currently its

> reported as a kernel debug message. Should this be reported as an uevent to

> userspace? like the way USB reports?

> Any suggestions?

> 

> [...]


Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection
      commit: c6d25d5786090edc7299b32160644bb2e468c25d
[2/4] ASoC: codecs: wcd: add multi button Headset detection support
      commit: 0e5c9e7ff899808afa4e2b08c2e6ccc469bed681
[3/4] ASoC: codecs: wcd934x: add mbhc support
      commit: 9fb9b1690f0ba6b2c9ced91facc1fc44f5a0d5c1
[4/4] ASoC: qcom: sdm845: add jack support for WCD934x
      commit: c15d4b72098ca3055d98ce0d66127fe37a6a6361

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark