]> 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)
commitc17804d8f1c7ec29b860305dcaaa90ae23371646
treeef82c8c71ce363bdb0bc9882772624c9cfcd323b
parentf24dc1c6a70d0acb4405913930caf5d2259e4f17
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