OSDN Git Service

ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets"
authorStephan Gerhold <stephan@gerhold.net>
Tue, 14 Dec 2021 14:20:47 +0000 (15:20 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 23 Dec 2021 18:34:24 +0000 (18:34 +0000)
commit37a49da9a7d5ac1f7128000de42ff222da46ba7a
tree67a0be6a6d7dcce84e4e156287dc901b179fb96b
parent3d4641a42ccf1593b3f3a474ee7541727acbb8e0
ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets"

Some sound card setups might require extra pin switches to allow
turning off certain audio components. There are two real examples for
this in smartphones/tablets based on MSM8916:

  1. Analog speaker amplifiers connected to headphone outputs.

     The MSM8916 analog codec does not have a separate "Line Out" port
     so some devices have an analog speaker amplifier connected to one
     of the headphone outputs. A pin switch is necessary to allow
     playback on headphones without also activating the speaker.

  2. External speaker codec also used as earpiece.

     Some smartphones have two front-facing (stereo) speakers that can
     be also configured to act as an earpiece during voice calls. A pin
     switch is needed to allow disabling the second speaker during
     voice calls.

There are existing bindings that allow setting up such pin switches in
simple-card.yaml. Document the same for Qcom sound cards.

One variant of example 1 above is added to the examples in the DT
schema: There is an analog speaker amplifier connected to the HPH_R
(right headphone channel) output. Adding a "Speaker" pin switch and
widget allows turning off the speaker when audio should be only played
via the connected headphones.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211214142049.20422-3-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/qcom,sm8250.yaml