1. 07 10月, 2014 1 次提交
  2. 30 9月, 2014 1 次提交
  3. 28 9月, 2014 1 次提交
  4. 24 9月, 2014 1 次提交
  5. 23 9月, 2014 2 次提交
  6. 06 9月, 2014 1 次提交
  7. 05 9月, 2014 4 次提交
    • L
      ASoC: Always run default suspend/resume code · a8093297
      Lars-Peter Clausen 提交于
      We do a bit more than just running the callbacks during suspend and resume
      these days (e.g. call regcache_mark_dirty() during suspend). But this is
      only when suspend and resume callbacks are specified for the driver,
      otherwise nothing is done. This means that drivers which don't want to do
      anything special during suspend and resume, but still want the standard
      operations to run, need to provide empty suspend and resume callback
      functions (rather than no callbacks). This patch updates the suspend and
      resume code to always run standard sequence regardless of whether suspend
      and resume handlers are provided.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a8093297
    • 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
    • L
      ASoC: Shutdown DAPM contexts when removing a card · 1c325f77
      Lars-Peter Clausen 提交于
      Currently when a ASoC sound card is unregistered we leave the individual
      components in their current state, just call the remove() callback and leave
      it to the drivers to do the proper shutdown/cleanup.
      
      This patch introduces a call to snd_soc_dapm_shutdown() when removing the
      card.  This will make sure that all DAPM widgets are properly powered down
      and all DAPM contexts are put at the SND_SOC_BIAS_OFF level. This will
      ensure that all components are properly powered down when the card is
      removed.
      
      Since a lot of drivers manually go to SND_SOC_BIAS_OFF in their remove
      callback this will also allow us to remove a bit of duplicated code.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1c325f77
    • L
      ASoC: Set card->instantiated to false when removing the card · 01e0df66
      Lars-Peter Clausen 提交于
      Set card->instantiated to false when the card is removed to make sure that
      operations that expect the card to be fully instantiated do not run anymore
      during card removal.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      01e0df66
  8. 29 8月, 2014 1 次提交
  9. 26 8月, 2014 1 次提交
  10. 19 8月, 2014 13 次提交
    • L
      ASoC: Replace list_empty(&card->codec_dev_list) with !card->instantiated · c5599b87
      Lars-Peter Clausen 提交于
      With componentization we no longer necessarily need a snd_soc_codec struct for a
      card. Instead of checking if the card's CODEC list is empty just use
      card->instantiated to check if the card has been instantiated yet.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      c5599b87
    • 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: Consolidate CPU and CODEC DAI lookup · 14621c7e
      Lars-Peter Clausen 提交于
      The lookup of CPU and CODEC DAIs is fairly similar and can easily be
      consolidated into a single helper function.
      
      There are two main differences in the current implementation of the CPU and
      CODEC DAI lookup:
       1) CPU DAIs can be looked up by the DAI name alone and do not necessarily
         require a component name/of_node.
       2) The CODEC DAI search only considers DAIs from CODEC components.
      
      For 1) the new helper function will allow to lookup DAIs without providing a
      component name or of_node, but since snd_soc_register_card() already rejects
      CODEC DAI link components without neither a of_node or a name we'll never get
      into the situation where we try to lookup a CODEC DAI without a name/of_node.
      For 2) the new helper function just always considers all components.
      Componentization is now at a point where it is possible to register a CODEC as a
      snd_soc_component rather than a snd_soc_codec, by considering DAIs from all
      components it is possible to use such a CODEC in a DAI link.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      14621c7e
    • L
      ASoC: Consolidate CPU and CODEC DAI removal · e60cd14f
      Lars-Peter Clausen 提交于
      CPU and CODEC DAI works exactly the same way. There is already a helper function
      for CODEC DAI removal, use that one as well for CPU DAI removal.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      e60cd14f
    • L
      ASoC: Cleanup DAI module reference counting · ffbd7dd7
      Lars-Peter Clausen 提交于
      Currently when a DAI has no CODEC associated to it the reference on the module
      containing the DAI driver is increased when the DAI is probed and decrease when
      the DAI is removed. For DAIs with CODECs the module reference count was already
      incremented when the CODEC is probed. Now that all components have their module
      reference count incremented when they are probed and all DAIs do have a
      component it is possible to remove the module reference counting on DAI probe
      and removal.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ffbd7dd7
    • L
      ASoC: Move component->probed check into soc_{remove,probe}_component() · 70090bbb
      Lars-Peter Clausen 提交于
      Having the check in a centralized place makes the code a bit cleaner and
      shorter.
      
      Note: There is a slight semantic change in this patch. soc_probe_aux_dev() will
      no longer return -EBUSY if the AUX dev has already been probed before. This is
      fine though since it will simply do nothing in that case and return success.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      70090bbb
    • 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: Make rtd->codec optional · 93c3ce76
      Lars-Peter Clausen 提交于
      There are some place in the ASoC core that expect rtd->codec to be non NULL
      (mainly CODEC specific sysfs files). With componentization going forward
      rtd->codec might be NULL in some cases. This patch prepares the core for this by
      not registering CODEC specific sysfs files if rtd->codec is NULL. sysfs file
      removal does not need to be conditionalized as it handles the removal of
      non-existing files just fine.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      93c3ce76
    • 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
  11. 17 8月, 2014 1 次提交
  12. 23 7月, 2014 3 次提交
  13. 17 7月, 2014 2 次提交
  14. 09 7月, 2014 1 次提交
  15. 03 7月, 2014 4 次提交
  16. 02 7月, 2014 1 次提交
  17. 28 6月, 2014 1 次提交
  18. 22 6月, 2014 1 次提交