Re: i810 audio patch

From: Nathan Bryant (nbryant@optonline.net)
Date: Tue Dec 04 2001 - 17:49:21 EST


Nathan Bryant wrote:

> this may be due to an output underrun... or i suppose lost interrupt
> is also possible.
>
> i think it might be wise to use
> get_available_read_data/get_free_write_space from i810_poll instead of
> dmabuf->count directly. i'll try this and see if it works...

No good. I tried the following, thinking that the underrun handling in
get_free_write_space would help, but it does the same thing.

What interrupt do we get upon underrun, are we dropping the
dmabuf->enable or DAC_RUNNING state when that happens?

--

static unsigned int i810_poll(struct file *file, struct poll_table_struct *wait){ struct i810_state *state = (struct i810_state *)file->private_data; struct dmabuf *dmabuf = &state->dmabuf; unsigned long flags; unsigned int mask = 0; int count;

if(!dmabuf->ready) return 0; poll_wait(file, &dmabuf->wait, wait); spin_lock_irqsave(&state->card->lock, flags); if (file->f_mode & FMODE_READ && dmabuf->enable & ADC_RUNNING) { count = i810_get_available_read_data(state); if (count >= (signed)dmabuf->userfragsize) mask |= POLLIN | POLLRDNORM; } if (file->f_mode & FMODE_WRITE && dmabuf->enable & DAC_RUNNING) { count = i810_get_free_write_space(state); if (count >= (signed)dmabuf->userfragsize) mask |= POLLOUT | POLLWRNORM; } spin_unlock_irqrestore(&state->card->lock, flags); 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:26 EST