ALSA: pci: cs46xx: Fix set up buffer type properly
authorTakashi Iwai <tiwai@suse.de>
Mon, 9 Aug 2021 07:18:29 +0000 (09:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 9 Aug 2021 08:04:05 +0000 (10:04 +0200)
commit4d9e9153f1c64d91a125c6967bc0bfb0bb653ea0
treeef82c8c71ce363bdb0bc9882772624c9cfcd323b
parent0899a7a23047f106c06888769d6cd6ff43d7395f
ALSA: pci: cs46xx: Fix set up buffer type properly

CS46xx driver switches the buffer depending on the number of periods,
and in some cases it switches to the own buffer without updating the
buffer type properly.  This may cause a problem with the mmap on
exotic architectures that require the own mmap call for the coherent
DMA buffer.

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-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/cs46xx/cs46xx_lib.c