diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-11-04 11:11:15 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-11-04 11:12:34 +0100 |
commit | 6111fd2370eecae9f11bfdc08ba097e0b51fcfd3 (patch) | |
tree | dcefec3ded4094f8c6106293dc39eb53035c8316 /sound/hda | |
parent | 6c94f380c6c1d0206da55b0342557926052f2b3e (diff) | |
download | lwn-6111fd2370eecae9f11bfdc08ba097e0b51fcfd3.tar.gz lwn-6111fd2370eecae9f11bfdc08ba097e0b51fcfd3.zip |
ALSA: pcm: Fix missing check of the new non-cached buffer type
The check for the mmap support via hw_support_mmap() function misses
the case where the device is with SNDRV_DMA_TYPE_DEV_UC, which should
have been treated equally as SNDRV_DMA_TYPE_DEV. Let's fix it.
Note that this bug doesn't hit any practical problem, because
SNDRV_DMA_TYPE_DEV_UC is used only for x86-specific drivers
(snd-hda-intel and snd-intel8x0) for the specific platforms that need
the non-cached buffers. And, on such platforms, hw_support_mmap()
already returns true in anyway. That's the reason I didn't put
Cc-to-stable mark here. This is only for any theoretical future
extension.
Fixes: 425da159707b ("ALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_*")
Fixes: 42e748a0b325 ("ALSA: memalloc: Add non-cached buffer type")
Link: https://lore.kernel.org/r/20191104101115.27311-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
0 files changed, 0 insertions, 0 deletions