lkml.org 
[lkml]   [2001]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: i810 audio patch
Nathan Bryant wrote:

> Doug Ledford wrote:
>
>> There is a new version of the driver (0.07) on my web site. It has
>> this issue and one other issue fixed (hopefully). The other issue is
>> when using artsd with the 0.06 driver, I had a report that artsd would
>> end up waiting on select forever and never getting woken up. The 0.07
>> driver changes wait queue and lvi handling in a few strategic places,
>> so it should work. However, it's untested. Reports welcome.
>
>
> With 0.07, the kernel goes into an endless sleep as soon as artsd calls
> select(). I don't think the looping changes to i810_poll are correct...
> or even necessary?


Probably not. Although I did change it back but then change it in
another way. Use the attached patch to back out those changes and let
me know if it works (for some reason, I doubt it).

> though the userfragsize change is probably appropriate.
>



--

Doug Ledford <dledford@redhat.com> http://people.redhat.com/dledford
Please check my web site for aic7xxx updates/answers before
e-mailing me about problems
--- i810_audio.c.07 Tue Dec 4 16:13:39 2001
+++ i810_audio.c.07b Tue Dec 4 16:13:00 2001
@@ -1530,30 +1530,24 @@
struct dmabuf *dmabuf = &state->dmabuf;
unsigned long flags;
unsigned int mask = 0;
- DECLARE_WAITQUEUE(waita, current);
+ int count;

if(!dmabuf->ready)
return 0;
- add_wait_queue(&dmabuf->wait, &waita);
-again:
+ poll_wait(file, &dmabuf->wait, wait);
spin_lock_irqsave(&state->card->lock, flags);
i810_update_ptr(state);
+ count = dmabuf->count;
+ spin_unlock_irqrestore(&state->card->lock, flags);
if (file->f_mode & FMODE_READ && dmabuf->enable & ADC_RUNNING) {
- if (dmabuf->count >= (signed)dmabuf->userfragsize)
+ if (count >= (signed)dmabuf->userfragsize)
mask |= POLLIN | POLLRDNORM;
}
if (file->f_mode & FMODE_WRITE && dmabuf->enable & DAC_RUNNING) {
if ((signed)dmabuf->dmasize >=
- dmabuf->count + (signed)dmabuf->userfragsize)
+ count + (signed)dmabuf->userfragsize)
mask |= POLLOUT | POLLWRNORM;
}
- spin_unlock_irqrestore(&state->card->lock, flags);
- if (mask == 0) {
- poll_wait(file, &dmabuf->wait, wait);
- goto again;
- }
- remove_wait_queue(&dmabuf->wait, &waita);
-
return mask;
}
\
 
 \ /
  Last update: 2005-03-22 13:13    [from the cache]
©2003-2011 Jasper Spaans