]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Fix mmap breakage without explicit buffer setup
authorTakashi Iwai <tiwai@suse.de>
Sun, 8 Aug 2021 07:01:16 +0000 (09:01 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Aug 2021 05:52:31 +0000 (07:52 +0200)
commit6025867a538b259b0dbdcf9461e80bbfab14d5c1
tree4c0c7a98a67476e0f81dcee18a0bbf5c146a5177
parentb07d9901e8ddf8a536bea62ede62a8064fb2778b
ALSA: pcm: Fix mmap breakage without explicit buffer setup

The recent fix 638aa7222b20 ("ALSA: pcm: Fix mmap capability check")
restricts the mmap capability only to the drivers that properly set up
the buffers, but it caused a regression for a few drivers that manage
the buffer on its own way.

For those with UNKNOWN buffer type (i.e. the uninitialized / unused
substream->dma_buffer), just assume that the driver handles the mmap
properly and blindly trust the hardware info bit.

Fixes: 638aa7222b20 ("ALSA: pcm: Fix mmap capability check")
Reported-and-tested-by: Jeff Woods <jwoods@fnordco.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5him0gpghv.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c