All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: pcm - fix mmap capability check for the snd-dummy driver
@ 2021-07-30  9:02 ` Jaroslav Kysela
  0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2021-07-30  9:02 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai, stable

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>
---
 sound/core/pcm_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 6a2971a7e6a1..09c0e2a6489c 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) {
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ALSA: pcm - fix mmap capability check for the snd-dummy driver
@ 2021-07-30  9:02 ` Jaroslav Kysela
  0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2021-07-30  9:02 UTC (permalink / raw)
  To: ALSA development; +Cc: Takashi Iwai, Jaroslav Kysela, stable

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>
---
 sound/core/pcm_native.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 6a2971a7e6a1..09c0e2a6489c 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) {
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ALSA: pcm - fix mmap capability check for the snd-dummy driver
  2021-07-30  9:02 ` Jaroslav Kysela
  (?)
@ 2021-07-30 18:20 ` Takashi Iwai
  -1 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2021-07-30 18:20 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development, stable

On Fri, 30 Jul 2021 11:02:54 +0200,
Jaroslav Kysela wrote:
> 
> 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>

Applied, thanks.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-30 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30  9:02 [PATCH] ALSA: pcm - fix mmap capability check for the snd-dummy driver Jaroslav Kysela
2021-07-30  9:02 ` Jaroslav Kysela
2021-07-30 18:20 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.