OSDN Git Service

ALSA: pci: rme: Set up buffer type properly
authorTakashi Iwai <tiwai@suse.de>
Mon, 9 Aug 2021 07:18:28 +0000 (09:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Aug 2021 08:04:04 +0000 (10:04 +0200)
commit0899a7a23047f106c06888769d6cd6ff43d7395f
tree787433a40996c3b308d2e7e54da2189bab142ad1
parentcbea6e5a7772b7a5b80baa8f98fd77853487fd2a
ALSA: pci: rme: Set up buffer type properly

Although the regression of the mmap was fixed in the recent commit
dc0dc8a73e8e ("ALSA: pcm: Fix mmap breakage without explicit buffer
setup"), RME9652 and HDSP drivers have still potential issues with
their mmap handling.  Namely, they use the default mmap handler
without the standard buffer preallocation, and PCM core wouldn't use
the coherent DMA mapping.  It's practically OK on x86, but on some
exotic architectures, it wouldn't work.

This patch addresses the potential breakage by replacing the buffer
setup with the proper macro.  It also simplifies the source code,
too.

Link: https://lore.kernel.org/r/20210809071829.22238-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/rme9652.c