ALSA: pcm: Fix mmap breakage without explicit buffer setup
Changes
1 files changed · +4 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| sound/core/pcm_native.c | modified | +4 | −1 | View file |
sound/core/pcm_native.c
View filediff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 09c0e2a..71323d8 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -251,7 +251,10 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream)
switch (substream->dma_buffer.dev.type) {
case SNDRV_DMA_TYPE_UNKNOWN:
- return false;
+ /* we can't know the device, so just assume that the driver does
+ * everything right
+ */
+ return true;
case SNDRV_DMA_TYPE_CONTINUOUS:
case SNDRV_DMA_TYPE_VMALLOC:
return true;