1. 01 9月, 2014 1 次提交
    • X
      ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'. · eadb0019
      Xiubo Li 提交于
      The 'big-endian-data' property is originally used to indicate whether the
      LSB firstly or MSB firstly will be transmitted to the CODEC or received
      from the CODEC, and there has nothing relation to the memory data.
      
      Generally, if the audio data in big endian format, which will be using the
      bytes reversion, Here this can only be used to bits reversion.
      
      So using the 'lsb-first' instead of 'big-endian-data' can make the code
      to be readable easier and more easy to understand what this property is
      used to do.
      
      This property used for configuring whether the LSB or the MSB is transmitted
      first for the fifo data.
      Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
      Acked-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      eadb0019
  2. 28 8月, 2014 1 次提交
  3. 17 8月, 2014 2 次提交
    • N
      ASoC: fsl_sai: Add asynchronous mode support · 08fdf65e
      Nicolin Chen 提交于
      SAI supports these operation modes:
      1) asynchronous mode
         Both Tx and Rx are set to be asynchronous.
      2) synchronous mode (Rx sync with Tx)
         Tx is set to be asynchronous, Rx is set to be synchronous.
      3) synchronous mode (Tx sync with Rx)
         Rx is set to be asynchronous, Tx is set to be synchronous.
      4) synchronous mode (Tx/Rx sync with another SAI's Tx)
      5) synchronous mode (Tx/Rx sync with another SAI's Rx)
      
      * 4) and 5) are beyond this patch because they are related with another SAI.
      
      As the initial version of this SAI driver, it supported 2) as default while
      the others were totally missing.
      
      So this patch just adds supports for 1) and 3).
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      08fdf65e
    • N
      ASoC: fsl_sai: Initialize with software reset · 376d1a92
      Nicolin Chen 提交于
      This patch adds software reset code in dai_probe() so as to make a true init
      by clearing SAI's internal logic, including the bit clock generation, status
      flags, and FIFO pointers.
      Signed-off-by: NNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      376d1a92
  4. 15 4月, 2014 4 次提交
    • N
      ASoC: fsl_sai: Add clock controls for SAI · ca3e35c7
      Nicolin Chen 提交于
      The SAI mainly has the following clocks:
        bus clock
          control and configure registers and to generate synchronous
          interrupts and DMA requests.
      
        mclk1, mclk2, mclk3
          to generate the bit clock when the receiver or transmitter is
          configured for an internally generated bit clock.
      
      So this patch adds these clocks and their clock controls to the driver.
      
      [ To concern the old DTB cases, I've added a bit of extra code to make
        the driver compatible with them. And by marking clock NULL if failed
        to get, the clk_prepare() or clk_get_rate() would easily return 0
        so no further path should be broken. -- by Nicolin ]
      Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com>
      Acked-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      ca3e35c7
    • N
      ASoC: fsl_sai: Add imx6sx platform support · c7540644
      Nicolin Chen 提交于
      The next coming i.MX6 Solo X SoC also contains SAI module while we use
      imp_pcm_init() for i.MX platform.
      
      So this patch adds one compatible route for imx6sx and updates the DT
      doc accordingly.
      Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      c7540644
    • N
      ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streams · 8abba5d6
      Nicolin Chen 提交于
      We only enable one side interrupt for each stream since over/underrun
      on the opposite stream would be resulted from what we previously did,
      enabling TERE but remaining FRDE disabled, even though the xrun on the
      opposite direction will not break the current stream.
      Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com>
      Acked-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      8abba5d6
    • N
      ASoC: fsl_sai: Fix buggy configurations in trigger() · e6b39846
      Nicolin Chen 提交于
      The current trigger() has two crucial problems:
      1) The DMA request enabling operations (FSL_SAI_CSR_FRDE) for Tx and Rx are
         now totally exclusive: It would fail to run simultaneous Tx-Rx cases.
      2) The TERE disabling operation depends on an incorrect condition -- active
         reference count that only gets increased in snd_pcm_open() and decreased
         in snd_pcm_close(): The TERE would never get cleared.
      
      So this patch overwrites the trigger function by following these rules:
      A) We continue to support tx-async-while-rx-sync-to-tx case alone, which's
         originally limited by this fsl_sai driver, but we make the code easy to
         modify for the further support of the opposite case.
      B) We enable both TE and RE for PLAYBACK stream or CAPTURE stream but only
         enabling the DMA request bit (FSL_SAI_CSR_FRDE) of the current direction
         due to the requirement of SAI -- For tx-async-while-rx-sync-to-tx case,
         the receiver is enabled only when both the transmitter and receiver are
         enabled.
      
      Tested cases:
      a) aplay test.wav -d5
      b) arecord -r44100 -c2 -fS16_LE test.wav -d5
      c) arecord -r44100 -c2 -fS16_LE -d5 | aplay
      d) (aplay test2.wav &); sleep 1; arecord -r44100 -c2 -fS16_LE test.wav -d1
      e) (arecord -r44100 -c2 -fS16_LE test.wav -d5 &); sleep 1; aplay test.wav -d1
      Signed-off-by: NNicolin Chen <Guangyu.Chen@freescale.com>
      Acked-by: NXiubo Li <Li.Xiubo@freescale.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      e6b39846
  5. 27 3月, 2014 1 次提交
  6. 27 2月, 2014 1 次提交
  7. 10 2月, 2014 1 次提交
  8. 19 12月, 2013 1 次提交