1. 05 Jan, 2022 4 commits
  2. 04 Jan, 2022 1 commit
  3. 31 Dec, 2021 11 commits
  4. 29 Dec, 2021 5 commits
  5. 24 Dec, 2021 15 commits
  6. 23 Dec, 2021 4 commits
    • Mark Brown's avatar
      ASoC: qcom: Parse "pin-switches" and "widgets" from DT · 2f15d3ce
      Mark Brown authored
      Merge series from Stephan Gerhold <stephan@gerhold.net>:
      
      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/
      2f15d3ce
    • Stephan Gerhold's avatar
      ASoC: msm8916-wcd-analog: Use separate outputs for HPH_L/HPH_R · 319a0533
      Stephan Gerhold authored
      The analog codec has separate output paths for the left headphone channel
      (HPH_L) and the right headphone channel (HPH_R). While they are usually
      used together for actual headphones output, some devices also have an
      analog speaker amplifier connected to one of the headphone channels.
      
      To allow modelling that properly (and to avoid powering on the unneeded
      output path), HPH_L and HPH_R should be represented by separate outputs
      rather than a shared HEADPHONE output that always activates both paths.
      
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Link: https://lore.kernel.org/r/20211214142049.20422-5-stephan@gerhold.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      319a0533
    • Stephan Gerhold's avatar
      ASoC: qcom: common: Parse "pin-switches" and "widgets" from DT · 2623e66d
      Stephan Gerhold authored
      Use the DT helpers in the ASoC core to parse the "pin-switches" and
      "widgets" properties from the device tree. This allows adding extra
      mixers to disable e.g. an extra speaker amplifier that would be
      normally powered on automatically because it is connected to a shared
      output pin.
      
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Link: https://lore.kernel.org/r/20211214142049.20422-4-stephan@gerhold.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      2623e66d
    • Stephan Gerhold's avatar
      ASoC: dt-bindings: qcom: sm8250: Document "pin-switches" and "widgets" · 37a49da9
      Stephan Gerhold authored
      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: default avatarStephan Gerhold <stephan@gerhold.net>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/20211214142049.20422-3-stephan@gerhold.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      37a49da9