From: Richard Zidlicky <rz@linux-m68k.org>
To: pwaechtler@mac.com
Cc: Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 10/10 sound/oss/dmasound/dmasound_q40.c
Date: Thu, 12 Sep 2002 10:26:43 +0200 [thread overview]
Message-ID: <20020912102643.B215@linux-m68k.org> (raw)
In-Reply-To: <20020911234500.B4476@linux-m68k.org>; from rz on Wed, Sep 11, 2002 at 11:45:00PM +0200
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
next prev parent reply other threads:[~2002-09-12 8:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 19:56 [PATCH] 10/10 sound/oss/dmasound/dmasound_q40.c pwaechtler
[not found] ` <20020911234500.B4476@linux-m68k.org>
2002-09-12 8:26 ` Richard Zidlicky [this message]
[not found] <200209091007.g89A7dZH010390@smtp-relay02.mac.com>
2002-09-09 16:07 ` Linus Torvalds
2002-09-09 17:20 ` Tomas Szepe
2002-09-09 17:32 ` Andreas Dilger
2002-09-09 17:32 ` David S. Miller
2002-09-09 19:47 ` pwaechtler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020912102643.B215@linux-m68k.org \
--to=rz@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pwaechtler@mac.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.