1. 18 9月, 2014 1 次提交
  2. 08 8月, 2014 1 次提交
  3. 04 8月, 2014 3 次提交
  4. 01 8月, 2014 6 次提交
  5. 31 7月, 2014 1 次提交
  6. 30 7月, 2014 2 次提交
  7. 26 7月, 2014 3 次提交
    • N
      ASoC: fsl_sai: Improve enable flow in fsl_sai_trigger() · a3fdc674
      Nicolin Chen 提交于
      The previous enable flow:
      1, Enable TE&RE (SAI starts to consume tx FIFO and feed rx FIFO)
      2, Mask IRQ of Tx/Rx to enable its interrupt.
      3, Enable DMA request of Tx/Rx.
      
      As this flow would enable DMA request later than TERE, the Tx FIFO
      would be easily emptied into underrun while Rx FIFO would be easily
      stuffed into overrun due to the delayed DMA transfering.
      
      This issue happened merely occational before the patch 'ASoC: fsl_sai:
      Reset FIFOs after disabling TE/RE' because there were useless data
      remaining in the FIFO for the gap. However, it manifested after FIFO
      reset's implemented.
      
      After this patch, the new flow:
      1, Enable DMA request of Tx/Rx.
      2, Enable TE&RE (SAI starts to consume tx FIFO and feed rx FIFO)
      3, Mask IRQ of Tx/Rx to enable its interrupt.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      a3fdc674
    • N
      ASoC: fsl_sai: Don't reset FIFO until TE/RE bit is unset · c44b56af
      Nicolin Chen 提交于
      TE/RE bit of T/RCSR will remain set untill the current frame is physically
      finished. The FIFO reset operation should wait this bit's totally cleared
      rather than ignoring its status which might cause TE/RE disabling failed.
      
      This patch adds delay and timeout to wait for its completion before FIFO
      reset.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      c44b56af
    • N
      ASoC: fsl_sai: Reduce race condition during TE/RE enabling · f4075a8f
      Nicolin Chen 提交于
      For trigger start, we don't need to check if it's the first time to
      enable TE/RE or second time. It doesn't hurt to enable them any way,
      which in the meantime can reduce race condition for TE/RE enabling.
      
      For trigger stop, we will definitely clear FRDE of current direction.
      Thus the driver only needs to read the opposite one's.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f4075a8f
  8. 18 7月, 2014 2 次提交
  9. 01 7月, 2014 1 次提交
    • R
      Update imx-sdma cyclic handling to report residue · d1a792f3
      Russell King - ARM Linux 提交于
      I received a report this morning from one of the Novena developers that
      the behaviour of the iMX6 ASoC codec driver (using imx-pcm-dma.c) was
      sub-optimal under high system load.
      
      While there are issues relating to system load remaining, upon reviewing
      the ASoC imx-pcm-dma.c driver, it was noticed that it not using the
      residue support, because SDMA doesn't support it.  This has the effect
      that SDMA has to make multiple calls into the ASoC and ALSA code, one
      for each period.
      
      Since ALSA's snd_pcm_elapsed() does not need to be called multiple times
      and it is entirely sufficient to call it once to update ALSA with the
      current buffer position via the pointer method, we can do better here.
      We can also avoid stopping the DMA entirely, just like real cyclic DMA
      implementations behave.  While this means that we replay some old samples,
      this is a nicer behaviour than having audio stop and restart.
      
      The changes to achieve this are relatively minor - imx-sdma.c can track
      where the DMA is to the nearest descriptor boundary - it does this
      already when deciding how many callbacks to issue.  In doing this,
      buf_tail always points at the descriptor which will complete next.
      
      The residue is defined by the bytes remaining to the end of the buffer,
      when the buffer is viewed as a single block of memory [start...end].
      So, when we start out, there's a full buffer worth of residue, and this
      counts down as we approach the end of the buffer, eventually becoming
      zero at the end, before returning to the full buffer worth when we
      wrap back to the start.
      
      Moving the walking of the descriptors into the interrupt handler means
      that we can update the BD_DONE flag at interrupt time, thus avoiding
      a delayed tasklet stopping the cyclic DMA.
      
      This means that the residue can be calculated from (total descriptors -
      buf_tail) * descriptor size.  This is what the change below does.  We
      update imx-pcm-dma.c to remove the NO_RESIDUE flag since we now provide
      the residue.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Tested-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      d1a792f3
  10. 22 6月, 2014 1 次提交
    • A
      ASoC: fsl: refine DMA/FIQ dependencies · ff40260f
      Arnd Bergmann 提交于
      Commit 31ee2bfd ("ASoC: fsl: select SND_SOC_IMX_PCM_DMA
      where needed") started selecting SND_SOC_IMX_PCM_DMA and
      SND_SOC_IMX_PCM_FIQ for two drivers when building for i.MX.
      This has turned out too aggressive, as FIQ is only available
      for i.mx2 through i.mx5, but not i.mx6 or vybrid.
      
      Further, two more drivers have become user-selectable in the
      meantime, and they both depend on DMA for the imx platform
      as well.
      
      This changes the selection of FIQ to depend on the TZIC or
      AVIC interrupt controllers that actually export the imx
      specific FIQ interfaces, and adds the missing select statements
      for SAI and ESAI.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ff40260f
  11. 17 6月, 2014 3 次提交
  12. 12 6月, 2014 1 次提交
    • G
      ASoC: fsl: Fix build problem · 3d5f615f
      Guenter Roeck 提交于
      Commit 43248122 (ASoC: fsl-ssi: Use regmap) removed struct ccsr_ssi.
      Unfortunately, the structure is still used. This causes
      mpc85xx_smp_defconfig and mpc85xx_defconfig builds to fail with
      
      sound/soc/fsl/fsl_dma.c:926:50:
        error: invalid use of undefined type 'struct ccsr_ssi'
        dma->ssi_stx_phys = res.start + offsetof(struct ccsr_ssi, stx0);
      ound/soc/fsl/fsl_dma.c:927:50:
        error: invalid use of undefined type 'struct ccsr_ssi'
        dma->ssi_srx_phys = res.start + offsetof(struct ccsr_ssi, srx0);
      
      Fix by using constants, similar to original commit.
      
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      3d5f615f
  13. 10 6月, 2014 2 次提交
  14. 01 6月, 2014 9 次提交
  15. 26 5月, 2014 1 次提交
    • F
      ASoC: fsl_ssi: Add suspend/resume support · b20e53a8
      Fabio Estevam 提交于
      Doing a suspend/resume sequence while playing an audio track in the backgroung
      causes broken audio right after resume:
      
      root@freescale /$ aplay clarinet.wav &
      
      root@freescale /home$ Playing WAVE 'clarinet.wav' : Signed 16 bit Little Endian,
       Rate 44100 Hz, Mono
      
      root@freescale /home$ echo mem > /sys/power/state
      PM: Syncing filesystems ... done.
      Freezing user space processes ... (elapsed 0.002 seconds) done.
      Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
      Suspending console(s) (use no_console_suspend to debug)
      PM: suspend of devices complete after 37.082 msecs
      PM: suspend devices took 0.040 seconds
      PM: late suspend of devices complete after 4.234 msecs
      PM: noirq suspend of devices complete after 4.618 msecs
      Disabling non-boot CPUs ...
      PM: noirq resume of devices complete after 4.013 msecs
      PM: early resume of devices complete after 4.000 msecs
      PM: resume of devices complete after 68.907 msecs
      PM: resume devices took 0.070 seconds
      Restarting tasks ... Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      Suspended. Trying resume. Failed. Restarting stream. Done.
      ....
      
      Add SNDRV_PCM_TRIGGER_RESUME/SUSPEND cases so that we can gracefully handle
      system suspend/resume.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      b20e53a8
  16. 21 5月, 2014 3 次提交