1. 06 3月, 2014 5 次提交
  2. 18 1月, 2014 1 次提交
  3. 15 1月, 2014 2 次提交
  4. 09 1月, 2014 1 次提交
  5. 08 1月, 2014 2 次提交
  6. 07 1月, 2014 2 次提交
  7. 04 12月, 2013 2 次提交
  8. 02 12月, 2013 1 次提交
  9. 28 11月, 2013 2 次提交
    • L
      ASoC: pcm: Always honor DAI min and max sample rate constraints · 78e45c99
      Lars-Peter Clausen 提交于
      snd_pcm_limit_hw_rates() will initialize the minimum and maximum sample rate for
      the PCM stream based on the rates specified in the rates field. Since we call
      snd_pcm_limit_hw_rates() after soc_pcm_init_runtime_hw() it will essentially
      overwrite the min and max rate set in soc_pcm_init_runtime_hw(). This may cause
      the minimum or maximum rate to be set to a value outside the range of one of the
      components if one of the components sets either SNDRV_PCM_RATE_CONTINUOUS or
      SNDRV_PCM_RATE_KNOT and the other component specified a discrete rate via
      SNDRV_PCM_RATE_[0-9]* that is outside of the first component's rate range. To
      fix this first calculate the minimum and maximum rates using
      snd_pcm_limit_hw_rates() and then on top of that apply the contraints specified
      in the snd_soc_pcm_stream structs.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NTakashi iwai <tiwai@suse.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      78e45c99
    • L
      ASoC: pcm: Fix rate_max calculation · 17b6c19b
      Lars-Peter Clausen 提交于
      In order to make sure that the sample rate is in the supported range of both
      components the maximum rate of the card should be the minimum of the maximum
      rate of each components. There is one special case to consider though, if
      max_rate is set to 0 this means there is no maximum specified, so use
      min_not_zero() macro which will give use the desired result.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NTakashi iwai <tiwai@suse.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      17b6c19b
  10. 24 11月, 2013 2 次提交
    • N
      ASoC: soc-pcm: move DAIs parameters cleaning into hw_free() · d3383420
      Nicolin Chen 提交于
      We're now applying soc_hw_params_symmetry() to reject unmatched parameters
      while we clear parameters in soc_pcm_close(). So here's a use case might be
      broken by this mechanism: aplay -Dhw:0 44100.wav 48000.wav 32000.wav
      
      In this case, we call soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free()
      ->soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. As we
      only clear parameters in soc_pcm_close(). The parameters would be remained
      in the system even if the playback of 44100.wav is finished.
      
      Thus, this patch is trying to move parameters cleaning into hw_free() so that
      the system can continue to serve this kind of use case.
      
      Also, since we set them in hw_params(), it should be better to clear them in
      hw_free() for symmetry.
      Signed-off-by: NNicolin Chen <b42378@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      d3383420
    • 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
  11. 05 11月, 2013 1 次提交
    • N
      ASoC: Add pinctrl PM to components of active DAIs · 988e8cc4
      Nicolin Chen 提交于
      It's quite popular that more drivers are using pinctrl PM, for example:
      (Documentation/devicetree/bindings/arm/primecell.txt). Just like what
      runtime PM does, it would deactivate and activate pin group depending
      on whether it's being used or not.
      
      And this pinctrl PM might be also beneficial to cpu dai drivers because
      they might have actual pinctrl so as to sleep their pins and wake them
      up as needed.
      
      To achieve this goal, this patch sets pins to the default state during
      resume or startup; While during suspend and shutdown, it would set pins
      to the sleep state.
      
      As pinctrl PM would return zero if there is no such pinctrl sleep state
      settings, this patch would not break current ASoC subsystem directly.
      
      [ However, there is still an exception that the patch can not handle,
      that is, when cpu dai driver does not have pinctrl property but another
      device has it. (The AUDMUX <-> SSI on Freescale i.MX6 series for example.
      SSI as a cpu dai doesn't contain pinctrl property while AUDMUX, an Audio
      Multiplexer, has it). In this case, this kind of cpu dai driver needs to
      find a way to obtain the pinctrl property as its own, by moving property
      from AUDMUX to SSI, or creating a pins link/dependency between these two
      devices, or using a more decent way after we figure it out. ]
      Signed-off-by: NNicolin Chen <b42378@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      988e8cc4
  12. 01 11月, 2013 2 次提交
  13. 01 10月, 2013 1 次提交
  14. 01 9月, 2013 1 次提交
  15. 24 7月, 2013 1 次提交
  16. 18 7月, 2013 1 次提交
  17. 07 6月, 2013 1 次提交
  18. 03 6月, 2013 1 次提交
  19. 14 5月, 2013 2 次提交
  20. 08 2月, 2013 1 次提交
    • M
      ASoC: core: Allow digital mute for capture · da18396f
      Mark Brown 提交于
      Help avoid noise from the power up of the capture path propagating through
      into the start of the recording (especially noise caused by the ramp of
      microphone biases) by keeping the capture muted until after we've finished
      powering things up with DAPM in the same manner we do for playback. This
      allows us to take advantage of soft mute support in the hardware more
      effectively and is more consistent.
      
      The core code using the existing digital mute operation is updated to take
      advantage of this. Some additional cases in the soc-pcm code and suspend
      will need separate handling but these are less practically relevant than
      the main runtime stream start/stop case.
      
      Rather than refactor the digital mute function in every single driver a
      new operation is added for drivers taking advantage of this functionality,
      the old operation should be phased out over time.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by Vinod Koul <vinod.koul@intel.com>
      Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
      da18396f
  21. 12 1月, 2013 1 次提交
  22. 20 12月, 2012 1 次提交
  23. 15 12月, 2012 1 次提交
    • M
      ASoC: Prevent pop_wait overwrite · 9bffb1fb
      Misael Lopez Cruz 提交于
      pop_wait is used to determine if a deferred playback close
      needs to be cancelled when the a PCM is open or if after
      the power-down delay expires it needs to run. pop_wait is
      associated with the CODEC DAI, so the CODEC DAI must be
      unique. This holds true for most CODECs, except for the
      dummy CODEC and its DAI.
      
      In DAI links with non-unique dummy CODECs (e.g. front-ends),
      pop_wait can be overwritten by another DAI link using also a
      dummy CODEC. Failure to cancel a deferred close can cause
      mute due to the DAPM STOP event sent in the deferred work.
      
      One scenario where pop_wait is overwritten and causing mute
      is below (where hw:0,0 and hw:0,1 are two front-ends with
      default pmdown_time = 5 secs):
      
      aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE -d 1
      sleep 1
      aplay /dev/urandom -D hw:0,1 -c 2 -r 48000 -f S16_LE -d 3 &
      aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE
      
      Since CODECs may not be unique, pop_wait is moved to the PCM
      runtime structure. Creating separate dummy CODECs for each
      DAI link can also solve the problem, but at this point it's
      only pop_wait variable in the CODEC DAI that has negative
      effects by not being unique.
      Signed-off-by: NMisael Lopez Cruz <misael.lopez@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      9bffb1fb
  24. 28 11月, 2012 1 次提交
  25. 21 11月, 2012 1 次提交
  26. 07 7月, 2012 2 次提交
  27. 08 6月, 2012 1 次提交