From: Jaroslav Kysela Date: Fri, 30 Jul 2021 09:02:54 +0000 (+0200) Subject: ALSA: pcm - fix mmap capability check for the snd-dummy driver X-Git-Tag: v5.15~539^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=852a8a97776a153be2e6c803218eced45f37a19c;p=platform%2Fkernel%2Flinux-starfive.git ALSA: pcm - fix mmap capability check for the snd-dummy driver The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210730090254.612478-1-perex@perex.cz Signed-off-by: Takashi Iwai --- diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 6a2971a..09c0e2a 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) {