[alsa-devel] 答复: A bug about cache inconsistency report
Takashi Iwai
tiwai at suse.de
Thu Aug 2 13:52:36 CEST 2018
On Thu, 02 Aug 2018 12:56:30 +0200,
Hans Hu(SH-RD) wrote:
>
> 1. noise relate test:
> When I annotate the return after set_pages_array_wc, then set_memory_wc works, noise disappear
> static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool on)
> {
> ...
> set_pages_array_wb(sgbuf->page_table, sgbuf->pages);
> //return;
> }
> #endif
set_memory_uc() performs __pa() for the given address, and in this
case, it's vmapped address. Something bogus in your test, I'm
afraid.
And moreover, all Intel chipsets do work with snooping well, AFAIK.
> }
>
> 2. change *_SG relate test:
> Just followed your proposal
> -snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
> +snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
OK, you need one more oneliner:
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index a12e594d4e3b..2eaed4956e7f 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -707,7 +707,7 @@ static const struct snd_pcm_ops azx_pcm_ops = {
.pointer = azx_pcm_pointer,
.get_time_info = azx_get_time_info,
.mmap = azx_pcm_mmap,
- .page = snd_pcm_sgbuf_ops_page,
+ // .page = snd_pcm_sgbuf_ops_page,
};
static void azx_pcm_free(struct snd_pcm *pcm)
And, again, please avoid top-posting.
Takashi
More information about the Alsa-devel
mailing list