From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support) Date: Tue, 20 May 2008 14:48:17 +0200 Message-ID: References: <6DA6B1DA-11B5-4B89-88AD-561B4D17B33B@kernel.crashing.org> <20080505195054.172000@gmx.net> <1210031058.21644.120.camel@pasglop> <20080506075115.269150@gmx.net> <1210063719.21644.162.camel@pasglop> <20080506091622.269180@gmx.net> <1211217790.2037.3.camel@marquez.cjg.home> 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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 734B2243B5 for ; Tue, 20 May 2008 14:48:18 +0200 (CEST) In-Reply-To: <1211217790.2037.3.camel@marquez.cjg.home> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Giuseppe Coviello Cc: linuxppc-dev@ozlabs.org, Gerhard Pircher , alsa-devel@alsa-project.org, galak@kernel.crashing.org, benh@kernel.crashing.org List-Id: alsa-devel@alsa-project.org At Mon, 19 May 2008 19:23:10 +0200, Giuseppe Coviello wrote: > > On mer, 14/05/2008 14.26 +0200, Takashi Iwai wrote: > [cut] > > OK, here is another patch for testing. Since I lost my old patch > > somewhere (and it's not worth to dig the archive), I wrote it up > > quickly from scratch. This version should cover both SG and non-SG > > buffers. It's against the latest git tree. > > > > The patch adds a hackish verison of dma_mmap_coherent() for some > > architectures in sound/core/pcm_native.c. I'm not sure whether this > > works. I just tested it on X86. It'd be appreciated if someone can > > test this. > > > > Also, this disables HDSPM driver for non-X86/IA64 since the driver has > > own copy and silence methods that are incompatible with the new > > SG-buffer data. > > > > > > And, yes, I know we need to clean up huge messes in ALSA memory > > handling routines. But, let's fix obvious bugs before starting a big > > rewrite... > > > > I've just tested this patch on the sam440ep and it works great (and > sounds great, of course). I had also to make the following changes: Hmm, weird. cs4281 has no SG buffer at all, so basically it cannot work like that... FYI, the latest patches can be found on git://git.kernel.org/pub/scm/linux/kernel/tiwai/sound-unstable-2.6.git thanks, Takashi > > Signed-off-by: Giuseppe Coviello > > diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c > index 7556fd9..f5f208e 100644 > --- a/sound/pci/cs4281.c > +++ b/sound/pci/cs4281.c > @@ -952,6 +952,9 @@ static struct snd_pcm_ops snd_cs4281_playback_ops = { > .prepare = snd_cs4281_playback_prepare, > .trigger = snd_cs4281_trigger, > .pointer = snd_cs4281_pointer, > + .copy = snd_pcm_sgbuf_ops_copy, > + .silence = snd_pcm_sgbuf_ops_silence, > + .page = snd_pcm_sgbuf_ops_page, > }; > > static struct snd_pcm_ops snd_cs4281_capture_ops = { > @@ -963,6 +966,8 @@ static struct snd_pcm_ops snd_cs4281_capture_ops = { > .prepare = snd_cs4281_capture_prepare, > .trigger = snd_cs4281_trigger, > .pointer = snd_cs4281_pointer, > + .copy = snd_pcm_sgbuf_ops_copy, > + .page = snd_pcm_sgbuf_ops_page, > }; > > static int __devinit snd_cs4281_pcm(struct cs4281 * chip, int device, > >