>
> Hmmmm... I'm working on a new patch that won't use like 30% of your
> CPU... you prolly want to wait for that one.
>
> -- John
Hi folks,
As before... this is a patch against the msnd.c file included with
2.4.0-test2ac. It fixes turtle beach multisound cards so that they can
play and record.
Unlike the earlier patch I posted, this one shouldn't eat 150Mhz worth
of CPU cycles.
-- John
--- msnd.c Sat Jul 1 03:06:07 2000
+++ msnd-mine.c Sat Jul 1 03:03:34 2000
@@ -158,6 +158,7 @@
int msnd_fifo_write(msnd_fifo *f, const char *buf, size_t len, int user)
{
int count = 0;
+ char *baseptr;
if (f->len == f->n)
return 0;
@@ -181,7 +182,11 @@
if (copy_from_user(f->data + f->tail, buf, nwritten))
return -EFAULT;
} else
- memcpy(f->data + f->tail, buf, nwritten);
+ {
+ baseptr=ioremap((unsigned int)buf, nwritten);
+ memcpy_fromio(f->data + f->tail, baseptr, nwritten);
+ iounmap(baseptr);
+ }
count += nwritten;
buf += nwritten;
@@ -196,6 +201,7 @@
int msnd_fifo_read(msnd_fifo *f, char *buf, size_t len, int user)
{
int count = 0;
+ char *baseptr;
if (f->len == 0)
return f->len;
@@ -219,7 +225,11 @@
if (copy_to_user(buf, f->data + f->head, nread))
return -EFAULT;
} else
- memcpy(buf, f->data + f->head, nread);
+ {
+ baseptr=ioremap((unsigned int)buf, nread);
+ memcpy_toio(baseptr, f->data + f->head, nread);
+ iounmap(baseptr);
+ }
count += nread;
buf += nread;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jul 01 2000 - 06:21:27 EDT