From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: =?utf-8?b?562U5aSNOiDnrZTlpI06ICBBIGJ1ZyBhYm91dCBj?= =?utf-8?q?ache_inconsistency_report?= Date: Thu, 02 Aug 2018 16:35:42 +0200 Message-ID: References: <12ceb41dedc54433bc7331f4378af9ba@zhaoxin.com> <52fa69af57704bb2984baa113d15b1f2@zhaoxin.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 328972677D8 for ; Thu, 2 Aug 2018 16:35:42 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Hans Hu(SH-RD)" Cc: "'alsa-devel@alsa-project.org'" List-Id: alsa-devel@alsa-project.org On Thu, 02 Aug 2018 15:59:31 +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. > > [Hans:] I know __pa() handle the vmapped address is wrong, that why I don't know how to fix the problem, I try this because I see kernel older than 3.7.6. [bogus? pretending to be real or genuine?] no no no, but the noise problem machine(8086:1c20) in another city, I will make sure it again. I meant about the reliability of the test result. Or whether we're heading to a wrong fish. In anyway, which kernel version are you testing? And exactly what is your problem? Which machine, which hardware setup (codec, etc) and which output, and how is the sound backend (PulseAudio or direct ALSA write)? > > And moreover, all Intel chipsets do work with snooping well, AFAIK. > [Hans:] yes, all Intel chipsets do work with snooping well here too. And the problem case here is "non-snoop"+"aplay -D plughw:*.*"+"44.1k 16bit"+"8086:1c20", I will see if I can find more machine do the test. Ah, so you explicitly test with non-snoop mode for this chipset? For what purpose...? > > 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) > [Hans :] I did this, and the Oops report as the same. My bad, there are other SG-buffer codes in sound/hda/*, too. So scratch these two oneliners. The only thing you'd need is the big-hammer change (again oneliner :) --- a/sound/core/Kconfig +++ b/sound/core/Kconfig @@ -181,7 +181,7 @@ config SND_VMASTER bool config SND_DMA_SGBUF - def_bool y + def_bool n depends on X86 source "sound/core/seq/Kconfig" > >And, again, please avoid top-posting. > [Hans :] sorry, I didn't understand at first. My mailbox is Outlook, am I right now? Yes, looks better now. thanks, Takashi