1. 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
  2. 21 4月, 2014 1 次提交
  3. 16 4月, 2014 1 次提交
  4. 15 4月, 2014 7 次提交
  5. 19 3月, 2014 1 次提交
  6. 11 3月, 2014 1 次提交
  7. 10 3月, 2014 1 次提交
  8. 06 3月, 2014 5 次提交
  9. 04 3月, 2014 1 次提交
  10. 01 3月, 2014 3 次提交
    • L
      ASoC: Add macros for defining virtual enums · b948837a
      Lars-Peter Clausen 提交于
      With the upcoming consolidation of normal MUXs and virtual MUXs we need to be
      able to distinguish between enums with and without a backing register at the
      enum level. Use the same approach as used for virtual mixer controls by setting
      the reg field of the enum to SND_SOC_NOPM for enums without a backing register.
      This patch adds a set of helper macros that can be used to define such enums.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      b948837a
    • 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
    • L
      8303d769
  11. 24 2月, 2014 1 次提交
  12. 23 2月, 2014 2 次提交
    • 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
    • M
      ASoC: io: Remove SND_SOC_I2C · 56b2f349
      Mark Brown 提交于
      Now that all users have been converted to regmap we can eliminate the ASoC
      level wrapper for I2C I/O reducing the amount of duplicated functionality.
      Signed-off-by: NMark Brown <broonie@linaro.org>
      56b2f349
  13. 20 2月, 2014 3 次提交
  14. 16 2月, 2014 1 次提交
  15. 10 2月, 2014 1 次提交
    • X
      ASoC: add snd_soc_of_parse_audio_simple_widgets for DT · 9a6d4860
      Xiubo Li 提交于
      This patch adds snd_soc_of_parse_audio_simple_widgets() and supports
      below style of widgets name on DT:
      
      	"template-wname", "user supplied wname"
      
      For instance:
      	simple-audio-widgets =
      		"Microphone", "Microphone Jack",
      		"Line", "Line In Jack",
      		"Line", "Line Out Jack",
      		"Headphone", "Headphone Jack",
      		"Speaker", "Speaker External";
      
      The "template-wname" currently includes: "Microphone", "Line", "Headphone"
      and "Speaker".
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      9a6d4860
  16. 03 2月, 2014 2 次提交
  17. 18 1月, 2014 1 次提交
  18. 08 1月, 2014 1 次提交
  19. 26 11月, 2013 1 次提交
  20. 24 11月, 2013 1 次提交
    • N
      ASoC: soc-pcm: add symmetry for channels and sample bits · 3635bf09
      Nicolin Chen 提交于
      Some SoCs can only work in mono or stereo mode at one time. So if
      we let them capture a mono stream while playing a stereo stream,
      there might be a problem occur to one of these two streams: double
      paced or slowed down.
      
      In soc-pcm.c, we have soc_pcm_apply_symmetry() to apply the rate
      symmetry. But we don't have one for channels.
      
      Likewise, we can treat symmetric_rate as a solution for those SoCs
      or CODECs which can not handle asymmetrical LRCLK. But it's also
      impossible for them to handle asymmetrical BCLK. And accodring to
      BCLK = LRCLK * channel number * slot size(fixed or sample bits),
      sample bits might also be a problem if they are not using a fixed
      slot size.
      
      Thus, this patch applys symmetry for channels and sample bits.
      
      Meanwhile, there might be a race between two substreams if starting
      simultaneously. Previously, we only added warning to compalin but
      still using conservative way to let it carry on. However, this patch
      rejects the second stream with any unmatched parameter to make sure
      the first existing stream won't be broken.
      Signed-off-by: NNicolin Chen <b42378@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3635bf09
  21. 18 10月, 2013 1 次提交
  22. 07 10月, 2013 1 次提交
  23. 17 9月, 2013 1 次提交
    • K
      ASoC: add .of_xlate_dai_name on snd_soc_component_driver · cb470087
      Kuninori Morimoto 提交于
      ASoC sound driver requires CPU/CODEC drivers for probing,
      and each CPU/CODEC has some DAI on it.
      Then, "dai name matching" have been used to identify
      CPU-CODEC DAI pair on ASoC.
      
      But, the "dai port number matching" is now required from DeviceTree.
      The solution of this issue is to replace
      the dai port number into dai name.
      Now, CPU/CODEC are based on struct snd_soc_component,
      and it can care above as common issue.
      
      This patch adds .of_xlate_dai_name callback interface
      on struct snd_soc_component_driver,
      and snd_soc_of_get_dai_name() which is using .of_xlate_dai_name.
      
      Then, #sound-dai-cells which enables DAI specifier is required
      on CPU/CODEC device tree properties.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      cb470087