Re: i810 audio patch

Doug Ledford
2001-12-05T22:43:38Z

> Actually, I think I *may* have found the problem, in update ptr, it
> should look like this: going to test in a moment
>
> /* error handling and process wake up for DAC */
> if (dmabuf->enable == DAC_RUNNING) {
> /* update hardware pointer */
> hwptr = i810_get_dma_addr(state, 0);
> diff = hwptr - dmabuf->hwptr;
> if (hwptr < dmabuf->hwptr)
> diff += dmabuf->dmasize;

This is mathematically equivelant to what was already there.

> #if defined(DEBUG_INTERRUPTS) || defined(DEBUG_MMAP)
> printk("DAC HWP %d,%d,%d\n", hwptr, dmabuf->hwptr, diff);
> #endif
>
> reason: hwptr hits 65536 which is indistinguishable from 0 in mod
> arithmetic

The mod doesn't happen until all the rest is already done, and then it's
just cancelling out the dmabuf->dmasize portion (instead of using an if
statement to do the same thing).

> also, I ran your other DEBUG_MMAP patch and the news is that count just
> sits at 65536 ad nauseum.

Yes, but if I have the stuff leading up to it sitting at 65536 forever I
might be able to diagnose the problem (without installing quake myself
and taking the time to set it up anyway) ;-)

--

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