* [PATCH] via82xx.c #2
@ 2002-09-08 17:53 Rui Sousa
2002-09-08 18:17 ` Pavel Roskin
2002-09-09 9:00 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Rui Sousa @ 2002-09-08 17:53 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 307 bytes --]
Hi again,
I realized the CVS driver after Jul 31 (sg buffer implementation) was
already broken when using a fragment size smaller than PAGE_SIZE. The
attached patch fixes this. I now have CVS driver from 8/27/2002 working
(last commit before the merge), but mainline of today is still broken.
Rui Sousa
[-- Attachment #2: via82xx patch #2 --]
[-- Type: TEXT/PLAIN, Size: 1087 bytes --]
Index: alsa-kernel/pci/via82xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.1
diff -u -r1.1 via82xx.c
--- alsa-kernel/pci/via82xx.c 4 Sep 2002 14:17:47 -0000 1.1
+++ alsa-kernel/pci/via82xx.c 8 Sep 2002 17:38:04 -0000
@@ -231,7 +231,7 @@
if (dev->tbl_size < PAGE_SIZE) {
for (i = 0; i < dev->tbl_entries; i++)
- dev->table[i << 1] = cpu_to_le32((u32)sgbuf->table[0].addr + dev->fragsize * i);
+ dev->table[i << 1] = cpu_to_le32((u32)sgbuf->table[(dev->fragsize * i) >> PAGE_SHIFT].addr + (dev->fragsize * i) % PAGE_SIZE);
} else {
for (i = 0; i < dev->tbl_entries; i++)
dev->table[i << 1] = cpu_to_le32((u32)sgbuf->table[i].addr);
@@ -241,7 +241,7 @@
dev->table[(i << 1) + 1] = cpu_to_le32(VIA_TBL_BIT_FLAG | dev->tbl_size);
size -= dev->tbl_size;
}
- dev->table[(dev->tbl_entries << 1) - 1] = cpu_to_le32(VIA_TBL_BIT_EOL | size);
+ dev->table[((dev->tbl_entries - 1) << 1) + 1] = cpu_to_le32(VIA_TBL_BIT_EOL | size);
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] via82xx.c #2
2002-09-08 17:53 [PATCH] via82xx.c #2 Rui Sousa
@ 2002-09-08 18:17 ` Pavel Roskin
2002-09-09 9:00 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Roskin @ 2002-09-08 18:17 UTC (permalink / raw)
To: Rui Sousa; +Cc: alsa-devel
Hello, Rui!
> I realized the CVS driver after Jul 31 (sg buffer implementation) was
> already broken when using a fragment size smaller than PAGE_SIZE. The
> attached patch fixes this. I now have CVS driver from 8/27/2002 working
> (last commit before the merge), but mainline of today is still broken.
Great! This fixes my problem with Via 686A as well.
I was going to look into this problem today, and you saved me this
beautiful Sunday for something else. My Via 686A is now playing in your
honor :-)
Takashi, please apply those two patches.
--
Regards,
Pavel Roskin
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] via82xx.c #2
2002-09-08 17:53 [PATCH] via82xx.c #2 Rui Sousa
2002-09-08 18:17 ` Pavel Roskin
@ 2002-09-09 9:00 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2002-09-09 9:00 UTC (permalink / raw)
To: Rui Sousa; +Cc: alsa-devel
Hi Rui,
At Sun, 8 Sep 2002 19:53:09 +0200 (CEST),
Rui Sousa wrote:
>
> Hi again,
>
> I realized the CVS driver after Jul 31 (sg buffer implementation) was
> already broken when using a fragment size smaller than PAGE_SIZE. The
> attached patch fixes this. I now have CVS driver from 8/27/2002 working
> (last commit before the merge), but mainline of today is still broken.
nice spotting.
applied both patches.
thanks!
Takashi
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-09-09 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-08 17:53 [PATCH] via82xx.c #2 Rui Sousa
2002-09-08 18:17 ` Pavel Roskin
2002-09-09 9:00 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.