1. 04 12月, 2013 1 次提交
  2. 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
  3. 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
  4. 01 11月, 2013 2 次提交
  5. 01 10月, 2013 1 次提交
  6. 01 9月, 2013 1 次提交
  7. 24 7月, 2013 1 次提交
  8. 18 7月, 2013 1 次提交
  9. 07 6月, 2013 1 次提交
  10. 03 6月, 2013 1 次提交
  11. 14 5月, 2013 2 次提交
  12. 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
  13. 12 1月, 2013 1 次提交
  14. 20 12月, 2012 1 次提交
  15. 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
  16. 28 11月, 2012 1 次提交
  17. 21 11月, 2012 1 次提交
  18. 07 7月, 2012 2 次提交
  19. 08 6月, 2012 1 次提交
  20. 10 5月, 2012 1 次提交
  21. 08 5月, 2012 1 次提交
  22. 28 4月, 2012 1 次提交
  23. 27 4月, 2012 5 次提交
    • L
      ASoC: pcm: Add pcm operation for pcm ioctl. · be3f3f2c
      Liam Girdwood 提交于
      Provide an ioctl marshaller for ASoC platform drivers.
      This will use the default ALSA handler if no platform
      handler exists.
      
      This is also required for DPCM BE PCMs as snd_pcm_info()
      will call the ioctl as part of stream startup.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      be3f3f2c
    • L
      ASoC: dpcm: Add bespoke trigger() · 07bf84aa
      Liam Girdwood 提交于
      Some on SoC DSP HW is very tightly coupled with DMA and DAI drivers. It's
      necessary to allow some flexability wrt to PCM operations here so that we
      can define a bespoke DPCM trigger() PCM operation for such HW.
      
      A bespoke DPCM trigger() allows exact ordering and timing of component
      triggering by allowing a component driver to manage the final enable
      and disable configurations without adding extra complexity to other
      component drivers. e.g. The McPDM DAI and ABE are tightly coupled on
      OMAP4 so we have a bespoke trigger to manage the trigger to improve
      performance and reduce complexity when triggering new McPDM BEs.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      07bf84aa
    • L
      ASoC: dpcm: Add runtime dynamic route update · 618dae11
      Liam Girdwood 提交于
      This patch allows DPCM to dynamically alter the FE to BE PCM links
      at runtime based on mixer setting updates. DAPM is looked up after
      every mixer update and we perform a DPCM runtime update if the
      mixer has a change of value.
      
      This patchs adds/changes the following :-
      
       o Adds DPCM runtime update core.
       o Changes soc_dapm_mixer_update_power() and soc_dapm_mux_update_power()
         to return if a change has occured rather than 0. No other users check
         atm.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      618dae11
    • L
      ASoC: dpcm: Add debugFS support for DPCM · f86dcef8
      Liam Girdwood 提交于
      Add debugFS files for DPCM link management information.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      f86dcef8
    • L
      ASoC: dpcm: Add Dynamic PCM core operations. · 01d7584c
      Liam Girdwood 提交于
      The Dynamic PCM core allows digital audio data to be dynamically
      routed between different ALSA PCMs and DAI links on SoC CPUs with
      on chip DSP devices. e.g. audio data could be played on pcm:0,0 and
      routed to any (or all) SoC DAI links.
      
      Dynamic PCM introduces the concept of Front End (FE) PCMs and Back
      End (BE) PCMs. The FE PCMs are normal ALSA PCM devices except that
      they can dynamically route digital audio data to any supported BE
      PCM. A BE PCM has no ALSA device, but represents a DAI link and it's
      substream and audio HW parameters.
      
      e.g. pcm:0,0 routing digital data to 2 external codecs.
      
      FE pcm:0,0  ----> BE (McBSP.0) ----> CODEC 0
                   +--> BE (McPDM.0) ----> CODEC 1
      
      e.g. pcm:0,0 and pcm:0,1 routing digital data to 1 external codec.
      
      FE pcm:0,0 ---
                   +--> BE (McBSP.0) ----> CODEC
      FE pcm:0,1 ---
      
      The digital audio routing is controlled by the usual ALSA method
      of mixer kcontrols. Dynamic PCM uses a DAPM graph to work out the
      routing based upon the mixer settings and configures the BE PCMs
      based on routing and the FE HW params.
      
      DPCM is designed so that most ASoC component drivers will need no
      modification at all. It's intended that existing CODEC, DAI and
      platform drivers can be used in DPCM based audio devices without
      any changes. However, there will be some cases where minor changes
      are required (e.g. for very tightly coupled HW) and there are
      helpers to support this too.
      
      Somethimes the HW params of a FE and BE do not match or are
      incompatible, so in these cases the machine driver can reconfigure
      any hw_params and make any DSP perform sample rate / format conversion.
      
      This patch adds the core DPCM code and contains :-
      
       o The FE and BE PCM operations.
       o FE and BE DAI link support.
       o FE and BE PCM creation.
       o BE support API.
       o BE and FE link management.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      01d7584c
  24. 01 4月, 2012 1 次提交
    • L
      ASoC: dapm: Add platform stream event support · d9b0951b
      Liam Girdwood 提交于
      Currently stream events are only perfomed on codec stream widgets only.
      There is now a need to be able to perform stream events on platform
      widgets too.
      
      e.g. we have the ABE platform driver with several DAI links
      to dummy codecs. We need to be able to perform stream events on any
      of the dummy codec DAI links.
      
      This patch also removes the snd_soc_dai * parameter since it's already
      contained within the rtd * parameter.
      
      Finally makle stream event return void since no one checks it anyway.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      d9b0951b
  25. 18 2月, 2012 1 次提交
  26. 09 2月, 2012 1 次提交
  27. 02 2月, 2012 1 次提交
  28. 25 1月, 2012 1 次提交
  29. 22 1月, 2012 1 次提交
  30. 20 1月, 2012 1 次提交
    • M
      ASoC: Allow drivers to specify how many bits are significant on a DAI · 58ba9b25
      Mark Brown 提交于
      Most devices accept data in formats that don't correspond directly to
      their internal format. ALSA allows us to set a msbits constraint which
      tells userspace about this in case it finds it useful (for example, in
      order to avoid wasting effort dithering bits that will be ignored when
      raising the sample size of data) so provide a mechanism for drivers to
      specify the number of bits that are actually significant on a DAI and
      add the appropriate constraints along with all the others.
      
      This is done slightly awkwardly as the constraint is specified per sample
      size - we loop over every possible sample size, including ones that the
      device doesn't support and including ones that have fewer bits than are
      actually used, but this is harmless as the upper layers do the right thing
      in these cases.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      58ba9b25
  31. 04 1月, 2012 1 次提交
  32. 08 12月, 2011 1 次提交
    • M
      ASoC: Hold runtime PM references to components of active DAIs · d6652ef8
      Mark Brown 提交于
      Every device that implements runtime power management for DAIs is doing
      it in pretty much the same way: in the startup callback they take a
      runtime PM reference and then in the shutdown callback they release that
      reference, keeping the device active while the DAI is active. Given the
      frequency with which this is done and the obviousness of the need to keep
      the device active in this period factor the code out into the core, taking
      references on the device for each CPU DAI, CODEC DAI and DMA device in the
      core.
      
      As runtime PM is reference counted this shouldn't interfere with any
      other reference holding by the drivers, and since (in common with the
      existing implementations) we don't check for errors on enabling it
      shouldn't matter if the device actually has runtime PM enabled or not.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      d6652ef8