]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitffa939c7af452d7a068837770342c2feaa942129
treeef82c8c71ce363bdb0bc9882772624c9cfcd323b
parent0df543dec1efd8075bcdaaf13bb503dcad239b7d
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