Skip to contentSkip to conversation

ALSA: pcm - fix mmap capability check for the snd-dummy driver

PATCH Applied Jaroslav Kysela 2 participants 2 messages Jul 30, 2021

Subsystems (2)
lore
Share & tools
lore

Jaroslav Kysela

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes c4824ae7db41 ("ALSA: pcm: Fix mmap capability check")
---
 sound/core/pcm_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/pcm_native.c +1 -1
index 6a2971a7e6a1..09c0e2a6489c 100644
@@ -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) {
Signature · 1 line
2.31.1
Applied
#1 lore raw
Quoted 7 lines · Jaroslav Kysela

The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too.

Fixes c4824ae7db41 ("ALSA: pcm: Fix mmap capability check")

Applied, thanks.

Takashi