Skip to content

ASoC: qcom: Parse "pin-switches" and "widgets" from DT

Stephan Gerhold alsa-devel linux-arm-msm linux-devicetree phone-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ASoC: core: Add snd_soc_of_parse_pin_switches() from simple-card-utilsinclude/sound/soc.h sound/soc/generic/simple-card-utils.c sound/soc/soc-core.c+52 -440 replies
2/4ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets"Documentation/devicetree/bindings/sound/qcom,sm8250.yaml+16 -01 reply
3/4ASoC: qcom: common: Parse "pin-switches" and "widgets" from DTsound/soc/qcom/common.c+10 -00 replies
4/4ASoC: msm8916-wcd-analog: Use separate outputs for HPH_L/HPH_Rsound/soc/codecs/msm8916-wcd-analog.c+4 -30 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/4
2/4A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] ASoC: qcom: Parse "pin-switches" and "widgets" from DT

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/[email protected]/

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(-)
Signature · 1 line
2.34.1