]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Feb 2021 14:45:59 +0000 (15:45 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:08:50 +0000 (15:08 +0100)
commit248f5d3ddde7f8a6a812b70faba692fca4d1cb3c
tree2c827161f73ca4af3be84142681f2bf3285081aa
parent256c9372f63cd36f5d20a7cf206dedd7e377d90c
ALSA: usb-audio: Fix PCM buffer allocation in non-vmalloc mode

commit fb3c293b82c31a9a68fbcf4e7a45fadd8a47ea2b upstream.

The commit f274baa49be6 ("ALSA: usb-audio: Allow non-vmalloc buffer
for PCM buffers") introduced the mode to allocate coherent pages for
PCM buffers, and it used bus->controller device as its DMA device.
It turned out, however, that bus->sysdev is a more appropriate device
to be used for DMA mapping in HCD code.

This patch corrects the device reference accordingly.

Note that, on most platforms, both point to the very same device,
hence this patch doesn't change anything practically.  But on
platforms like xhcd-plat hcd, the change becomes effective.

Fixes: f274baa49be6 ("ALSA: usb-audio: Allow non-vmalloc buffer for PCM buffers")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210205144559.29555-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
sound/usb/pcm.c