Skip to content

Commit

Permalink
ALSA: pcm - fix mmap capability check for the snd-dummy driver
Browse files Browse the repository at this point in the history
commit 852a8a9 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: c4824ae ("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>
  • Loading branch information
perexg authored and gregkh committed Aug 12, 2021
1 parent 797bcd3 commit fb78a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/pcm_native.c
Expand Up @@ -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) {
Expand Down

0 comments on commit fb78a57

Please sign in to comment.