![]() | |||||||||||||
Messages in this thread |
On Thu, Aug 29, 2002 at 09:56:27PM +0200, pwaechtler@mac.com wrote:
> -static void Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp)
> -{> - if (q40_sc>1){> - *DAC_LEFT=*q40_pp++;> - *DAC_RIGHT=*q40_pp++;> - q40_sc -=2;> - master_outb(1,SAMPLE_CLEAR_REG);> - }else Q40Interrupt();> -}> -static void Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp)
> +static void Q40InterruptHandler(int irq, void *dummy, struct pt_regs *fp)
> +{> + spin_lock(&dmasound.lock);> + if (q40_sc>1){> + if (dmasound.soft.stereo){> + *DAC_LEFT=*q40_pp++;> + *DAC_RIGHT=*q40_pp++;> + q40_sc -=2;> + } else {> + *DAC_LEFT=*q40_pp;> + *DAC_RIGHT=*q40_pp++;> + q40_sc --;> + }> master_outb(1,SAMPLE_CLEAR_REG);
> }else Q40Interrupt();
> + spin_unlock(&dmasound.lock);
> }
> +
not so good. The interrupt will happen up to 20000/s so any
unneeded code in the interrupt handler like the test for stereo
should be avoided.. I will rewrite it in assembler someday.
Richard
-
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/
| ||||||||||||
| Last update: 2005-03-22 12:28 [from the cache] ©2003-2008 | |||||||||||||