Skip to content

Commit 0aa6b29

Browse files
nizhenthtiwai
authored andcommitted
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]>
1 parent ce345f1 commit 0aa6b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/x86/intel_hdmi_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ static int had_pcm_mmap(struct snd_pcm_substream *substream,
12611261
{
12621262
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
12631263
return remap_pfn_range(vma, vma->vm_start,
1264-
substream->dma_buffer.addr >> PAGE_SHIFT,
1264+
substream->runtime->dma_addr >> PAGE_SHIFT,
12651265
vma->vm_end - vma->vm_start, vma->vm_page_prot);
12661266
}
12671267

0 commit comments

Comments
 (0)