From: "John W. Linville" <linville@tuxdriver.com>
To: linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au,
jgarzik@pobox.com
Subject: [patch 2.4.29-rc1] i810_audio: offset LVI from CIV to avoid stalled start
Date: Mon, 17 Jan 2005 13:46:09 -0500 [thread overview]
Message-ID: <20050117184609.GE4348@tuxdriver.com> (raw)
In-Reply-To: <20050117183708.GD4348@tuxdriver.com>
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))))
;
next prev parent reply other threads:[~2005-01-17 18:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 18:37 [rfc] i810_audio: offset LVI from CIV to avoid stalled start John W. Linville
2005-01-17 18:46 ` John W. Linville [this message]
2005-01-17 22:54 ` [patch 2.4.29-rc1] " Thomas Voegtle
2005-01-17 20:39 ` [rfc] " Herbert Xu
2005-01-17 21:44 ` John W. Linville
2005-01-17 23:23 ` Herbert Xu
2005-01-18 18:07 ` John W. Linville
2005-01-18 22:42 ` Herbert Xu
2005-01-19 8:59 ` Thomas Voegtle
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=20050117184609.GE4348@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).