WARNING: This patch causes some problems on some motherboards. --- linux/drivers/sound/i810_audio.c.orig Thu Dec 27 11:03:18 2001 +++ linux/drivers/sound/i810_audio.c Thu Dec 27 11:03:56 2001 @@ -198,7 +198,7 @@ #define INT_MASK (INT_SEC|INT_PRI|INT_MC|INT_PO|INT_PI|INT_MO|INT_NI|INT_GPI) -#define DRIVER_VERSION "0.12" +#define DRIVER_VERSION "0.13" /* magic numbers to protect our data structures */ #define I810_CARD_MAGIC 0x5072696E /* "Prin" */ @@ -952,12 +952,16 @@ * 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->ready) { + if(rec && dmabuf->count < dmabuf->dmasize && + (dmabuf->trigger & PCM_ENABLE_INPUT)) + { 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 && + (dmabuf->trigger & PCM_ENABLE_OUTPUT)) + { outb((inb(port+OFF_CIV)+1)&31, port+OFF_LVI); __start_dac(state); while( !(inb(port + OFF_CR) & ((1<<4) | (1<<2))) ) ;