1. 19 8月, 2014 3 次提交
    • 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
  2. 23 7月, 2014 3 次提交
  3. 17 7月, 2014 3 次提交
  4. 07 7月, 2014 1 次提交
  5. 22 6月, 2014 5 次提交
    • 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
    • L
      ASoC: Move name_prefix from CODEC to component · 94f99c87
      Lars-Peter Clausen 提交于
      Move the name_prefix from the CODEC struct to the component struct. This will
      eventually allow to specify prefixes for all types of components. It is also
      necessary to make the DAPM code component type independent (i.e. a DAPM context
      does not need to know whether it belongs to a CODEC or a platform or something
      else).
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      94f99c87
  6. 02 6月, 2014 1 次提交
  7. 27 5月, 2014 2 次提交
  8. 26 5月, 2014 2 次提交
    • J
      ASoC: jack: Add support for GPIO descriptor defined jack pins · f025d3b9
      Jarkko Nikula 提交于
      Allow jack GPIO pins be defined also using GPIO descriptor-based interface
      in addition to legacy GPIO numbers. This is done by adding two new fields to
      struct snd_soc_jack_gpio: idx and gpiod_dev.
      
      Legacy GPIO numbers are used only when GPIO consumer device gpiod_dev is
      NULL and otherwise idx is the descriptor index within the GPIO consumer
      device.
      
      New function snd_soc_jack_add_gpiods() is added for typical cases where all
      GPIO descriptor jack pins belong to same GPIO consumer device. For other
      cases the caller must set the gpiod_dev in struct snd_soc_jack_gpio before
      calling snd_soc_jack_add_gpios().
      Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f025d3b9
    • J
      ASoC: jack: Basic GPIO descriptor conversion · 50dfb69d
      Jarkko Nikula 提交于
      This patch does basic GPIO descriptor conversion to soc-jack. Even the GPIOs
      are still passed and requested using legacy GPIO numbers the driver
      internals are converted to use GPIO descriptor API.
      
      Motivation for this is to prepare soc-jack so that it will allow registering
      jack GPIO pins using both GPIO descriptors and legacy GPIO numbers.
      Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      50dfb69d
  9. 07 5月, 2014 3 次提交
  10. 03 5月, 2014 1 次提交
  11. 02 5月, 2014 1 次提交
  12. 23 4月, 2014 1 次提交
  13. 22 4月, 2014 2 次提交
    • L
      ASoC: Move standard kcontrol helpers to the component level · 907fe36a
      Lars-Peter Clausen 提交于
      After moving the IO layer inside ASoC to the component level we can now easily
      move the standard control helpers also to the component level. This allows to
      reuse the same standard helper control implementations for other components.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      907fe36a
    • 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
  14. 21 4月, 2014 1 次提交
  15. 19 4月, 2014 1 次提交
  16. 16 4月, 2014 1 次提交
  17. 15 4月, 2014 8 次提交
  18. 19 3月, 2014 1 次提交