1. 21 Sep, 2021 1 commit
  2. 17 Sep, 2021 2 commits
  3. 16 Sep, 2021 2 commits
  4. 15 Sep, 2021 3 commits
  5. 10 Sep, 2021 7 commits
  6. 09 Sep, 2021 3 commits
  7. 03 Sep, 2021 3 commits
  8. 02 Sep, 2021 1 commit
  9. 01 Sep, 2021 7 commits
  10. 30 Aug, 2021 3 commits
  11. 26 Aug, 2021 8 commits
    • Mark Brown's avatar
      Merge series "ASoC: wcd9335: Firx some resources leak in the probe and remove... · 52c64e5f
      Mark Brown authored
      Merge series "ASoC: wcd9335: Firx some resources leak in the probe and remove function" from Christophe JAILLET <christophe.jaillet@wanadoo.fr>:
      
      The first 2 patches are sraightforward and look logical to me.
      
      However, the 3rd one in purely speculative. It is based on the fact that a
      comment states that we enable some irqs on some slave ports. That said, it writes
      0xFF in some registers.
      
      So, I guess that we should disable these irqs when the driver is removed. That
      said, writing 0x00 at the same place looks logical to me.
      
      This cis untested and NOT based on any documentation. Just a blind fix.
      Review with care.
      You'll be warned :)
      
      Christophe JAILLET (3):
        ASoC: wcd9335: Fix a double irq free in the remove function
        ASoC: wcd9335: Fix a memory leak in the error handling path of the
          probe function
        ASoC: wcd9335: Disable irq on slave ports in the remove function
      
       sound/soc/codecs/wcd9335.c | 23 +++++++++++++++++++++--
       1 file changed, 21 insertions(+), 2 deletions(-)
      
      --
      2.30.2
      52c64e5f
    • Pierre-Louis Bossart's avatar
      ASoC: soc-pcm: test refcount before triggering · 6479f758
      Pierre-Louis Bossart authored
      On start/pause_release/resume, when more than one FE is connected to
      the same BE, it's possible that the trigger is sent more than
      once. This is not desirable, we only want to trigger a BE once, which
      is straightforward to implement with a refcount.
      
      For stop/pause/suspend, the problem is more complicated: the check
      implemented in snd_soc_dpcm_can_be_free_stop() may fail due to a
      conceptual deadlock when we trigger the BE before the FE. In this
      case, the FE states have not yet changed, so there are corner cases
      where the TRIGGER_STOP is never sent - the dual case of start where
      multiple triggers might be sent.
      
      This patch suggests an unconditional trigger in all cases, without
      checking the FE states, using a refcount protected by a spinlock.
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Message-Id: <20210817164054.250028-3-pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      6479f758
    • Pierre-Louis Bossart's avatar
      ASoC: soc-pcm: protect BE dailink state changes in trigger · 0c75fc71
      Pierre-Louis Bossart authored
      When more than one FE is connected to a BE, e.g. in a mixing use case,
      the BE can be triggered multiple times when the FE are opened/started
      concurrently. This race condition is problematic in the case of
      SoundWire BE dailinks, and this is not desirable in a general
      case. The code carefully checks when the BE can be stopped or
      hw_free'ed, but the trigger code does not use any mutual exclusion.
      
      Fix by using the same spinlock already used to check FE states, and
      set the state before the trigger. In case of errors,  the initial
      state will be restored.
      
      This patch does not change how the triggers are handled, it only makes
      sure the states are handled in critical sections.
      Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Message-Id: <20210817164054.250028-2-pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      0c75fc71
    • Christophe JAILLET's avatar
      ASoC: wcd9335: Disable irq on slave ports in the remove function · d3efd26a
      Christophe JAILLET authored
      The probe calls 'wcd9335_setup_irqs()' to enable interrupts on all slave
      ports.
      This must be undone in the remove function.
      
      Add a 'wcd9335_teardown_irqs()' function that undoes 'wcd9335_setup_irqs()'
      function, and call it from the remove function.
      
      Fixes: 20aedafd ("ASoC: wcd9335: add support to wcd9335 codec")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Message-Id: <8f761244d79bd4c098af8a482be9121d3a486d1b.1629091028.git.christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      d3efd26a
    • Christophe JAILLET's avatar
      ASoC: wcd9335: Fix a memory leak in the error handling path of the probe function · fc6fc81c
      Christophe JAILLET authored
      If 'wcd9335_setup_irqs()' fails, me must release the memory allocated in
      'wcd_clsh_ctrl_alloc()', as already done in the remove function.
      
      Add an error handling path and the missing 'wcd_clsh_ctrl_free()' call.
      
      Fixes: 20aedafd ("ASoC: wcd9335: add support to wcd9335 codec")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Message-Id: <6dc12372f09fabb70bf05941dbe6a1382dc93e43.1629091028.git.christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      fc6fc81c
    • Christophe JAILLET's avatar
      ASoC: wcd9335: Fix a double irq free in the remove function · 7a6a723e
      Christophe JAILLET authored
      There is no point in calling 'free_irq()' explicitly for
      'WCD9335_IRQ_SLIMBUS' in the remove function.
      
      The irqs are requested in 'wcd9335_setup_irqs()' using a resource managed
      function (i.e. 'devm_request_threaded_irq()').
      'wcd9335_setup_irqs()' requests all what is defined in the 'wcd9335_irqs'
      structure.
      This structure has only one entry for 'WCD9335_IRQ_SLIMBUS'.
      
      So 'devm_request...irq()' + explicit 'free_irq()' would lead to a double
      free.
      
      Remove the unneeded 'free_irq()' from the remove function.
      
      Fixes: 20aedafd ("ASoC: wcd9335: add support to wcd9335 codec")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Message-Id: <0614d63bc00edd7e81dd367504128f3d84f72efa.1629091028.git.christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      7a6a723e
    • Mark Brown's avatar
      Merge series "Patches to update for rockchip i2s" from Sugar Zhang <sugar.zhang@rock-chips.com>: · 515b436b
      Mark Brown authored
      These patches fixup or update for rockchip i2s.
      
      Changes in v3:
      - Drop property 'rockchip,playback-only', 'rockchip,capture-only'.
        Implement it by 'dma-names' of DT instead.
      
      Changes in v2:
      - split property trcm into single 'trcm-sync-tx-only' and
        'trcm-sync-rx-only' suggested by Nicolas.
      - split property trcm into single 'trcm-sync-tx-only' and
        'trcm-sync-rx-only' suggested by Nicolas.
      - drop change-id
      
      Sugar Zhang (12):
        ASoC: rockchip: i2s: Add support for set bclk ratio
        ASoC: rockchip: i2s: Fixup clk div error
        ASoC: rockchip: i2s: Improve dma data transfer efficiency
        ASoC: rockchip: i2s: Fix regmap_ops hang
        ASoC: rockchip: i2s: Fix concurrency between tx/rx
        ASoC: rockchip: i2s: Reset the controller if soft reset failed
        ASoC: dt-bindings: rockchip: Document reset property for i2s
        ASoC: rockchip: i2s: Make playback/capture optional
        ASoC: rockchip: i2s: Add compatible for more SoCs
        ASoC: dt-bindings: rockchip: Add compatible strings for more SoCs
        ASoC: rockchip: i2s: Add support for frame inversion
        ASoC: dt-bindings: rockchip: i2s: Document property TRCM
      
      Xiaotan Luo (1):
        ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B
      
      Xing Zheng (1):
        ASoC: rockchip: i2s: Add support for TRCM property
      
       .../devicetree/bindings/sound/rockchip-i2s.yaml    |  19 ++
       sound/soc/rockchip/rockchip_i2s.c                  | 278 +++++++++++++++------
       sound/soc/rockchip/rockchip_i2s.h                  |  10 +-
       3 files changed, 224 insertions(+), 83 deletions(-)
      
      --
      2.7.4
      515b436b
    • Mark Brown's avatar
      Merge series "Patches to update for rockchip spdif" from Sugar Zhang <sugar.zhang@rock-chips.com>: · dac825b6
      Mark Brown authored
      These patches fixup or update for rockchip spdif.
      
      Sugar Zhang (4):
        ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
        ASoC: rockchip: spdif: Fix some coding style
        ASoC: rockchip: spdif: Add support for rk3568 spdif
        ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
      
       .../devicetree/bindings/sound/rockchip-spdif.yaml  |  1 +
       sound/soc/rockchip/rockchip_spdif.c                | 38 ++++++++++++----------
       2 files changed, 22 insertions(+), 17 deletions(-)
      
      --
      2.7.4
      dac825b6