From: Adrian McMenamin <adrian@mcmen.demon.co.uk>
To: Takashi Iwai <tiwai@suse.de>
Cc: Alsa-devel <alsa-devel@lists.sourceforge.net>,
linux-sh <linuxsh-dev@lists.sourceforge.net>,
Lee Revell <rlrevell@joe-job.com>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: Re: [Alsa-devel] [PATCH] Add Dreamcast AICA driver to alsa-driver
Date: Tue, 25 Apr 2006 20:20:12 +0100 [thread overview]
Message-ID: <1145992812.9249.5.camel@localhost.localdomain> (raw)
In-Reply-To: <s5hejzm26x0.wl%tiwai@suse.de>
On Mon, 2006-04-24 at 19:57 +0200, Takashi Iwai wrote:
> At Mon, 24 Apr 2006 18:44:55 +0100,
> Adrian McMenamin wrote:
> >
> > >
> > > > +static int stereo_buffer_transfer(struct snd_pcm_substream
> > > > + *substream, int buffer_size, int period)
> > > > +{
> > >
> > > I feel this transfer-and-wait could be done more efficiently using
> > > workq than doing it in timer callback. The trigger(start) and
> > > aica_period_elapsed() calls queue_work() at each time.
> > >
> > > The most work of spu_begin_dma() should be put in the workq, too.
> > >
> >
> > heh. If you remember, a couple of months ago I had this in a kernel
> > thread - ie much the same - and you or Lee said I should absolutely not
> > use that mechanism :)
>
> Well, a source code tell you better than hundreds words :)
>
>
Unfortunately using the workqueue method bumps up the processor usage
figure up to 100% or pretty close for high demand samples.
So whilst mpg123 might drop from say 42% of CPU time to 36%, the kernel
thread uses up about 60% of processor time.
Why do you think using a workqueue/kernel thread is the right way to go?
Is it because of the global dma lock? That can be dropped, I'd much
rather have the (theoretical) occasional mess of the samples being
played rather than have a model that is so vulnerable to other demands
on the CPU.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
next prev parent reply other threads:[~2006-04-25 19:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-23 22:36 [PATCH] Add Dreamcast AICA driver to alsa-driver Adrian McMenamin
2006-04-23 22:46 ` [Alsa-devel] " Adrian McMenamin
2006-04-24 11:10 ` Takashi Iwai
2006-04-24 11:10 ` [Alsa-devel] " Takashi Iwai
2006-04-24 17:44 ` [linuxsh-dev] " Adrian McMenamin
2006-04-24 17:57 ` Takashi Iwai
2006-04-25 19:20 ` Adrian McMenamin [this message]
2006-04-26 9:44 ` [linuxsh-dev] " Takashi Iwai
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=1145992812.9249.5.camel@localhost.localdomain \
--to=adrian@mcmen.demon.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=lethal@linux-sh.org \
--cc=linuxsh-dev@lists.sourceforge.net \
--cc=rlrevell@joe-job.com \
--cc=tiwai@suse.de \
/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.