1. 27 Oct, 2021 1 commit
  2. 20 Oct, 2021 1 commit
    • Sugar Zhang's avatar
      ASoC: rockchip: Use generic dmaengine code · 5ba8ecf2
      Sugar Zhang authored
      This reverts commit 75b31192.
      
      The original purpose of customized pcm was to config prealloc buffer size
      flexibly. but, we can do the same thing by soc-generic-dmaengine-pcm.
      
      And the generic one can generated the better config by querying DMA
      capabilities from dmaengine driver rather than the Hard-Coded one.
      
      e.g.
      
      the customized one:
      
        static const struct snd_pcm_hardware snd_rockchip_hardware = {
               .info                   = SNDRV_PCM_INFO_MMAP |
                                         SNDRV_PCM_INFO_MMAP_VALID |
                                         SNDRV_PCM_INFO_PAUSE |
                                         SNDRV_PCM_INFO_RESUME |
                                         SNDRV_PCM_INFO_INTERLEAVED,
        ...
      
      the generic one:
      
        ret = dma_get_slave_caps(chan, &dma_caps);
        if (ret == 0) {
                if (dma_caps.cmd_pause && dma_caps.cmd_resume)
                        hw.info |= SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME;
                if (dma_caps.residue_granularity <= DMA_RESIDUE_GRANULARITY_SEGMENT)
                        hw.info |= SNDRV_PCM_INFO_BATCH;
        ...
      
      So, let's revert back to use the generic dmaengine pcm.
      Signed-off-by: default avatarSugar Zhang <sugar.zhang@rock-chips.com>
      Reviewed-by: default avatarJohn Keeping <john@metanate.com>
      Link: https://lore.kernel.org/r/1632792957-80428-1-git-send-email-sugar.zhang@rock-chips.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      5ba8ecf2
  3. 15 Oct, 2021 12 commits
  4. 13 Oct, 2021 1 commit
  5. 12 Oct, 2021 1 commit
  6. 11 Oct, 2021 1 commit
  7. 07 Oct, 2021 7 commits
  8. 30 Sep, 2021 1 commit
  9. 27 Sep, 2021 2 commits
  10. 21 Sep, 2021 2 commits
  11. 17 Sep, 2021 2 commits
  12. 16 Sep, 2021 2 commits
  13. 15 Sep, 2021 3 commits
  14. 10 Sep, 2021 4 commits
    • Mark Brown's avatar
      Merge series "ASoC: fsl: register platform component before registering cpu... · 7bd5d979
      Mark Brown authored
      Merge series "ASoC: fsl: register platform component before registering cpu dai" from Shengjiu Wang <shengjiu.wang@nxp.com>:
      
      There is no defer probe when adding platform component to
      snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime()
      
      snd_soc_register_card()
        -> snd_soc_bind_card()
          -> snd_soc_add_pcm_runtime()
            -> adding cpu dai
            -> adding codec dai
            -> adding platform component.
      
      So if the platform component is not ready at that time, then the
      sound card still registered successfully, but platform component
      is empty, the sound card can't be used.
      
      As there is defer probe checking for cpu dai component, then register
      platform component before cpu dai to avoid such issue.
      
      This patch set is to fix this issue for SAI, ESAI, MICFIL, SPDIF,
      XCVR drivers.
      
      Shengjiu Wang (5):
        ASoC: fsl_sai: register platform component before registering cpu dai
        ASoC: fsl_esai: register platform component before registering cpu dai
        ASoC: fsl_micfil: register platform component before registering cpu
          dai
        ASoC: fsl_spdif: register platform component before registering cpu
          dai
        ASoC: fsl_xcvr: register platform component before registering cpu dai
      
       sound/soc/fsl/fsl_esai.c   | 16 ++++++++++------
       sound/soc/fsl/fsl_micfil.c | 15 ++++++++++-----
       sound/soc/fsl/fsl_sai.c    | 14 +++++++++-----
       sound/soc/fsl/fsl_spdif.c  | 14 +++++++++-----
       sound/soc/fsl/fsl_xcvr.c   | 15 ++++++++++-----
       5 files changed, 48 insertions(+), 26 deletions(-)
      
      --
      2.17.1
      7bd5d979
    • Trevor Wu's avatar
      ASoC: mediatek: common: handle NULL case in suspend/resume function · 1dd03852
      Trevor Wu authored
      When memory allocation for afe->reg_back_up fails, reg_back_up can't
      be used.
      Keep the suspend/resume flow but skip register backup when
      afe->reg_back_up is NULL, in case illegal memory access happens.
      
      Fixes: 283b6124 ("ASoC: mediatek: implement mediatek common structure")
      Signed-off-by: default avatarTrevor Wu <trevor.wu@mediatek.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/20210910092613.30188-1-trevor.wu@mediatek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      1dd03852
    • Shengjiu Wang's avatar
      ASoC: fsl_xcvr: register platform component before registering cpu dai · c590fa80
      Shengjiu Wang authored
      There is no defer probe when adding platform component to
      snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime()
      
      snd_soc_register_card()
        -> snd_soc_bind_card()
          -> snd_soc_add_pcm_runtime()
            -> adding cpu dai
            -> adding codec dai
            -> adding platform component.
      
      So if the platform component is not ready at that time, then the
      sound card still registered successfully, but platform component
      is empty, the sound card can't be used.
      
      As there is defer probe checking for cpu dai component, then register
      platform component before cpu dai to avoid such issue.
      
      Fixes: 28564486 ("ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver")
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Link: https://lore.kernel.org/r/1630665006-31437-6-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      c590fa80
    • Shengjiu Wang's avatar
      ASoC: fsl_spdif: register platform component before registering cpu dai · ee8ccc2e
      Shengjiu Wang authored
      There is no defer probe when adding platform component to
      snd_soc_pcm_runtime(rtd), the code is in snd_soc_add_pcm_runtime()
      
      snd_soc_register_card()
        -> snd_soc_bind_card()
          -> snd_soc_add_pcm_runtime()
            -> adding cpu dai
            -> adding codec dai
            -> adding platform component.
      
      So if the platform component is not ready at that time, then the
      sound card still registered successfully, but platform component
      is empty, the sound card can't be used.
      
      As there is defer probe checking for cpu dai component, then register
      platform component before cpu dai to avoid such issue.
      
      Fixes: a2388a49 ("ASoC: fsl: Add S/PDIF CPU DAI driver")
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Link: https://lore.kernel.org/r/1630665006-31437-5-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      ee8ccc2e