lkml.org 
[lkml]   [2002]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 10/10 sound/oss/dmasound/dmasound_q40.c
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 13:28    [W:0.045 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site