> This didn't used to be a bug, but it is now (all these changes and
> merges have let some thigns slip in I'm afraid, and I'm not just
> referring to the work in the last few days, I'm also referring to
> changes that were lost in the time of the S/PDIF and PM merges).
Agreed. There are some uglies...
>
>
> Anyway, in i810_write, the lines that read:
>
> if (cnt > (dmabuf->dmasize - dmabuf->count))
> cnt = dmabuf->dmasize - dmabuf->count;
>
> should read:
>
> if (cnt > (dmabuf->dmasize - swptr))
> cnt = dmabuf->dmasize - swptr;
Okay. I thought I was being stupid. :-)
> Can you add a debug check to update_lvi()? Something like:
>
> #ifdef DEBUG_MMAP
> if (dmabuf->count > dmabuf->fragsize && inb(port+OFF_CIV) == x)
> printk(KERN_DEBUG,"i810_audio: update_lvi - CIV ==
> LVI\n");
> #endif
>
> and see if that triggers with the original mmap code?
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;
#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
also, I ran your other DEBUG_MMAP patch and the news is that count just
sits at 65536 ad nauseum.
-
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/