Re: [PATCH] TEST of patch proposed for i810 audio

From: Nathan Bryant (nbryant@allegientsystems.com)
Date: Wed Dec 26 2001 - 18:01:27 EST


maybe this patch will solve your problem, samir, maybe it won't;
regardless, it should fix at least one corner case and is either
obviously correct or start_*c is not ;-)

patch is against doug's 0.12.


--- i810_audio.c.12 Wed Dec 19 02:04:06 2001
+++ linux/drivers/sound/i810_audio.c Wed Dec 26 17:31:22 2001
@@ -952,12 +952,12 @@
          * the CIV value to the next sg segment to be played so that when
          * we call start_{dac,adc}, things will operate properly
          */
- if (!dmabuf->enable && dmabuf->trigger) {
- if(rec && dmabuf->count != dmabuf->dmasize) {
+ if (!dmabuf->enable && dmabuf->trigger && dmabuf->ready) {
+ if(rec && dmabuf->count < dmabuf->dmasize) {
                         outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
                         __start_adc(state);
                         while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;
- } else if(dmabuf->count) {
+ } else if(!rec && dmabuf->count) {
                         outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI);
                         __start_dac(state);
                         while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;

-
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 : Mon Dec 31 2001 - 21:00:12 EST