aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-02-05 15:45:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 11:37:18 +0100
commite18368d0515db9fb2a47375b883009a3c94b650c (patch)
treed55d015739265146846226587e1c1bf42c99b64d
parent89e3d1a85df80de70239582f44c91ed943f50006 (diff)
downloadkernel_replicant_linux-e18368d0515db9fb2a47375b883009a3c94b650c.tar.gz
kernel_replicant_linux-e18368d0515db9fb2a47375b883009a3c94b650c.tar.bz2
kernel_replicant_linux-e18368d0515db9fb2a47375b883009a3c94b650c.zip
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>
-rw-r--r--sound/usb/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index a860303cc522..1b08f52ef86f 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1861,7 +1861,7 @@ void snd_usb_preallocate_buffer(struct snd_usb_substream *subs)
{
struct snd_pcm *pcm = subs->stream->pcm;
struct snd_pcm_substream *s = pcm->streams[subs->direction].substream;
- struct device *dev = subs->dev->bus->controller;
+ struct device *dev = subs->dev->bus->sysdev;
if (snd_usb_use_vmalloc)
snd_pcm_set_managed_buffer(s, SNDRV_DMA_TYPE_VMALLOC,