Thread (33 messages) 33 messages, 7 authors, 2008-05-22

Re: ALSA fixes for non-coherent archs (Re: [PATCH] Sam440ep support)

flat view

From: Giuseppe Coviello <hidden>
Date: 2008-05-19 17:23:11
Also in: alsa-devel
Subsystem: sound, the rest · Maintainers: Jaroslav Kysela, Takashi Iwai, Linus Torvalds

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:

Signed-off-by: Giuseppe Coviello <redacted>
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,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help