linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wei_ni@ali.com.tw
To: alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] update for ALi5455 Audio Driver for 2.4.20
Date: Wed, 12 Nov 2003 14:19:43 +0800	[thread overview]
Message-ID: <OF347800BA.593B8268-ON48256DDC.0021B651@LocalDomain> (raw)

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.20

patchfile for ali5455.c:
---------------------------------------------------------------------------------
--- ali5455.c.orig  2003-11-12 10:14:05.000000000 +0800
+++ ali5455.c  2003-11-12 10:48:26.000000000 +0800
@@ -1253,17 +1253,15 @@
 {
     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
@@ -1859,6 +1857,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)
@@ -1959,7 +1958,7 @@
     if (size > (PAGE_SIZE << dmabuf->buforder))
          goto out;
     ret = -EAGAIN;
-    if (remap_page_range(vma->vm_start, virt_to_phys(dmabuf->rawbuf),
size, vma->vm_page_prot))
+    if (remap_page_range(vma,vma->vm_start, virt_to_phys(dmabuf->rawbuf),
size, vma->vm_page_prot))
          goto out;
     dmabuf->mapped = 1;
     dmabuf->trigger = 0;

Ni Wei
2003-11-12


                 reply	other threads:[~2003-11-12  6:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OF347800BA.593B8268-ON48256DDC.0021B651@LocalDomain \
    --to=wei_ni@ali.com.tw \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] update for ALi5455 Audio Driver for 2.4.20' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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