Linux smartphone development
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: qcom: Parse "pin-switches" and "widgets" from DT
@ 2021-12-14 14:20 Stephan Gerhold
  2021-12-14 14:20 ` [PATCH 1/4] ASoC: core: Add snd_soc_of_parse_pin_switches() from simple-card-utils Stephan Gerhold
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Stephan Gerhold @ 2021-12-14 14:20 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Srinivas Kandagatla, Banajit Goswami,
	Bjorn Andersson, Andy Gross, Rob Herring, linux-arm-msm,
	alsa-devel, devicetree, phone-devel, ~postmarketos/upstreaming,
	Paul Cercueil, Kuninori Morimoto, Vincent Knecht, Stephan Gerhold

Some sound card setups might require extra pin switches to allow 
turning off certain audio components. simple-card supports this
already using the "pin-switches" and "widgets" device tree property. 
This series makes it possible to use the same properties for the Qcom 
sound cards.

To implement that, the function that parses the "pin-switches" property 
in simple-card-utils.c is first moved into the ASoC core. Then two 
simple function calls are added to the common Qcom sound card DT parser.
Finally there is a small patch for the msm8916-wcd-analog codec to make
it possible to model sound card setups used in some MSM8916 smartphones.
(See PATCH 2/4 for an explanation of some real example use cases.)

Using pin switches rather than patching codec drivers with switches was
originally suggested by Mark Brown on a patch for the tfa989x codec:
https://lore.kernel.org/alsa-devel/YXaMVHo9drCIuD3u@sirena.org.uk/

Stephan Gerhold (4):
  ASoC: core: Add snd_soc_of_parse_pin_switches() from simple-card-utils
  ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets"
  ASoC: qcom: common: Parse "pin-switches" and "widgets" from DT
  ASoC: msm8916-wcd-analog: Use separate outputs for HPH_L/HPH_R

 .../bindings/sound/qcom,sm8250.yaml           | 16 ++++++
 include/sound/soc.h                           |  1 +
 sound/soc/codecs/msm8916-wcd-analog.c         |  7 +--
 sound/soc/generic/simple-card-utils.c         | 45 +----------------
 sound/soc/qcom/common.c                       | 10 ++++
 sound/soc/soc-core.c                          | 50 +++++++++++++++++++
 6 files changed, 82 insertions(+), 47 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2021-12-23 19:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 14:20 [PATCH 0/4] ASoC: qcom: Parse "pin-switches" and "widgets" from DT Stephan Gerhold
2021-12-14 14:20 ` [PATCH 1/4] ASoC: core: Add snd_soc_of_parse_pin_switches() from simple-card-utils Stephan Gerhold
2021-12-14 14:20 ` [PATCH 2/4] ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets" Stephan Gerhold
2021-12-16 18:02   ` Rob Herring
2021-12-14 14:20 ` [PATCH 3/4] ASoC: qcom: common: Parse "pin-switches" and "widgets" from DT Stephan Gerhold
2021-12-14 14:20 ` [PATCH 4/4] ASoC: msm8916-wcd-analog: Use separate outputs for HPH_L/HPH_R Stephan Gerhold
2021-12-23 19:39 ` [PATCH 0/4] ASoC: qcom: Parse "pin-switches" and "widgets" from DT Mark Brown

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