ALSA: hda: Check the non-cached stream buffers more explicitly
authorTakashi Iwai <tiwai@suse.de>
Sat, 11 Aug 2018 21:33:34 +0000 (23:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:38 +0000 (11:08 -0800)
commit60fa88f6713a5d251971a9a425a12feec12376bf
tree4a3c395ca0a3b68578e3c381e068d7ee4809ee4a
parent9dd0fafb5a7ab2ad7911d426e22757a2c6aecc11
ALSA: hda: Check the non-cached stream buffers more explicitly

[ Upstream commit 78c9be61c3a5cd9e2439fd27a5ffad73a81958c7 ]

Introduce a new flag, uc_buffer, to indicate that the controller
requires the non-cached pages for stream buffers, either as a
chip-specific requirement or specified via snoop=0 option.
This improves the code-readability.

Also, this patch fixes the incorrect behavior for C-Media chip where
the stream buffers were never handled as non-cached due to the check
of driver_type even if you pass snoop=0 option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_controller.h
sound/pci/hda/hda_intel.c