Re: i810 audio patch

From: Doug Ledford (dledford@redhat.com)
Date: Tue Dec 04 2001 - 16:15:35 EST


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; }

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 07 2001 - 21:00:25 EST