summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2021-07-30 12:02:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-12 14:22:09 +0300
commitc0b626f0a29a966d37d6dd7784005e47b38c1497 (patch)
tree07816c719d05979b4f20710764cc0e345490a31b /sound/core
parentdd3f7c5c890450ab2ad6f269a3fdf7bcd6fc2908 (diff)
downloadlinux-c0b626f0a29a966d37d6dd7784005e47b38c1497.tar.xz
ALSA: pcm - fix mmap capability check for the snd-dummy driver
commit 852a8a97776a153be2e6c803218eced45f37a19c upstream. The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: <stable@vger.kernel.org> Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20210730090254.612478-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 6d1759b9ccb2..b36c8d94d4da 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -246,7 +246,7 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream)
if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP))
return false;
- if (substream->ops->mmap)
+ if (substream->ops->mmap || substream->ops->page)
return true;
switch (substream->dma_buffer.dev.type) {