1. 19 4月, 2015 1 次提交
  2. 27 1月, 2015 1 次提交
  3. 08 1月, 2015 1 次提交
  4. 26 11月, 2014 2 次提交
    • J
      ASoC: Remove 'const' from the device_node pointers · c362effe
      Jean-Francois Moine 提交于
      As Russell King's explained it, there should not be pointers to
      struct device_node:
      
      "struct device_node is a ref-counted structure.  That means if you
       store a reference to it, you should "get" it, and you should "put"
       it once you've done.  The act of "put"ing the pointed-to structure
       involves writing to that structure, so it is totally unappropriate
       to store a device_node structure as a const pointer.  It forces you
       to have to cast it back to a non-const pointer at various points
       in time to use various OF function calls."
      
      [This isn't quite the application here, we're not geting or putting the
      pointer though we did add some other users who call non-const OF
      functions -- broonie]
      Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      c362effe
    • L
      ASoC: Disable regmap helpers if regmap is disabled · e874bf5f
      Lars-Peter Clausen 提交于
      If regmap is disabled there will be no users of the ASoC regmap helpers.
      Furthermore regmap_exit() will no be defined causing the following compile
      error:
      	sound/soc/soc-core.c: In function 'snd_soc_component_exit_regmap':
      	sound/soc/soc-core.c:2645:2: error: implicit declaration of function
      		'regmap_exit' [-Werror=implicit-function-declaration]
      
      So disable the helpers if regmap is disabled.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Fixes: 20feb881 ASoC: Add helper functions for deferred regmap setup")
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      e874bf5f
  5. 25 11月, 2014 1 次提交
  6. 19 11月, 2014 1 次提交
  7. 18 11月, 2014 5 次提交
  8. 11 11月, 2014 1 次提交
  9. 09 11月, 2014 1 次提交
  10. 03 11月, 2014 1 次提交
  11. 28 10月, 2014 1 次提交
  12. 06 9月, 2014 2 次提交
  13. 05 9月, 2014 1 次提交
    • L
      ASoC: Add support for automatically going to BIAS_OFF on suspend · 86dbf2ac
      Lars-Peter Clausen 提交于
      There is a substantial amount of drivers that in go to SND_SOC_BIAS_OFF on
      suspend and go back to SND_SOC_BIAS_SUSPEND on resume (Often this is even
      the only thing done in the suspend and resume handlers). This patch
      introduces a new suspend_bias_off flag, which when set by a driver will let
      the ASoC core automatically put the device's DAPM context at the
      SND_SOC_BIAS_OFF level during suspend. Once the device is resumed the DAPM
      context will go back to SND_SOC_BIAS_STANDBY (if the context is idle,
      otherwise to SND_SOC_BIAS_ON).
      
      This will allow us to remove a fair bit of duplicated code from the drivers.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      86dbf2ac
  14. 29 8月, 2014 1 次提交
  15. 19 8月, 2014 7 次提交
    • L
      ASoC: Remove support for legacy snd_soc_platform IO · 75af7c08
      Lars-Peter Clausen 提交于
      There were never any actual users of this in upstream and by we have with
      regmap a replacement in place, which should be used by new drivers.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      75af7c08
    • L
      ASoC: Automatically initialize regmap for all components · 886f5692
      Lars-Peter Clausen 提交于
      So far regmap is only automatically initialized for CODECs. Now that we have the
      infrastructure in place to let components have DAPM widgets and controls that
      want to use the generic regmap based IO also make sure to automatically
      initialize regmap for all components.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      886f5692
    • L
      ASoC: Pass component instead of DAPM context to AUX dev init callback · 57bf7726
      Lars-Peter Clausen 提交于
      Given that the component is the containing structure it makes more sense to pass
      the component rather than the DAPM context to the AUX dev init callback.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      57bf7726
    • L
      ASoC: Move AUX dev support to the component level · 65d9361f
      Lars-Peter Clausen 提交于
      This patch makes it possible to register arbitrary components as a AUX dev
      for a card. This was previously only possible for CODEC components. With
      componentization having made it possible for components to have DAPM contexts
      and controls there is no reason why AUX devs should be artificially limited to
      snd_soc_codec devices.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      65d9361f
    • L
      ASoC: Add component level probe/remove support · 61aca564
      Lars-Peter Clausen 提交于
      Now that we have a unified probe and remove path make sure to call them for all
      components. soc_{probe,remove}_component are responsible for setting up the DAPM
      context for the component, initialize the component prefix, manage the debugfs
      entries as well as do the registration of table based controls and DAPM
      elements. They also call the component drivers probe and remove callbacks. This
      patch makes these things available for generic snd_soc_component drivers rather
      than only having them for snd_soc_codec and snd_soc_platform drivers.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      61aca564
    • L
      ASoC: Consolidate platform and CODEC probe/remove · f1d45cc3
      Lars-Peter Clausen 提交于
      The platform and CODEC probe and remove code is now largely identical. This
      patch consolidates it at the component level.
      
      The resulting code is slightly larger due to all the boiler plate code setting
      up the indirection for the table based control and DAPM registration.  Once all
      drivers have been update to no longer use the snd_soc_codec_driver and
      snd_soc_platform_driver specific fields for this the indirection can be removed
      again.
      
      This patch contains two noteworthy hacks that are only meant to be temporary to
      be able to update drivers and the core in separate incremental patches.
      
      The first hack is related to that some DPCM platforms expect that the DAPM
      widgets for the DAIs of a snd_soc_component are created in the DAPM context of
      the snd_soc_platform that has the same parent device. For handling this the
      steal_sibling_dai_widgets attribute is introduced. It gets set for
      snd_soc_platforms that register DAPM elements. When creating the DAI widgets for
      a component this flag is checked and if it is found on one of the siblings the
      component will not create any DAI widgets in its own DAPM context. If the
      attribute is set on a platform it will look for siblings components and create
      DAI widgets for them in its own context. The fix for this will be to update
      the offending drivers to only register a single component rather than two.
      
      The second hack deals with the fact that the ASoC card suspend and resume code
      still needs a list of CODECs that have been registered for the card. To handle
      this the generic probe and remove path have a check to see if the component is
      CODEC and if yes add/remove it to the card's CODEC list. While it is possible to
      clean up the suspend/resume code to not need the CODEC list anymore this is a
      bit of a chicken and egg problem since it will become easier to clean up the
      suspend/resume code once there is a unified component layer.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f1d45cc3
    • L
      ASoC: Move debugfs registration to the component level · 81c7cfd1
      Lars-Peter Clausen 提交于
      The debugfs registration is mostly identical between platforms and CODECs. This
      patches consolidates the two implementations at the component level.
      
      Unfortunately there are still a couple of CODEC specific debugfs files that are
      related to legacy ASoC IO that need to be registered. For this a new callback is
      added to the component struct that will be initialized when a CODEC is
      registered and will be used to register the CODEC specific files. Once there are
      no drivers left using legacy IO this can be removed again.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      81c7cfd1
  16. 18 8月, 2014 1 次提交
  17. 17 8月, 2014 1 次提交
  18. 23 7月, 2014 3 次提交
  19. 17 7月, 2014 3 次提交
  20. 07 7月, 2014 1 次提交
  21. 22 6月, 2014 4 次提交
    • L
      ASoC: Add component level stream_event() and seq_notifier() support · 14e8bdeb
      Lars-Peter Clausen 提交于
      This patch adds stream_event() and seq_notifier() callbacks similar to those
      found in the snd_soc_codec_driver and snd_soc_platform driver struct to the
      snd_soc_component_driver struct. This is meant to unify the handling of these
      callbacks across different types of components and will eventually allow their
      removal from the CODEC and platfrom driver structs.
      
      The new callbacks are slightly different from the old ones in that they take a
      snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was
      done since otherwise casting from the DAPM context to the component would
      typically be the first thing to do in the callback. And the interface becomes
      slightly cleaner by passing a snd_soc_component to all callbacks in the
      snd_soc_component_driver struct.
      
      The patch also already removes the stream_event() callback from the
      snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently
      unused.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      14e8bdeb
    • L
      ASoC: Use component DAPM context for platforms · bc9af9fa
      Lars-Peter Clausen 提交于
      The snd_soc_platform dapm field is not accessed outside of the ASoC core. Switch
      it over to using the snd_soc_component DAPM context.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      bc9af9fa
    • L
      ASoC: Add DAPM support at the component level · ce0fc93a
      Lars-Peter Clausen 提交于
      This patch adds full DAPM support at the component level. Previously there was
      only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor
      MUXs) for platforms. Having DAPM support at the component level will allow all
      types of components to use DAPM and also help in consolidating the DAPM support
      between CODECs and platforms.
      
      Since the DAPM context is directly embedded into the snd_soc_codec and
      snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of
      drivers moving the field just right now is not possible without causing code
      churn. The approach this patch takes is to add two new fields to the component
      struct. One field which is the pointer to the actual DAPM context used by the
      component and one DAPM context that will be used as the default if no other
      context was specified. For CODECs and platforms the pointer is initialized to
      point to the CODEC or platform DAPM context. All generic code when referencing
      a component's DAPM struct will go via the pointer. This will make it possible to
      eventually seamlessly move the DAPM context from snd_soc_codec and
      snd_soc_platform struct over once all direct references have been eliminated.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ce0fc93a
    • L
      ASoC: Move name and id from CODEC/platform to component · f4333203
      Lars-Peter Clausen 提交于
      The component struct already has a name and id field which are initialized to
      the same values as the same fields in the CODEC and platform structs. So remove
      them from the CODEC and platform structs and used the ones from the component
      struct instead.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f4333203