• 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
dma.c 21.4 KB