1. 27 4月, 2012 2 次提交
    • 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
  2. 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
  3. 18 2月, 2012 1 次提交
  4. 09 2月, 2012 1 次提交
  5. 02 2月, 2012 1 次提交
  6. 25 1月, 2012 1 次提交
  7. 22 1月, 2012 1 次提交
  8. 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
  9. 04 1月, 2012 1 次提交
  10. 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
  11. 05 11月, 2011 1 次提交
  12. 27 10月, 2011 1 次提交
  13. 15 10月, 2011 1 次提交
  14. 21 9月, 2011 1 次提交
  15. 17 8月, 2011 1 次提交
    • S
      ASoC: Fix check for symmetric rate enforcement · 25b76791
      Sascha Hauer 提交于
      The ASoC core tries to not enforce symmetric rates when
      two streams open simultaneously. It does so by checking
      rtd->rate being zero. This works exactly once after booting
      because it is not set to zero again when the streams close.
      Fix this by setting rtd->rate when no active stream is left.
      
      [This leads to lots of warnings about not enforcing the symmetry in some
      situations as there's a race in the userspace API where we know we've
      got two applications but don't know what rates they want to set.
      -- broonie ]
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      25b76791
  16. 15 8月, 2011 1 次提交
  17. 10 6月, 2011 2 次提交
    • L
      ASoC: pcm - rename snd_codec_close() to snd_pcm_close(). · 91d5e6b4
      Liam Girdwood 提交于
      Make sure we follow naming convention for all PCM ops.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      91d5e6b4
    • L
      ASoC: core - PCM mutex per rtd · b8c0dab9
      Liam Girdwood 提交于
      In preparation for the new ASoC Dynamic PCM support (AKA DSP support).
      
      The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
      at runtime between the PCM device end (or Frontend - FE) and the physical DAI
      (Backend - BE) using regular kcontrols (just like a hardware CODEC routes
      audio in the analog domain). The Dynamic PCM core therefore must be
      able to call PCM operations for both the Frontend and Backend(s) DAIs at
      the same time.
      
      Currently we have a global pcm_mutex that is used to serialise
      the ASoC PCM operations. This patch removes the global mutex
      and adds a mutex per RTD allowing the PCM operations to be reentrant and
      allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
      could configure multiple backend DAI hw_params() with similar or different
      hw parameters at the same time.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      b8c0dab9
  18. 09 6月, 2011 1 次提交