1. 13 5月, 2014 7 次提交
  2. 06 5月, 2014 1 次提交
  3. 30 4月, 2014 1 次提交
  4. 22 4月, 2014 2 次提交
    • L
      ASoC: dapm: Rename soc_widget_update_bits_locked() to soc_widget_update_bits() · 23d5442b
      Lars-Peter Clausen 提交于
      There is no unlocked version of soc_widget_update_bits_locked() and there is no
      plan to introduce it in the near future, so drop the _locked suffix.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      23d5442b
    • L
      ASoC: Move IO abstraction to the component level · e2c330b9
      Lars-Peter Clausen 提交于
      We currently have two very similar IO abstractions in ASoC, one for CODECs, the
      other for platforms. Moving this to the component level will allow us to unify
      those two. It will also enable us to move the standard kcontrol helpers as well
      as DAPM support to the component level.
      
      The new component level abstraction layer is primarily build around regmap.
      There is a per component pointer for the regmap instance for the underlying
      device. There are four new function snd_soc_component_read(),
      snd_soc_component_write(), snd_soc_component_update_bits() and
      snd_soc_component_update_bits_async(). They have the same signature as their
      regmap counter-part and will internally forward the call one-to-one to regmap.
      If the component it not using regmap it will fallback to using the custom IO
      callbacks. This is done to be able to support drivers that haven't been
      converted to regmap yet, but it is expected that this will eventually be removed
      in the future once all component drivers have been converted to regmap.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      e2c330b9
  5. 21 4月, 2014 1 次提交
    • J
      ASoC: dapm: Fix widget double free with auto-disable DAPM kcontrol · 2697e4fb
      Jarkko Nikula 提交于
      Commit 9e1fda4ae158 ("ASoC: dapm: Implement mixer input auto-disable")
      is trying to free the widget it allocated by snd_soc_dapm_new_control()
      call in dapm_kcontrol_data_alloc() by adding kfree(data->widget) to
      dapm_kcontrol_free().
      
      This is causing a widget double free with auto-disabled DAPM kcontrols
      in sound card unregistration because widgets are already freed before
      dapm_kcontrol_free() is called.
      
      Reason for that is all widgets are added into dapm->card->widgets list
      in snd_soc_dapm_new_control() and freed in dapm_free_widgets() during
      execution of snd_soc_dapm_free().
      
      Now snd_soc_dapm_free() calls for different DAPM contexts happens before
      snd_card_free() call from where the call chain to dapm_kcontrol_free()
      begins:
      
      soc_cleanup_card_resources()
        soc_remove_dai_links()
          soc_remove_link_dais()
            snd_soc_dapm_free(&cpu_dai->dapm)
          soc_remove_link_components()
            soc_remove_platform()
              snd_soc_dapm_free(&platform->dapm)
            soc_remove_codec()
              snd_soc_dapm_free(&codec->dapm)
        snd_soc_dapm_free(&card->dapm)
        snd_card_free()
          snd_card_do_free()
            snd_device_free_all()
              snd_device_free()
                snd_ctl_dev_free()
                  snd_ctl_remove()
                    snd_ctl_free_one()
                      dapm_kcontrol_free()
      
      This wasn't making harm with ordinary DAPM kcontrols since data->widget is NULL for
      them.
      
      Fixes: 9e1fda4ae158 (ASoC: dapm: Implement mixer input auto-disable)
      Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      2697e4fb
  6. 18 4月, 2014 1 次提交
  7. 11 3月, 2014 1 次提交
    • M
      ASoC: dapm: Sprinkle lockdep asserts through the code · f9fa2b18
      Mark Brown 提交于
      Try to spot locking issues by asserting that the DAPM mutex is held when
      it should be. There's a bit of fun due to us not requiring the lock to be
      held prior to the card being instantiated which mean we need to wrap the
      assert in some paths and this isn't methodical by any stretch of the
      imagination.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f9fa2b18
  8. 10 3月, 2014 1 次提交
  9. 03 3月, 2014 2 次提交
  10. 01 3月, 2014 3 次提交
    • L
      ASoC: dapm: Break dapm_set_path_status() appart · 234c0b8f
      Lars-Peter Clausen 提交于
      There are three different completely independent code paths in
      dapm_set_path_status(). One of them is never used at all and the other two (one
      for mixers, one for MUXs) have their distincive callsites that always go onto
      the same path. Breaking the function into two parts allows us to reduce the code
      size and in the MUX case also do some optimizations to avoid having to calcualte
      the selected item for each item again.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      234c0b8f
    • L
      ASoC: dapm: Consolidate MUXs and virtual MUXs · 236aaa68
      Lars-Peter Clausen 提交于
      MUXs and virtual MUXs are almost identical, the only difference is that for
      virtual MUX there is no hardware backing register in which setting is stored.
      This patch adds code, which is similar to what we already do for DAPM mixer
      controls to support virtual mixer controls, to DAPM enum controls. The new code
      will check if the enum does a hardware backing register and skip over reading
      and writing to the register if it has not.  This allows us to use the same code
      path for both MUXs and virtual MUXs and a lot of nearly identical code can be
      removed.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      236aaa68
    • L
      ASoC: dapm: Consolidate MUXs and value MUXs · 3727b496
      Lars-Peter Clausen 提交于
      MUXs and value MUXs are almost identical, the only difference is that a value
      MUX uses a look-up table to map from the selected control item to a register
      value, while MUXs use a direct mapping. This patch uses
      snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item(), which where earlier
      introduced during the consolidation of enum and value enum controls, to hide
      this difference. This allows us to use the same code path for both MUXs and
      value MUXs and a lot of nearly duplicated code can be removed.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3727b496
  11. 20 2月, 2014 3 次提交
  12. 19 2月, 2014 1 次提交
  13. 14 2月, 2014 1 次提交
  14. 18 1月, 2014 1 次提交
  15. 15 1月, 2014 1 次提交
  16. 08 1月, 2014 1 次提交
  17. 17 12月, 2013 1 次提交
  18. 08 11月, 2013 2 次提交
  19. 29 10月, 2013 2 次提交
  20. 10 10月, 2013 2 次提交
    • M
      ASoC: dapm: Run clock and regulator events separately to other supplies · 1dd275b6
      Mark Brown 提交于
      In order to avoid trying to use an external clock or supply for an
      on-chip supply prior to it being enabled move the clock and regulator
      supply events to a separate step in DAPM sequencing from normal supply
      events.
      
      This should have minimal practical impact since these widgets are sorted
      using SND_SOC_NOPM which is a negative value and hence sorted
      separately to any real register writes, though it may be relevant if
      supplies have event callbacks only.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      1dd275b6
    • M
      ASoC: dapm: Use async I/O for DAPM sequences · eb270e98
      Mark Brown 提交于
      Within a DAPM sequence we normally don't care about when exactly a register
      write has completed so long as they happen in the order we requested. This
      means that we can issue most of the writes we do asynchronously which
      should maximise the ability of the underlying frameworks to keep the
      hardware busy, providing a small performance improvement on some systems.
      
      We currently ensure that all writes are completed both when changing to a
      different device and when calling into the regulator and clock frameworks.
      This should ensure that the previous ordering is maintained.
      
      We also ensure that writes are completed prior to calling into widget
      event functions since some event functions implement delays.  This
      should be improved in future so that widgets can disable this sync in
      order to add extra writes.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      eb270e98
  21. 07 10月, 2013 2 次提交
  22. 30 8月, 2013 1 次提交
  23. 27 8月, 2013 2 次提交