From: Chris Purnell <cjp@lost.org.uk>
To: Jaroslav Kysela <perex@suse.cz>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: EMU10K1 and the extra voice
Date: Wed, 9 Jun 2004 19:16:15 +0000 [thread overview]
Message-ID: <20040609191615.GA4529@lost.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0406090909160.1767@pnote.perex-int.cz>
On Wed, Jun 09, 2004 at 09:21:42AM +0200, Jaroslav Kysela wrote:
> On Wed, 9 Jun 2004, Chris Purnell wrote:
> > I've been having a look at how the other driver work (that is the
> > oss like driver in the linux kernel). It uses the sound cards timer
> > interrupt. Which the alsa driver appears not to be using at all.
> > What it does is set the timer interval to that of the shotest period
> > time in use. If a period time is twice that of the timer interval is
> > it serviced every other timer interrupt. If it is three times ... etc.
> > That way you tipically get an interrupt slightly more often than end of
> > the period.
>
> 1. how you ensure that PCM stream starts EXACTLY at timer interrupt?
The OSS style driver doesn't. It just ensures that the interrupts happen
often enough to keep filling the buffer.
> 2. I prefer to reserve timer for sequencer purposes
If you think it will ever been used for that pourose.
I did think of a simple change that might have allowed me to do what I
want. And that was to not allocate the extra voice when the number of
periods was one. However when I set the number of periods to 1 I got
stuttering. What I'm going is periodically calling
snd_pcm_avail_update(), snd_pcm_mmap_begin() and snd_pcm_mmap_commit()
without using ALSA for timing. So if anyone was going to get away
with setting the number periods to 1 I thought I would. Do you know
why that didn't work?
> > What I was wanting all those PCM voices for was OpenAL sources.
> > I'm writing a OpenAL that uses the hardware mixing capabilities
> > of the emu10k1 series sound cards. It's almost there but I've
> > come across a bigger problem. It is much faster to use the
> > existing, software mixing, OpenAL. I've gone over my code and
> > it is definitly doing less work. Some there must be something
> > simultaneously using all those PCM devices that is slowing my
> > computer down. There could be some large overhead starting or
> > stopping the PCM devices. It could be all those extra interrupts
> > or all the extra data going over the PCI bus. I don't know.
> > I'm going to have to do some more testing.
>
> Yes, I'm interested, too.
I've found out what the problem was. I had left the bit where
I specify the period size and number commented out. So it was
setting the period size as small as the driver would let it.
And so my computer was being overwhelmed with all those
interrupts.
--
Christopher John Purnell | I thought I'd found a reason to live
http://www.lost.org.uk/ | Just like before when I was a child
--------------------------| Only to find that dreams made of sand
What gods do you pray to? | Would just fall apart and slip through my hands
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
prev parent reply other threads:[~2004-06-09 19:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-05 12:59 EMU10K1 and the extra voice Chris Purnell
2004-06-06 4:54 ` Glenn Maynard
2004-06-06 10:40 ` Jaroslav Kysela
2004-06-06 18:09 ` Glenn Maynard
2004-06-07 7:21 ` Jaroslav Kysela
2004-06-06 10:38 ` Jaroslav Kysela
2004-06-09 0:35 ` Chris Purnell
2004-06-09 7:21 ` Jaroslav Kysela
2004-06-09 19:16 ` Chris Purnell [this message]
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=20040609191615.GA4529@lost.org.uk \
--to=cjp@lost.org.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@suse.cz \
/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.