1. 13 Oct, 2021 7 commits
  2. 12 Oct, 2021 1 commit
  3. 11 Oct, 2021 11 commits
  4. 08 Oct, 2021 13 commits
  5. 07 Oct, 2021 8 commits
    • Mark Brown's avatar
      Merge series "Add reset-gpios handling for max98927" from Alejandro Tafalla <atafalla@dnyon.com>: · 06a0fc36
      Mark Brown authored
      The max98927 codec on some devices (i.e. Xiaomi Mi A2 Lite phone) requires
      hardware-resetting the codec by driving a reset-gpio. This series adds
      support for it through an optional reset-gpios property.
      
      v4:
      * Correctly assert/deassert the GPIO states
      * Wait for the i2c port to be ready after reset
      * Reset device when removed
      
      v3:
      * Fix indentation on the dev_err_probe line
      
      v2:
      * Use dev_err_probe instead of dev_err
      
      Alejandro Tafalla (2):
        ASoC: max98927: Handle reset gpio when probing i2c
        dt-bindings: sound: max98927: Add reset-gpios optional property
      
       .../devicetree/bindings/sound/max9892x.txt    |  3 +++
       sound/soc/codecs/max98927.c                   | 25 +++++++++++++++++++
       sound/soc/codecs/max98927.h                   |  1 +
       3 files changed, 29 insertions(+)
      
      --
      2.33.0
      06a0fc36
    • Mark Brown's avatar
      Merge series "Introduce new SOF helpers" from Daniel Baluta <daniel.baluta@oss.nxp.com> · 99f11b65
      Mark Brown authored
      Daniel Baluta <daniel.baluta@nxp.com>:
      
      From: Daniel Baluta <daniel.baluta@nxp.com>
      
      This patchseries adds new helpers in order to reduce code duplication
      and prepare for compress audio support with SOF.
      
      Bud Liviu-Alexandru (1):
        ASoC: SOF: Make Intel IPC stream ops generic
      
      Daniel Baluta (3):
        ASoC: SOF: Introduce snd_sof_mailbox_read / snd_sof_mailbox_write
          callbacks
        ASoC: SOF: imx: Use newly introduced generic IPC stream ops
        ASoC: SOF: Introduce fragment elapsed notification API
      
       sound/soc/sof/Kconfig                         |  4 ++
       sound/soc/sof/Makefile                        |  3 +-
       sound/soc/sof/compress.c                      | 51 +++++++++++++++++++
       sound/soc/sof/imx/Kconfig                     |  2 +
       sound/soc/sof/imx/imx8.c                      | 39 +++++++-------
       sound/soc/sof/imx/imx8m.c                     | 26 ++++------
       sound/soc/sof/intel/Makefile                  |  3 --
       sound/soc/sof/intel/apl.c                     |  4 ++
       sound/soc/sof/intel/bdw.c                     | 12 +++--
       sound/soc/sof/intel/byt.c                     | 24 ++++++---
       sound/soc/sof/intel/cnl.c                     |  4 ++
       sound/soc/sof/intel/icl.c                     |  4 ++
       sound/soc/sof/intel/pci-tng.c                 | 12 +++--
       sound/soc/sof/intel/tgl.c                     |  4 ++
       sound/soc/sof/ipc.c                           |  6 ++-
       sound/soc/sof/ops.h                           | 15 ++++++
       sound/soc/sof/pcm.c                           |  7 ++-
       sound/soc/sof/sof-audio.h                     | 11 +++-
       sound/soc/sof/sof-priv.h                      | 28 ++++++----
       .../sof/{intel/intel-ipc.c => stream-ipc.c}   | 50 +++++++++---------
       sound/soc/sof/topology.c                      |  6 ++-
       21 files changed, 218 insertions(+), 97 deletions(-)
       create mode 100644 sound/soc/sof/compress.c
       rename sound/soc/sof/{intel/intel-ipc.c => stream-ipc.c} (58%)
      
      --
      2.27.0
      99f11b65
    • Mark Brown's avatar
      Merge series "ASoC: SOF: Improvements for debugging" from Peter Ujfalusi... · 1cfd7c2e
      Mark Brown authored
      Merge series "ASoC: SOF: Improvements for debugging" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
      
      Hi,
      
      The aim of this series is to clean up, make it easier to interpret and less
      'chatty' prints aimed for debugging errors.
      
      For example currently the DSP/IPC dump is printed every time we have an IPC
      timeout and it is posible to lost the first and more indicative dump to find the
      rootcause.
      
      Regards,
      Peter
      ---
      Peter Ujfalusi (18):
        ASoC: SOF: debug: Swap the dsp_dump and ipc_dump sequence for
          fw_exception
        ASoC: SOF: ipc and dsp dump: Add markers for better visibility
        ASoC: SOF: Print the dbg_dump and ipc_dump once to reduce kernel log
          noise
        ASoC: SOF: loader: Print the DSP dump if boot fails
        ASoC: SOF: intel: atom: No need to do a DSP dump in atom_run()
        ASoC: SOF: debug/ops: Move the IPC and DSP dump functions out from the
          header
        ASoC: SOF: debug: Add SOF_DBG_DUMP_OPTIONAL flag for DSP dumping
        ASoC: SOF: intel: hda-loader: Use snd_sof_dsp_dbg_dump() for DSP dump
        ASoC: SOF: Drop SOF_DBG_DUMP_FORCE_ERR_LEVEL and sof_dev_dbg_or_err
        ASoC: SOF: debug: Print out the fw_state along with the DSP dump
        ASoC: SOF: ipc: Re-enable dumps after successful IPC tx
        ASoC: SOF: ops: Force DSP panic dumps to be printed
        ASoC: SOF: Introduce macro to set the firmware state
        ASoC: SOF: intel: hda: Drop 'error' prefix from error dump functions
        ASoC: SOF: core: Clean up snd_sof_get_status() prints
        ASoC: SOF: loader: Drop SOF_DBG_DUMP_REGS flag when firmware start
          fails
        ASoC: SOF: Intel: hda-loader: Drop SOF_DBG_DUMP_REGS flag from
          dbg_dump calls
        ASoC: SOF: Intel: hda: Dump registers and stack when SOF_DBG_DUMP_REGS
          is set
      
      Pierre-Louis Bossart (1):
        ASoC: SOF: core: debug: force all processing on primary core
      
       sound/soc/sof/core.c             | 24 ++++++-------
       sound/soc/sof/debug.c            | 61 ++++++++++++++++++++++++++++++--
       sound/soc/sof/intel/atom.c       |  5 +--
       sound/soc/sof/intel/hda-loader.c | 11 +++---
       sound/soc/sof/intel/hda.c        | 16 +++------
       sound/soc/sof/ipc.c              | 10 ++++--
       sound/soc/sof/loader.c           | 11 ++++--
       sound/soc/sof/ops.c              |  3 ++
       sound/soc/sof/ops.h              | 12 +------
       sound/soc/sof/pm.c               |  6 ++--
       sound/soc/sof/sof-priv.h         | 31 ++++++++++------
       sound/soc/sof/topology.c         |  6 ++++
       12 files changed, 131 insertions(+), 65 deletions(-)
      
      --
      2.33.0
      1cfd7c2e
    • Mark Brown's avatar
      Merge series "Rockchip I2S/TDM controller" from Nicolas Frattaroli <frattaroli.nicolas@gmail.com>: · 43b05869
      Mark Brown authored
      Hello,
      
      this is version 5 of the I2S/TDM driver patchset. A big thanks
      to everyone who has provided their valuable feedback so far.
      
      Changes in v5:
       driver:
       - change comment style of the first comment to C++ style
       - make refcount non-atomic, as it's only ever used inside
         a spinlock
       - use newer SND_SOC_DAIFMT_CB* defines
       - change ternary statements to if/else conditions
       - make _clk_compensation_put return 1 if clock changed
       - implement set_bclk_ratio callback
       - always set half frame sync mode in TDM mode
       - automatically enable mclk-calibrate mode when the clocks for
         it are specified in the device tree
       bindings:
       - add Reviewed-by: Rob Herring
       - drop rockchip,frame-width property (done by set_bclk_ratio)
       - drop rockchip,fsync-half-frame property
       - drop rockchip,mclk-calibrate property
       dts:
       - drop empty codec block from Quartz64 device tree
      
      Changes in v4:
       driver:
       - factor TDE/RDE enable/disable into their own inlined functions
       - add an RDE disable in a location where it looks like it was
         forgotten (rxctrl else), judging by corresponding TDE code
       - remove parentheses around CLK_PPM_MIN/MAX values
       - wording + titlecasing in the clock compensation control
       - use if statement in precious_reg instead
       - refactor rockchip_i2s_io_multiplex to have the switch statements
         in a function call to make the function less unwieldy
       - get rid of IS_ERR checks around clk enable/disable calls where
         already checked before by the probe
       - reworded some error message strings
       - fix potential deadlock in txrxctrl found by Sugar Zhang
         using spin_lock_irqsave
       - fix potential deadlock in trcm_mode found by Sugar Zhang
         using spin_lock_irqsave
       - use devm_platform_get_and_ioremap_resource in probe
       - only set DMA things if controller has capture/playback ability.
         Did not move this into init_dai because I'd then need to pass in
         the res and probe it earlier in the function, and it's also used
         elsewhere in the probe function
       - use _get_optional_exclusive for reset controls, as some controllers
         only have capture or playback capability
       bindings:
       - remove status = "okay" since that's the default
       - change the path configs to be an enum
       - rename "foo" to "bus"
       - make resets optional as controller may lack either playback or
         capture capability, and therefore also doesn't have a reset.
         At least one reset is still required, because a controller with
         no playback and no capture is not very useful
      
      Changes in v3:
       driver:
       - alphabetically sort includes
       - check pm_runtime_get_sync return value, act on it
       - remove unnecessary initialisers in set_fmt
       - use udelay(15) in retry code: 10 retries * 15 = 150, so at worst
         we wait the full i2s register access delay
       - fix some weird returns to return directly
       - use __maybe_unused instead of #ifdef CONFIG_PM_SLEEP, also put
         __maybe_unused on the runtime callbacks
       - use (foo) instead of foo in header macros for precedence reasons
       - when using mclk-calibrate, also turn off/on those clocks during
         suspend and resume operations
       - remove mclk_tx and mclk_rx reenablement code in remove
       - move hclk enablement further down the probe, and disable it
         on probe failure
       - make reset controls mandatory, since the bindings state this too
       - use _exclusive for getting the reset controls
       - change reset assert/deassert delays to both be 10 usec
         (thank you Sugar Zhang!)
       - properly prepare and enable all mclks in probe, especially before
         calling clk_get_rate on them
       - if registering PCM fails, also use the cleanup error path instead of
         returning directly
       - bring back playback and capture only but in the way Sugar Zhang
         suggested it: set those modes depending on dma-names
       - rework clock enablement in general. Probe now always enables these,
         instead of relying on the pm resume thing
       - add myself to MAINTAINERS for this driver
       dt bindings:
       - fix a description still mentioning clk-trcm in the schema
       - document rockchip,io-multiplex, a property that describes the
         hardware as having multiplexed I2S GPIOs so direction needs to
         be changed dynamically
       - document rockchip,mclk-calibrate, which allows specifying
         different clocks for the two sample rate bases and switch between
         them as needed
       - dma-names now doesn't have a set order and items can be absent to
         indicate that the controller doesn't support this mode
       - add myself to MAINTAINERS for these bindings
      
      Changes in v2:
       - remove ad-hoc writeq and needless (and broken) optimisation in
         reset assert/deassert. This wouldn't have worked on Big Endian,
         and would've been pointless on any other platform, as the
         overhead for saving one write was comparatively big
       - fix various checkpatch issues
       - get rid of leftover clk-trcm in schema
       - set status = "okay" in example in schema instead of "disabled"
       - change dma-names so rx is first, adjust device trees as necessary
       - properly reference uint32-array for rx-route and tx-route
         instead of uint32
       - replace trcm-sync with two boolean properties, adjust DT changes
         accordingly and also get rid of the header file
       - get rid of rockchip,no-dmaengine. This was only needed for
         some downstream driver and shouldn't be in the DT
       - get rid of rockchip,capture-only/playback-only. Rationale being
         that I have no way to test whether they're needed, and
         unconditionally setting channels_min to 0 breaks everything
       - change hclk description in "clocks"
      
      Nicolas Frattaroli (4):
        ASoC: rockchip: add support for i2s-tdm controller
        ASoC: dt-bindings: rockchip: add i2s-tdm bindings
        arm64: dts: rockchip: add i2s1 on rk356x
        arm64: dts: rockchip: add analog audio on Quartz64
      
       .../bindings/sound/rockchip,i2s-tdm.yaml      |  198 ++
       MAINTAINERS                                   |    7 +
       .../boot/dts/rockchip/rk3566-quartz64-a.dts   |   31 +-
       arch/arm64/boot/dts/rockchip/rk356x.dtsi      |   26 +
       sound/soc/rockchip/Kconfig                    |   11 +
       sound/soc/rockchip/Makefile                   |    2 +
       sound/soc/rockchip/rockchip_i2s_tdm.c         | 1848 +++++++++++++++++
       sound/soc/rockchip/rockchip_i2s_tdm.h         |  398 ++++
       8 files changed, 2520 insertions(+), 1 deletion(-)
       create mode 100644 Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
       create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.c
       create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.h
      
      --
      2.33.0
      43b05869
    • Pierre-Louis Bossart's avatar
      ASoC: soc-pcm: restore mixer functionality · 9609cfcd
      Pierre-Louis Bossart authored
      Recent changes in soc-pcm completely broke basic support for mixers on
      Intel systems: the filters on BE states prevent the connection of a
      second mixer input while the back-end is already active.
      
      Rather than reverting the changes, which would be problematic for
      Tegra systems, this patch suggests an additional filter which will
      only apply to Tegra systems. This is a temporary solution which will
      have to be revisited - additional issues have been reported with DPCM.
      
      Fixes: 0c25db3f ('ASoC: soc-pcm: Don't reconnect an already active BE')
      Suggested-by: default avatarSameer Pujar <spujar@nvidia.com>
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
      Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
      Link: https://lore.kernel.org/r/20211004212141.193136-1-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      9609cfcd
    • Derek Fang's avatar
      ASoC: rt5682s: Fix hp pop produced immediately after resuming · 06096537
      Derek Fang authored
      When the system plays a sound immediately after resuming from S3,
      it could hear a little pop from headphones.
      It is due to the HP was unmuted before the completion of
      jack re-detection finished in parallel.
      
      This patch adds a lock to make sure the HP unmute after jack detect handler,
      and adds a few depop changes.
      Signed-off-by: default avatarDerek Fang <derek.fang@realtek.com>
      Link: https://lore.kernel.org/r/20211007085519.12543-1-derek.fang@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      06096537
    • Nicolas Frattaroli's avatar
      ASoC: dt-bindings: rockchip: add i2s-tdm bindings · 510f1c13
      Nicolas Frattaroli authored
      This adds the YAML bindings for the Rockchip I2S/TDM audio driver.
      Signed-off-by: default avatarNicolas Frattaroli <frattaroli.nicolas@gmail.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Link: https://lore.kernel.org/r/20211001171531.178775-3-frattaroli.nicolas@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      510f1c13
    • Nicolas Frattaroli's avatar
      ASoC: rockchip: add support for i2s-tdm controller · 081068fd
      Nicolas Frattaroli authored
      This commit adds support for the rockchip i2s-tdm controller,
      which enables audio output on the following rockchip SoCs:
      - px30
      - rk1808
      - rk3308
      - rk3566
      - rk3568
      - rv1126
      
      This is a cleaned up version of the downstream vendor kernel's
      driver. It can be enabled through the SND_SOC_ROCKCHIP_I2S_TDM
      configuration option.
      Signed-off-by: default avatarNicolas Frattaroli <frattaroli.nicolas@gmail.com>
      Link: https://lore.kernel.org/r/20211001171531.178775-2-frattaroli.nicolas@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      081068fd