mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] update for ALi5455 Audio Driver for 2.4.22
@ 2003-11-12  6:25 wei_ni
  0 siblings, 0 replies; only message in thread
From: wei_ni @ 2003-11-12  6:25 UTC (permalink / raw)
  To: alan; +Cc: linux-kernel

Dear all,

We resolve the bugs in ALi5455 audio driver.

Best regards,

Ni wei
http://www.ali.com.tw

Information about update:
Updated files:      ali5455.c
Location:      drivers/sound
Driver Version:     0.02ac
Kernel Version:     2.4.22

patchfile for ali5455.c:
---------------------------------------------------------------------------------
--- ali5455.c.orig  2003-11-11 19:15:13.000000000 +0800
+++ ali5455.c  2003-11-12 09:52:34.000000000 +0800
@@ -1254,17 +1254,16 @@
 {
     struct dmabuf *dmabuf = &state->dmabuf;
     int free;
-    ali_update_ptr(state);
-    // catch underruns during playback
+
     if (dmabuf->count < 0) {
          dmabuf->count = 0;
          dmabuf->swptr = dmabuf->hwptr;
     }
-    free = dmabuf->dmasize - dmabuf->count;
-    free -= (dmabuf->hwptr % dmabuf->fragsize);
-    if (free < 0)
-         return (0);
-    return (free);
+    free = dmabuf->dmasize - dmabuf->swptr;
+    if ((dmabuf->count + free) > dmabuf->dmasize){
+         free = dmabuf->dmasize - dmabuf->count;
+    }
+    return free;
 }

 static inline int ali_get_available_read_data(struct
@@ -1860,6 +1859,7 @@
                  NOTHING we can do to prevent it. */

               /* FIXME - do timeout handling here !! */
+              schedule_timeout(tmo >= 2 ? tmo : 2);

               if (signal_pending(current)) {
                    if (!ret)
---------------------------------------------------------------------------------

Ni Wei
2003-11-12


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-11-12  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-12  6:25 [PATCH] update for ALi5455 Audio Driver for 2.4.22 wei_ni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®