lkml.org 
[lkml]   [2021]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.10 06/96] ASoC: xilinx: Fix reference to PCM buffer address
    Date
    From: Takashi Iwai <tiwai@suse.de>

    commit 42bc62c9f1d3d4880bdc27acb5ab4784209bb0b0 upstream.

    PCM buffers might be allocated dynamically when the buffer
    preallocation failed or a larger buffer is requested, and it's not
    guaranteed that substream->dma_buffer points to the actually used
    buffer. The driver needs to refer to substream->runtime->dma_addr
    instead for the buffer address.

    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://lore.kernel.org/r/20210728112353.6675-4-tiwai@suse.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    sound/soc/xilinx/xlnx_formatter_pcm.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/sound/soc/xilinx/xlnx_formatter_pcm.c
    +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
    @@ -452,8 +452,8 @@ static int xlnx_formatter_pcm_hw_params(

    stream_data->buffer_size = size;

    - low = lower_32_bits(substream->dma_buffer.addr);
    - high = upper_32_bits(substream->dma_buffer.addr);
    + low = lower_32_bits(runtime->dma_addr);
    + high = upper_32_bits(runtime->dma_addr);
    writel(low, stream_data->mmio + XLNX_AUD_BUFF_ADDR_LSB);
    writel(high, stream_data->mmio + XLNX_AUD_BUFF_ADDR_MSB);


    \
     
     \ /
      Last update: 2021-08-16 15:20    [W:4.020 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site