diff options
| author | Zhen Ni <[email protected]> | 2022-03-02 07:42:41 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2022-03-02 08:25:37 +0000 |
| commit | 0aa6b294b312d9710804679abd2c0c8ca52cc2bc (patch) | |
| tree | 76f93ef959ba6fc672e9ac40e8c2c128dbc4378c | |
| parent | Merge tag 'asoc-fix-v5.17-rc5' of https://git.kernel.org/pub/scm/linux/kernel... (diff) | |
| download | kernel-0aa6b294b312d9710804679abd2c0c8ca52cc2bc.tar.gz kernel-0aa6b294b312d9710804679abd2c0c8ca52cc2bc.zip | |
ALSA: intel_hdmi: Fix reference to PCM buffer address
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.
Signed-off-by: Zhen Ni <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
| -rw-r--r-- | sound/x86/intel_hdmi_audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index 1c94eaff1931..4a3ff6468aa7 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -1261,7 +1261,7 @@ static int had_pcm_mmap(struct snd_pcm_substream *substream, { vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); return remap_pfn_range(vma, vma->vm_start, - substream->dma_buffer.addr >> PAGE_SHIFT, + substream->runtime->dma_addr >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot); } |
