1. 06 Nov, 2017 1 commit
  2. 01 Nov, 2017 2 commits
    • Kuninori Morimoto's avatar
      ASoC: rsnd: remove NULL check from rsnd_mod_name()/rsnd_mod_id() · 9b6ea250
      Kuninori Morimoto authored
      Current rsnd driver has rsnd_mod_id() which returns mod ID,
      and it returns -1 if mod was NULL.
      In the same time, this driver has rsnd_mod_name() which returns mod
      name, and it returns "unknown" if mod or mod->ops was NULL.
      
      Basically these "mod" never be NULL, but the reason why rsnd driver
      has such behavior is that DMA path finder is assuming memory as
      "mod == NULL".
      Thus, current DMA path debug code prints like below.
      Here "unknown[-1]" means it was memory.
      
      	...
      	rcar_sound ec500000.sound:   unknown[-1] from
      	rcar_sound ec500000.sound:   src[0] to
      	rcar_sound ec500000.sound:   ctu[2]
      	rcar_sound ec500000.sound:   mix[0]
      	rcar_sound ec500000.sound:   dvc[0]
      	rcar_sound ec500000.sound:   ssi[0]
      	rcar_sound ec500000.sound: audmac[0] unknown[-1] -> src[0]
      	...
      
      1st issue is that it is confusable for user.
      2nd issue is rsnd driver has something like below code.
      
      	mask |= 1 << rsnd_mod_id(mod);
      
      Because of this kind of code, some statically code checker will
      reports "Shifting by a negative value is undefined behaviour".
      
      But this "mod" never be NULL, thus negative shift never happen.
      To avoid these issues, this patch adds new dummy "mem" to
      indicate memory, and use it to indicate debug information,
      and, remove unneeded "NULL mod" behavior from rsnd_mod_id() and
      rsnd_mod_name().
      
      The debug information will be like below by this patch
      	...
      	rcar_sound ec500000.sound:   mem[0] from
      	rcar_sound ec500000.sound:   src[0] to
      	rcar_sound ec500000.sound:   ctu[2]
      	rcar_sound ec500000.sound:   mix[0]
      	rcar_sound ec500000.sound:   dvc[0]
      	rcar_sound ec500000.sound:   ssi[0]
      	rcar_sound ec500000.sound: audmac[0] mem[0] -> src[0]
      	...
      Reported-by: default avatarHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      9b6ea250
    • Kuninori Morimoto's avatar
      ASoC: rsnd: rsnd_ssi_run_mods() needs to care ssi_parent_mod · 21781e87
      Kuninori Morimoto authored
      SSI parent mod might be NULL. ssi_parent_mod() needs to care
      about it. Otherwise, it uses negative shift.
      This patch fixes it.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      21781e87
  3. 31 Oct, 2017 5 commits
  4. 21 Oct, 2017 2 commits
  5. 13 Oct, 2017 1 commit
  6. 11 Oct, 2017 1 commit
  7. 04 Oct, 2017 6 commits
  8. 21 Sep, 2017 1 commit
    • Kuninori Morimoto's avatar
      ASoC: rsnd: add rsnd_dma_alloc() · 81cb7124
      Kuninori Morimoto authored
      R-Car sound DMA will be used from SSI/SRC.
      dma.c doesn't alloc DMA handler in .probe timing, because we don't
      know what kind of DMA transfer will be used then.
      Thus, SSI/SRC have *rsnd_mod for DMA. rsnd_dma_attach() will allocate
      it and attach it to system.
      It will be PIO mode if it can't alloc DMA handler.
      
      In case of MIX is used, rsnd_dma_attach() will be called twice from SSI.
      To avoid duplicate allocation, current rsnd_dma_attach() is checking
      allocated DMA handler. This DMA related operation is a little bit
      difficult to understand.
      This patch adds new rsnd_dma_alloc() and separates allocation and attach
      for readable code.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      81cb7124
  9. 13 Sep, 2017 1 commit
  10. 01 Sep, 2017 20 commits