1. 07 5月, 2014 3 次提交
  2. 03 5月, 2014 1 次提交
  3. 30 4月, 2014 1 次提交
    • J
      ASoC: core: Fix component_list corruption when unloading modules · 4da53393
      Jarkko Nikula 提交于
      This fixes module unload regressions introduced by commits 98e639fb
      ("ASoC: Track which components have been registered with
      snd_soc_register_component()") and b37f1d12 ("ASoC: Let snd_soc_platform
      subclass snd_soc_component").
      
      First commit causes component_list to be corrupted when removing codec and
      second when removing platform. Reason for both is that components associated
      with platform or codec are never removed from the list because for them
      registered_as_component field in struct snd_soc_component is always false.
      
      Now list becomes corrupted when snd_soc_unregister_platform() or
      snd_soc_unregister_codec() frees the platform or codec structure and where
      the associated struct snd_soc_component is embedded.
      
      Fix these by moving component unregistration and cleanup to a new local
      function __snd_soc_unregister_component() that takes component as its
      argument.
      
      Since component is known for platforms and codecs the
      __snd_soc_unregister_component() can be called directly and
      snd_soc_unregister_component() takes care to find and unregister only
      components that were registered using snd_soc_register_component().
      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>
      4da53393
  4. 23 4月, 2014 1 次提交
    • N
      ASoC: core: Don't break component searching if both id and num_dai are 0 · 3dcba280
      Nicolin Chen 提交于
      The commit e41975ed (ASoC: core: Fix the DAI name getting) added a break
      within the "if (id < 0 || id >= pos->num_dai)" while the original design
      of the search didn't break the loop if that condition contented but only
      mark the ret error and let it go on to search the next component.
      
      In a case like dmaengine which's not a dai but as a component sharing an
      identical name with a dai, both the id and pos->num_dai here could be 0.
      If we break the search, we may never find the dai we want as it might be
      placed behind its dmaengine in the component list.
      
      So this patch fixes the issue above by following the original design to
      let the search carry on.
      Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3dcba280
  5. 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
  6. 19 4月, 2014 1 次提交
  7. 15 4月, 2014 13 次提交
  8. 25 3月, 2014 2 次提交
  9. 12 3月, 2014 1 次提交
  10. 11 3月, 2014 2 次提交
  11. 10 3月, 2014 3 次提交
    • L
      ASoC: Add a per component dai list · 1438c2f6
      Lars-Peter Clausen 提交于
      Now that every DAI has a component we can track the DAIs on a per component
      basis. This simplifies the DAI lookup when we are only interested in DAIs of a
      specific component and also makes it possible to have multiple components with
      the same parent device and also register DAIs.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      1438c2f6
    • L
      ASoC: Pass CODEC to snd_soc_register_dais() · 6cc240f3
      Lars-Peter Clausen 提交于
      snd_soc_register_dais() looks up the CODEC that is registering the DAIs by
      looping over all registered CODECs. This patch updates the code to
      simply pass the CODEC that registers the DAIs to snd_soc_register_dais() thus
      avoiding the lookup.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      6cc240f3
    • L
      ASoC: Consolidate snd_soc_register_dai() and snd_soc_register_dais() · 32c9ba54
      Lars-Peter Clausen 提交于
      snd_soc_register_dais() has basically the same code as snd_soc_register_dai(),
      but running in a loop. The only difference is that snd_soc_register_dai() calls
      fmt_single_name() to generate the DAIs name and snd_soc_register_dais() calls
      fmt_multiple_name(). This patch pushes the check in __snd_soc_register_component()
      which decides whether to call snd_soc_register_dai() or snd_soc_register_dais()
      to snd_soc_register_dais() to decide which naming scheme to use. This allows us
      to remove snd_soc_register_dai().
      
      The patch also updates snd_soc_register_dais() to unregister every DAI it finds
      for the component rather than trying to unregister one DAI for each DAI that was
      registered. Both have the same result since there won't be more DAIs than what
      have been registered, but the former is easier to implement.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      32c9ba54
  12. 06 3月, 2014 3 次提交
  13. 04 3月, 2014 2 次提交
  14. 01 3月, 2014 1 次提交
    • L
      ASoC: Consolidate enum and value enum controls · 29ae2fa5
      Lars-Peter Clausen 提交于
      The implementations for enum and value enum controls are almost identical. The
      only difference is that the value enum uses an additional look-up table to map
      the control value to the register value, while the enum control uses a direct
      mapping. Enums and value enums can easily be distinguished at runtime, for value
      enums the values field of the snd_soc_enum struct contains the look-up table,
      while for enums it is NULL. This patch adds two new small helper functions
      called snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item() which map
      between register value and control item. If the items field of the snd_soc_enum
      struct is NULL the function will do a direct mapping otherwise they'll use the
      look-up table to do the mapping. Using these small helper functions it is
      possible to use the same kcontrol handlers for both enums and value enums. The
      functions are added a inline functions in soc.h so they can also be used by the
      DAPM code to accomplish similar consolidation.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      29ae2fa5
  15. 28 2月, 2014 1 次提交
    • X
      ASoC: core: Set the default I/O up try regmap. · fe2265e4
      Xiubo Li 提交于
      For most CODEC drivers which the REGMAP is used, the soc_probe_codec()
      will do the stuff work of snd_soc_codec_set_cache_io(), which the CODEC
      drivers' ASoC probe will do too, and almost at the same time.
      
      This patch set the default I/O up try regmap, and then the CODEC drivers'
      stuff work of snd_soc_codec_set_cache_io() will be redundant, while if one
      CODEC driver needed to set it's own I/O, then it can rewrite the default ones.
      Then could we just discard the snd_soc_codec_set_cache_io() from the CODEC
      drivers' ASoC probe to simplify the code.
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      fe2265e4
  16. 23 2月, 2014 1 次提交
    • X
      ASoC: core: add TDM slot parsing from DT supports · 89c67857
      Xiubo Li 提交于
      For some CPU/CODEC DAI devices the TDM slot infomation maybe needed. This
      patch adds the slot parsing from DT supports.
      
      TDM slot properties:
          dai-tdm-slot-num : Number of slots in use.
          dai-tdm-slot-width :  Width in bits for each slot.
      
      For instance:
          dai-tdm-slot-num = <2>;
          dai-tdm-slot-width = <8>;
      
      And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
      to specify a explicit mapping of the channels and the slots. If it's absent
      the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
      tx and rx masks.
      
      For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
      for an active slot as default, and the default active bits are at the LSB of
      the masks.
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      89c67857
  17. 20 2月, 2014 1 次提交
  18. 14 2月, 2014 1 次提交