]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: intel_hdmi: Fix reference to PCM buffer address
authorZhen Ni <nizhen@uniontech.com>
Wed, 2 Mar 2022 07:42:41 +0000 (15:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:01:56 +0000 (19:01 +0100)
commitd57c4e88b97d002b5df534541cf56bf9c6cb4792
tree67b580a59dfc77bd460b5b817e87c6ec9c82e59f
parent0b79c5dd7bb56da0c57f8272d1746f8594b4fdac
ALSA: intel_hdmi: Fix reference to PCM buffer address

commit 0aa6b294b312d9710804679abd2c0c8ca52cc2bc 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.

Signed-off-by: Zhen Ni <nizhen@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220302074241.30469-1-nizhen@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/x86/intel_hdmi_audio.c