|
|
Log in / Subscribe / Register

Add support for jack detection to codec present in A64 SoC

From:  Ondřej Jirman <megi-AT-xff.cz>
To:  linux-kernel-AT-vger.kernel.org, Liam Girdwood <lgirdwood-AT-gmail.com>, Mark Brown <broonie-AT-kernel.org>, Jaroslav Kysela <perex-AT-perex.cz>, Takashi Iwai <tiwai-AT-suse.com>
Subject:  [PATCH v3 0/4] Add support for jack detection to codec present in A64 SoC
Date:  Sat, 02 Mar 2024 15:00:34 +0100
Message-ID:  <20240302140042.1990256-1-megi@xff.cz>
Cc:  Ondrej Jirman <megi-AT-xff.cz>, Chen-Yu Tsai <wens-AT-csie.org>, Jernej Skrabec <jernej.skrabec-AT-gmail.com>, Samuel Holland <samuel-AT-sholland.org>, Arnaud Ferraris <arnaud.ferraris-AT-collabora.com>, linux-sound-AT-vger.kernel.org, linux-arm-kernel-AT-lists.infradead.org, linux-sunxi-AT-lists.linux.dev
Archive-link:  Article

From: Ondrej Jirman <megi@xff.cz>

This series adds support for jack detection to this codec. I used
and tested this on Pinephone. It works quite nicely. I tested it
against Android headset mic button resistor specification.

The patches are a rewritten and debugged version of the original
ones from Arnaud Ferraris and Samuel Holland, improved to better
handle headset button presses and with more robust plug-in/out
event debouncing, and to use set_jack API instead of sniffing
the sound card widget names, to detect the type of jack connector.

Please take a look. :)

v3:
- removed all device-tree related code
  (it's not necessary for core functionality, it only helps make the jack detect
  functionality of the codec be usable from simple-sound-card driver, and I'll
  send it spearately, because it will apparently need several more rounds
  of review)

v2:
- use set_jack/get_jack_type
- get rid of some custom poking inside card internals to figure
  out what kind of jack port we should setup the codec for
- read jack-type from OF as suggested here: 
  https://elixir.bootlin.com/linux/latest/source/sound/soc/...
- add DT bindings

Thank you very much,
	Ondřej Jirman

Arnaud Ferraris (2):
  ASoC: sun50i-codec-analog: Enable jack detection on startup
  ASoC: sun8i-codec: Implement jack and accessory detection

Samuel Holland (2):
  ASoC: sun50i-codec-analog: Move suspend/resume to set_bias_level
  ASoC: sun8i-codec: Enable bus clock at STANDBY and higher bias

 sound/soc/sunxi/sun50i-codec-analog.c |  73 +++++-
 sound/soc/sunxi/sun8i-codec.c         | 346 +++++++++++++++++++++++++-
 2 files changed, 399 insertions(+), 20 deletions(-)

-- 
2.44.0




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds