Offset LVI past CIV when starting DAC/ADC in order to prevent
stalled start.
---
Here is the (working) patch I'm using against a later 2.4.  This makes
sound work fine with Enemy Territory.

 drivers/sound/i810_audio.c |   10 ++++++++++
 1 files changed, 10 insertions(+)

--- linux-test/drivers/sound/i810_audio.c.orig  2005-01-14 17:21:20.000000000 
-0500
+++ linux-test/drivers/sound/i810_audio.c       2005-01-17 13:11:31.000000000 
-0500
@@ -1081,10 +1081,20 @@ static void __i810_update_lvi(struct i81
        if (count < fragsize)
                return;
 
+       /* if we are currently stopped, then our CIV is actually set to our
+        * *last* sg segment and we are ready to wrap to the next.  However,
+        * if we set our LVI to the last sg segment, then it won't wrap to
+        * the next sg segment, it won't even get a start.  So, instead, when
+        * we are stopped, we set both the LVI value and also we increment
+        * the CIV value to the next sg segment to be played so that when
+        * we call start, things will operate properly
+        */
        if (!dmabuf->enable && dmabuf->ready) {
                if (!(dmabuf->trigger & trigger))
                        return;
 
+               CIV_TO_LVI(state->card, port, 1);
+
                start(state);
                while (!(I810_IOREADB(state->card, port + OFF_CR) & ((1<<4) | 
(1<<2))))
                        ;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to