1. 23 Aug, 2021 6 commits
  2. 20 Aug, 2021 3 commits
    • Mark Brown's avatar
      Merge series "ASoC: Intel/rt5640: Add support for HP Elite Pad 1000G2... · 77eca00f
      Mark Brown authored
      Merge series "ASoC: Intel/rt5640: Add support for HP Elite Pad 1000G2 jack-detect" from Hans de Goede <hdegoede@redhat.com>:
      
      Changes in v2:
      - Rebase on asoc/for-next
      - New patch: "ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2"
        DAPM pin for the mic on the 2nd jack"
      - Addressed Pierre-Louis' comments about calling
        acpi_dev_add_driver_gpios() twice
      
      Original cover-letter:
      
      The HP Elitepad 1000 G2 tablet has 2 headset jacks:
      
      1. on the dock which uses the output of the codecs built-in HP-amp +
      the standard IN2 input which is always used with the headset-jack.
      
      2. on the tablet itself, this uses the line-out of the codec + an external
      HP-amp, which gets enabled by the ALC5642 codec's GPIO1 pin; and IN1 for
      the headset-mic.
      
      The codec's GPIO1 is also its only IRQ output pin, so this means that
      the codec's IRQ cannot be used on this tablet. Instead the jack-detect
      is connected directly to GPIOs on the main SoC. The dock has a helper
      chip which also detects if a headset-mic is present or not, so there
      are 2 GPIOs for the jack-detect status of the dock. The tablet jack
      uses a single GPIO which indicates if a jack is present or not.
      
      Differentiating between between headphones vs a headset on the tablet jack
      is done by using the usual mic-bias over-current-detection mechanism.
      
      Regards,
      
      Hans
      
      Hans de Goede (6):
        ASoC: rt5640: Move rt5640_disable_jack_detect() up in the rt5640.c
          file
        ASoC: rt5640: Delay requesting IRQ until the machine-drv calls
          set_jack
        ASoC: rt5640: Add optional hp_det_gpio parameter to
          rt5640_detect_headset()
        ASoC: rt5640: Add rt5640_set_ovcd_params() helper
        ASoC: Intel: bytct_rt5640: Add a separate "Headset Mic 2" DAPM pin for
          the mic on the 2nd jack
        ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2
          jack-detect
      
       sound/soc/codecs/rt5640.c             | 136 ++++++++++++----------
       sound/soc/codecs/rt5640.h             |   6 +
       sound/soc/intel/boards/bytcr_rt5640.c | 158 +++++++++++++++++++++++++-
       3 files changed, 234 insertions(+), 66 deletions(-)
      
      --
      2.31.1
      77eca00f
    • Kuninori Morimoto's avatar
      ASoC: rsnd: adg: clearly handle clock error / NULL case · cc64c390
      Kuninori Morimoto authored
      This driver is assuming that all adg->clk[i] is not NULL.
      Because of this prerequisites, for_each_rsnd_clk() is possible to work
      for all clk without checking NULL. In other words, all adg->clk[i]
      should not NULL.
      
      Some SoC might doesn't have clk_a/b/c/i. devm_clk_get() returns error in
      such case. This driver calls rsnd_adg_null_clk_get() and use null_clk
      instead of NULL in such cases.
      
      But devm_clk_get() might returns NULL even though such clocks exist, but
      it doesn't mean error (user deliberately chose to disable the feature).
      NULL clk itself is not error from clk point of view, but is error from
      this driver point of view because it is not assuming such case.
      
      But current code is using IS_ERR() which doesn't care NULL.
      This driver uses IS_ERR_OR_NULL() instead of IS_ERR() for clk check.
      And it uses ERR_CAST() to clarify null_clk error.
      
      One concern here is that it unconditionally uses null_clk if clk_a/b/c/i
      was error. It is correct if it doesn't exist, but is not correct if it
      returns error even though it exist.
      It needs to check "clock-names" from DT before calling devm_clk_get() to
      handling such case. But let's assume it is overkill so far.
      
      Link: https://lore.kernel.org/r/YMCmhfQUimHCSH/n@mwandaReported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87v940wyf9.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      cc64c390
    • Kuninori Morimoto's avatar
      ASoC: rsnd: core: make some arrays static const, makes object smaller · 28889de6
      Kuninori Morimoto authored
      Don't populate arrays on the stack but instead them static const.
      Makes the object code smaller by 48 bytes.
      
      Before:
         text    data     bss     dec     hex filename
        20938     916     104   21958    55c6 ./sound/soc/sh/rcar/core.o
      
      After:
         text    data     bss     dec     hex filename
        20890     916     104   21910    5596 ./sound/soc/sh/rcar/core.o
      
      gcc version 11.1.0)
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87tujkwydx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      28889de6
  3. 19 Aug, 2021 8 commits
  4. 18 Aug, 2021 1 commit
  5. 17 Aug, 2021 5 commits
  6. 16 Aug, 2021 13 commits
  7. 13 Aug, 2021 4 commits
    • Mark Brown's avatar
      Merge series "ASoC: Intel: boards: use software node API" from Pierre-Louis... · 31e53e13
      Mark Brown authored
      Merge series "ASoC: Intel: boards: use software node API" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
      
      This is an update on an earlier contribution from Heikki Krogerus
      
      The function device_add_properties() is going to be removed.
      Replacing it with software node API equivalents.
      
      Thanks for Hans de Goede and Andy Shevchenko for their comments,
      suggestions and Reviewed-by tags on GitHub. The review thread can be
      found at https://github.com/thesofproject/linux/pull/3041)
      
      v3 changes:
      Fixed nit-picks from Andy: label, return value, missing commas/periods.
      Added Andy's Reviewed-by tag
      
      v2 changes: feedback from Andy and Hans
      Better error handling
      Codec reference is kept until the .remove callback
      Remove bus search to find device
      
      v1 changes from Heikki's patches:
      Avoid the use of devm_ routines for Baytrail machine drivers.
      
      Heikki Krogerus (1):
        ASoC: Intel: boards: use software node API in Atom boards
      
      Pierre-Louis Bossart (7):
        ASoC: Intel: boards: harden codec property handling
        ASoC: Intel: boards: handle errors with acpi_dev_get_first_match_dev()
        ASoC: Intel: boards: get codec device with ACPI instead of bus search
        ASoC: Intel: sof_sdw: pass card information to init/exit functions
        ASoC: Intel: sof_sdw_rt711*: keep codec device reference until remove
        ASoC: Intel: use software node API in SoundWire machines
        ASoC: Intel: remove device_properties for Atom boards
      
       sound/soc/intel/boards/bytcht_es8316.c      | 31 ++++++++--
       sound/soc/intel/boards/bytcr_rt5640.c       | 60 +++++++++++++++-----
       sound/soc/intel/boards/bytcr_rt5651.c       | 63 ++++++++++++++-------
       sound/soc/intel/boards/sof_sdw.c            | 20 ++++---
       sound/soc/intel/boards/sof_sdw_common.h     | 37 +++++++-----
       sound/soc/intel/boards/sof_sdw_max98373.c   |  3 +-
       sound/soc/intel/boards/sof_sdw_rt1308.c     |  3 +-
       sound/soc/intel/boards/sof_sdw_rt1316.c     |  3 +-
       sound/soc/intel/boards/sof_sdw_rt5682.c     |  3 +-
       sound/soc/intel/boards/sof_sdw_rt700.c      |  3 +-
       sound/soc/intel/boards/sof_sdw_rt711.c      | 51 +++++++++--------
       sound/soc/intel/boards/sof_sdw_rt711_sdca.c | 52 +++++++++--------
       sound/soc/intel/boards/sof_sdw_rt715.c      |  3 +-
       sound/soc/intel/boards/sof_sdw_rt715_sdca.c |  3 +-
       14 files changed, 223 insertions(+), 112 deletions(-)
      
      --
      2.25.1
      31e53e13
    • Mark Brown's avatar
      Merge series "Add RZ/G2L Sound support" from Biju Das <biju.das.jz@bp.renesas.com>: · f84f6ee0
      Mark Brown authored
      This patch series aims to add ASoC support on RZ/G2L SoC's.
      
      It is based on the work done by Chris Brandt for RZ/A ASoC driver.
      
      v4->v5
       * Moved validation of sample bits in hw_params
       * Removed validation of frame bits as it is redundant
       * split the rz_ssi_start_stop function into rz_ssi_start and rz_ssi_stop.
       * remove the spin_lock around rz_ssi_stream_init.
       * Updated dmas description and removed fixes as it is an enhancement
         now.
       * updated ssi_start functions with setting fifo thresholds
         and ssi_stop function with cancel all dma txn.
      v3->v4:
       * Updated the subject line as per style for the subsystem.
       * Removed select SND_SIMPLE_CARD from Kconfig
       * Added C++ comments for copyright and driver description.
       * Moved validation of channels in hw_params
       * removed asm issue reported by bot as well as Mark
       * replaced master/slave macros with provider/consumer macros
       * Improved locking and added more null pointer checks.
      v2->v3:
       * Fixed the dependency on KCONFIG
       * Merged the binding patch with dma feature added
       * Updated dt binding example with encoded #dma-cells value.
       * Improved Error handling in probe function
       * Removed the passing legacy channel configuration parameters from
         dmaengine_slave_config function
       * started using dma_request_chan instead of deprecated
         dma_request_slave_channel
       * Removed SoC dtsi and config patches from this series. Will send it later.
      v1->v2:
       * Rebased to latest rc kernel
      
      Biju Das (3):
        ASoC: sh: Add RZ/G2L SSIF-2 driver
        ASoC: dt-bindings: renesas,rz-ssi: Update slave dma channel
          configuration parameters
        ASoC: sh: rz-ssi: Add SSI DMAC support
      
       .../bindings/sound/renesas,rz-ssi.yaml        |   22 +-
       sound/soc/sh/Kconfig                          |    6 +
       sound/soc/sh/Makefile                         |    4 +
       sound/soc/sh/rz-ssi.c                         | 1063 +++++++++++++++++
       4 files changed, 1093 insertions(+), 2 deletions(-)
       create mode 100644 sound/soc/sh/rz-ssi.c
      
      --
      2.17.1
      f84f6ee0
    • Mark Brown's avatar
      Merge series "ASoC: SOF: Intel: DMI L1 power optimization for HDaudio... · 6d9d1652
      Mark Brown authored
      Merge series "ASoC: SOF: Intel: DMI L1 power optimization for HDaudio platforms" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
      
      This patchset provides an optimization that result in significant power
      savings on Intel HDAudio platforms using SOF (Sound Open Firmware).
      
      We previously prevented the Intel DSP from enabling the DMI_L1
      capability to work-around issues with pause on capture streams. It
      turns out that this also prevented the platform from entering high C
      states in full-duplex usages such as videoconferencing - a rather
      basic use case since the start of the pandemic.
      
      The support for pause_push/release was already a bit controversial for
      Intel platforms, in theory platforms should only enable PAUSE if they
      can resume on the same sample, which is not the case on any Intel
      platform.
      
      With this patchset, when the user enables DMI L1 via a kernel
      parameter, the PAUSE support is disabled for capture streams. A kernel
      parameter is far from ideal but it's a placeholder until we have an
      API to negotiate capabilities between applications and driver, and
      it's far less confusing than a Kconfig option.
      
      Changes since v1:
      Removal of SPIB support since it may conflict with Takashi's memalloc
      changes. These SPIB changes will be provided after rebase.
      Addition of one cleanup for cppcheck warning
      Move all changes to intel/ directory, no changes in shared code
      Flipped the logic: the selection of DMI L1 disables PAUSE
      
      Pierre-Louis Bossart (4):
        ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description
        ASoC: SOF: Intel: hda-stream: remove always true condition
        ASoC: SOF: Intel: simplify logic for DMI_L1 handling
        ASoC: SOF: Intel: make DMI L1 selection more robust
      
       sound/soc/sof/intel/Kconfig      | 10 ----------
       sound/soc/sof/intel/hda-pcm.c    | 16 ++++++++++++++--
       sound/soc/sof/intel/hda-stream.c | 11 +++++------
       3 files changed, 19 insertions(+), 18 deletions(-)
      
      --
      2.25.1
      6d9d1652
    • Heikki Krogerus's avatar