From: Andris Pavenis <pavenis@latnet.lv>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.15: fix for i810_audio problems under KDE
Date: Fri, 23 Nov 2001 13:21:14 +0200 [thread overview]
Message-ID: <200111231121.fANBLEi00909@hal.astr.lu.lv> (raw)
i810_audio doesn't work under KDE for 2.4.15 (realy already for a rather
long time). I'm only getting garbled sound unless i810_audio.c is patched.
Perhaps the reason is use of non blocked output by artsd.
Included patch reverts one change between 2.4.6-ac1 and 2.4.6-ac2 and
also includes patch from Tobias Diedrich
( http://www.cs.helsinki.fi/linux/linux-kernel/2001-44/1023.html ).
As far as I have tested it fixes all problems I have met with i810_audio.
Andris
--- i810_audio.c~1 Tue Nov 20 11:23:24 2001
+++ i810_audio.c Tue Nov 20 13:08:05 2001
@@ -1405,10 +1405,9 @@
if (dmabuf->count < 0) {
dmabuf->count = 0;
}
- cnt = dmabuf->dmasize - dmabuf->fragsize - dmabuf->count;
- // this is to make the copy_from_user simpler below
- if(cnt > (dmabuf->dmasize - swptr))
- cnt = dmabuf->dmasize - swptr;
+ cnt = dmabuf->dmasize - swptr;
+ if(cnt > (dmabuf->dmasize - dmabuf->count))
+ cnt = dmabuf->dmasize - dmabuf->count;
spin_unlock_irqrestore(&state->card->lock, flags);
#ifdef DEBUG2
@@ -1419,16 +1418,13 @@
if (cnt <= 0) {
unsigned long tmo;
// There is data waiting to be played
+ i810_update_lvi(state,0);
if(!dmabuf->enable && dmabuf->count) {
/* force the starting incase SETTRIGGER has been used */
/* to stop it, otherwise this is a deadlock situation */
dmabuf->trigger |= PCM_ENABLE_OUTPUT;
start_dac(state);
}
- // Update the LVI pointer in case we have already
- // written data in this syscall and are just waiting
- // on the tail bit of data
- i810_update_lvi(state,0);
if (file->f_flags & O_NONBLOCK) {
if (!ret) ret = -EAGAIN;
goto ret;
@@ -1860,7 +1856,7 @@
if(dmabuf->mapped)
abinfo.bytes = dmabuf->count;
else
- abinfo.bytes = dmabuf->dmasize - dmabuf->count;
+ abinfo.bytes = dmabuf->dmasize - dmabuf->fragsize - dmabuf->count;
abinfo.fragments = abinfo.bytes / dmabuf->userfragsize;
spin_unlock_irqrestore(&state->card->lock, flags);
#ifdef DEBUG
reply other threads:[~2001-11-23 11:21 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=200111231121.fANBLEi00909@hal.astr.lu.lv \
--to=pavenis@latnet.lv \
--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
all inboxes | Powered by JetHome®