1. Nov 26, 2020
  2. Nov 25, 2020
  3. Nov 24, 2020
  4. Nov 21, 2020
    • Gustavo A. R. Silva's avatar
      ASoC: codecs: Fix fall-through warnings for Clang · 3371c6f9
      Gustavo A. R. Silva authored
      In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
      warnings by explicitly adding multiple break statements instead of just
      letting the code fall through, and also add fallthrough pseudo-keywords
      in places where the code is intended to fall through to the next case.
      
      Link: https://github.com/KSPP/linux/issues/115
      
      
      Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
      Link: https://lore.kernel.org/r/d17b4d8300dbb6aff0d055b06b487c96ca264757.1605896059.git.gustavoars@kernel.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      3371c6f9
    • Ranjani Sridharan's avatar
      ASoC: SOF: nocodec: modify DAI link definitions · f805e7e0
      Ranjani Sridharan authored
      
      
      The ignore_machine field in the component driver is used to
      ignore the FE DAI links defined in the machine driver,
      override BE fixups and set the stream names for the
      DAI links defined in the machine driver. This is required
      to make SOF compatible with the legacy machine drivers.
      
      In the case of the nocodec machine driver in SOF, there is
      no need to rely upon this ignore_machine logic in the core.
      Modify the machine driver to set DAI link stream names and the
      BE hw_params_fixup callback appropriately.
      
      Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Link: https://lore.kernel.org/r/20201120141653.2160134-1-kai.vehmanen@linux.intel.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      f805e7e0
    • Curtis Malainey's avatar
      ASoC: SOF: IPC: fix implicit type overflow · 7c1d0e55
      Curtis Malainey authored
      
      
      Implicit values may have a length of 15bits (s16) so we need to declare
      the proper size so we don't get undefined behaviour. This appears to be
      arch and compiler dependent. This commit is to keep the headers aligned
      between the firmware and kernel. UBSan discovered this bug in the
      firmware.
      
      Signed-off-by: default avatarCurtis Malainey <cujomalainey@chromium.org>
      Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
      Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Link: https://lore.kernel.org/r/20201120144025.2166023-1-kai.vehmanen@linux.intel.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      7c1d0e55
    • Mark Brown's avatar
      Merge series "ASoC: mt6359: Fix regulator_dev_lookup() fails for id... · 6b114d8b
      Mark Brown authored
      Merge series "ASoC: mt6359: Fix regulator_dev_lookup() fails for id "LDO_VAUD18"" from Jiaxin Yu <jiaxin.yu@mediatek.com>:
      
      This series fixed "LDO_VAUD18-supply" regulator register fail.
      We can see the error log "mt6359-sound supply LDO_VAUD18 not found, using
      dummy regulator" when register the DAPM widget "LDO_VAUD18"
      Otherwise, the power can not be turned on correctly when recording.
      
      Jiaxin Yu (2):
        ASoC: mediatek: mt6359: Fix regulator_dev_lookup() fails for id
          "LDO_VAUD18"
        dt-bindings: mediatek: mt6359: remove unused property for mt6359
      
       Documentation/devicetree/bindings/sound/mt6359.yaml | 9 ---------
       sound/soc/codecs/mt6359.c                           | 7 ++++---
       2 files changed, 4 insertions(+), 12 deletions(-)
      
      --
      2.18.0
      6b114d8b
    • Mark Brown's avatar
      Merge series "ASoC: Intel/SOF: extend run-time driver selection to ACPI... · 991e74d1
      Mark Brown authored
      Merge series "ASoC: Intel/SOF: extend run-time driver selection to ACPI devices" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
      
      The module snd-intel-dspcfg, suggested by Jaroslav last year,
      currently provide the means to select a PCI driver at run-time, based
      on quirks, recommendations or user selection via a kernel
      parameter. This capability removed a lot of confusions in
      distributions and removed the need for recompilations to select legacy
      HDaudio, SST or SOF drivers.
      
      This patchset extends the concept to ACPI devices. This was driven by
      the desire to at some point deprecate the Atom/SST driver for Baytrail
      and Cherrytrail, which is no longer maintained by Intel. By having the
      SOF driver enabled by distributions for Baytrail/Cherrytrail, we can
      enable more end-user tests and make the transition easier for
      distributions (likely in 2021 at this point).
      
      This patchset provides the same solution for Broadwell, mainly to have
      a single build for all Intel platforms. SOF on Broadwell remains an
      option not recommended for distributions, as long as the 'catpt'
      driver is maintained there is no burning desire to make SOF the
      default on the three Broadwell-based platforms with the DSP
      enabled.
      
      Pierre-Louis Bossart (14):
        ASoC: Intel: broadwell: add missing pm_ops
        ASoC: Intel: bdw-rt5677: add missing pm_ops
        ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection
        ASoC: soc-acpi: add helper to identify parent driver.
        ASoC: Intel: boards: byt/cht: set card and driver name at run time
        ASoC: Intel: byt/cht: set pm ops dynamically
        ASoC: SOF: acpi: add dynamic selection of DSP driver
        ASoC: Intel: Atom: add dynamic selection of DSP driver
        ASoC: SOF: Intel: allow for coexistence between SOF and Atom/SST
          drivers
        ALSA: hda: intel-dsp-config: add Broadwell ACPI DSP driver selection
        ASoC: Intel: broadwell: set card and driver name dynamically
        ASoC: Intel: catpt: add dynamic selection of DSP driver
        ASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers
        ALSA: hda: intel-dsp-config: ignore dsp_driver parameter for PCI
          legacy devices
      
       include/sound/intel-dsp-config.h             |   7 ++
       include/sound/soc-acpi.h                     |   6 +
       sound/hda/intel-dsp-config.c                 | 111 +++++++++++++++++++
       sound/soc/intel/Kconfig                      |   2 +
       sound/soc/intel/atom/sst/sst_acpi.c          |   8 ++
       sound/soc/intel/boards/bdw-rt5650.c          |  17 ++-
       sound/soc/intel/boards/bdw-rt5677.c          |  18 ++-
       sound/soc/intel/boards/broadwell.c           |  20 ++--
       sound/soc/intel/boards/bytcht_cx2072x.c      |  27 +++--
       sound/soc/intel/boards/bytcht_da7213.c       |  27 +++--
       sound/soc/intel/boards/bytcht_es8316.c       |  29 +++--
       sound/soc/intel/boards/bytcr_rt5640.c        |  30 +++--
       sound/soc/intel/boards/bytcr_rt5651.c        |  27 +++--
       sound/soc/intel/boards/cht_bsw_max98090_ti.c |  29 +++--
       sound/soc/intel/boards/cht_bsw_nau8824.c     |  29 +++--
       sound/soc/intel/boards/cht_bsw_rt5645.c      |  38 ++++---
       sound/soc/intel/boards/cht_bsw_rt5672.c      |  29 +++--
       sound/soc/intel/catpt/device.c               |  12 ++
       sound/soc/sof/intel/Kconfig                  |  33 +++---
       sound/soc/sof/sof-acpi-dev.c                 |  14 ++-
       20 files changed, 392 insertions(+), 121 deletions(-)
      
      --
      2.25.1
      991e74d1
    • Dmitry Baryshkov's avatar
      ASoC: qcom: sm8250: fix HDMI audio playback · ddf1c4b3
      Dmitry Baryshkov authored
      
      
      Current code does not setup CPU dai (causing -EIO errors on playback)
      and does not pass SND_SOC_DAIFMT_I2S to codec fmt (causing i2s-hifi
      errors). Fix both errors to enable HDMI audio playback on SM8250. Tested
      on RB5 platform.
      
      Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Fixes: aa2e2785
      
       ("ASoC: qcom: sm8250: add sound card qrb5165-rb5 support")
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Reviewed-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20201119123145.709891-1-dmitry.baryshkov@linaro.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      ddf1c4b3
  5. Nov 20, 2020
  6. Nov 19, 2020
    • Mark Brown's avatar
      Merge series "ASoC: codecs: add support for LPASS Codec macros" from Srinivas... · 36b90846
      Mark Brown authored
      Merge series "ASoC: codecs: add support for LPASS Codec macros" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
      
      This patchset adds support for two Codec Macro blocks( WSA and VA) available in
      Qualcomm LPASS (Low Power Audio SubSystem).
      
      There are WSA, VA, TX and RX Macros on LPASS IP, each of the Macro block
      has specific connectivity like WSA Macros are intended to connect
      to WSA Smart speaker codecs via SoundWire. VA Macro is intended for DMICs,
      and TX/RX for Analog codecs via SoundWire like other WCD Codecs to provide
      headphone/ear/lineout etc ..
      
      Most of the work is derived from downstream Qualcomm kernels.
      Credits to various Qualcomm authors from Patrick Lai's team who have
      contributed to this code.
      
      This patchset has been tested on support to Qualcomm Robotics RB5 Development
      Kit based on QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers
      with onboard DMIC connected to internal LPASS codec via WSA  and VA macros
      respectively.
      
      Thanks,
      srini
      
      -Changes since v2:
       - various unnecessary variable intializations removed, suggested by Pierre
       - fixed a static checker error
       - collected reviews for dt-bindings.
       - fixed licence headers as suggested by Pierre.
      
      Srinivas Kandagatla (6):
        ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec
        ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro
        ASoC: codecs: lpass-wsa-macro: add dapm widgets and route
        ASoC: qcom: dt-bindings: add bindings for lpass va macro codec
        ASoC: codecs: lpass-va-macro: Add support to VA Macro
        ASoC: codecs: lpass-va-macro: add dapm widgets and routes
      
       .../bindings/sound/qcom,lpass-va-macro.yaml   |   67 +
       .../bindings/sound/qcom,lpass-wsa-macro.yaml  |   69 +
       sound/soc/codecs/Kconfig                      |    8 +
       sound/soc/codecs/Makefile                     |    4 +
       sound/soc/codecs/lpass-va-macro.c             | 1503 ++++++++++
       sound/soc/codecs/lpass-wsa-macro.c            | 2464 +++++++++++++++++
       sound/soc/codecs/lpass-wsa-macro.h            |   17 +
       7 files changed, 4132 insertions(+)
       create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
       create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
       create mode 100644 sound/soc/codecs/lpass-va-macro.c
       create mode 100644 sound/soc/codecs/lpass-wsa-macro.c
       create mode 100644 sound/soc/codecs/lpass-wsa-macro.h
      
      --
      2.21.0
      36b90846
    • Ranjani Sridharan's avatar
      ASoC: pcm: call snd_soc_dapm_stream_stop() in soc_pcm_hw_clean · a27b421f
      Ranjani Sridharan authored
      
      
      Currently, the SND_SOC_DAPM_STREAM_START event is sent during
      pcm_prepare() but the SND_SOC_DAPM_STREAM_STOP event is
      sent only in dpcm_fe_dai_shutdown() after soc_pcm_close().
      This results in an imbalance between when the DAPM widgets
      receive the PRE/POST_PMU/PMD events. So call
      snd_soc_dapm_stream_stop() in soc_pcm_hw_clean() before the
      snd_soc_pcm_component_hw_free() to keep the stream_stop DAPM
      event balanced with the stream_start event in soc_pm_prepare().
      
      Also, in order to prevent duplicate DAPM stream events,
      remove the call for DAPM STREAM_START event in dpcm_fe_dai_prepare()
      and the call for DAPM STREAM_STOP event in dpcm_fe_dai_shutdown().
      
      Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Link: https://lore.kernel.org/r/20201117215001.163107-1-ranjani.sridharan@linux.intel.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      a27b421f
    • Kai Vehmanen's avatar
      ASoC: SOF: Intel: add hw specific PCM constraints · caebea04
      Kai Vehmanen authored
      
      
      Part of PCM constraints are set based on DSP topology, but rest
      should be set based on hardware capabilities. Add PCM constraints
      for Intel platforms:
      
      - Add constraint for the period count to be integer. This avoids
        wrap-arounds of the DMA circular buffer in middle of a period.
      
      - Align period size to dword/32bit as per HDA spec.
      
      Both constraints are aligned with current implementation in snd-hda-intel
      driver.
      
      Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Link: https://lore.kernel.org/r/20201118140545.2138895-2-kai.vehmanen@linux.intel.com
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      caebea04