From: Lee Revell <rlrevell@joe-job.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@suse.cz>,
ALSA development <alsa-devel@alsa-project.org>
Subject: Re: emu10k1 latency / capture period
Date: Tue, 22 Jun 2004 17:15:18 -0400 [thread overview]
Message-ID: <1087938917.2426.14.camel@debian> (raw)
In-Reply-To: <s5h7jtzn4hv.wl@alsa2.suse.de>
On Tue, 2004-06-22 at 08:47, Takashi Iwai wrote:
> At Tue, 22 Jun 2004 13:29:36 +0200 (CEST),
> Jaroslav wrote:
> >
> > On Tue, 22 Jun 2004, Takashi Iwai wrote:
> >
> > > At Mon, 21 Jun 2004 16:20:38 -0400,
> > > Lee Revell wrote:
> > > >
> > > > The capture will be driven by the playback interrupts (I think
> > > > EFX_BUFFER(HALF)FULL). This would look very similar to the
> > > > interrupt handler example #2 in your ALSA driver guide, which
> > > > uses timer interrupts to drive the capture/playback, except
> > > > that for playback, in addition to calling snd_pcm_period_elapsed()
> > > > on the playback substream, we also maintain a pointer to the
> > > > corresponding *capture* substream, and call snd_pcm_period_elapsed()
> > > > on it, manually tracking the frames processed in the same way the timer
> > > > interrupt example does.
> > >
> > > Even if we ignore the capture interrupts and use an additional
> > > interrupt source (e.g. an extra playback stream), the size of capture
> > > buffer still must follow the restriction. That is, the minimal
> > > capture buffer size is still 384 x 2 bytes, although the period size
> > > can be set independently to smaller than 384 bytes.
> >
> > You can do lowlatency even with huge ring buffer, if you have a good
> > interrupt / scheduling timer, but it requires changes in application.
>
> Yes. At least, JACK should work well.
>
Yes, this design (i call it the FXBus driver) is mainly intended to
support JACK. The existing driver already supports everything you would
want to do with this card except lowlatency/multichannel anyway.
I added some printk()s to irq.c and io.c, and when running JACK in
playback mode at the lowest latency (64), this is what is happening in
the driver:
Jun 22 16:58:33 debian kernel: IPR_CHANNELLOOP - voice_max is 0x2
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x4
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x47f
Jun 22 16:58:33 debian kernel: irq - status = 0x42
Jun 22 16:58:33 debian kernel: IPR_CHANNELLOOP - voice_max is 0x2
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x4
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x43f
Jun 22 16:58:33 debian kernel: irq - status = 0x42
Jun 22 16:58:33 debian kernel: IPR_CHANNELLOOP - voice_max is 0x2
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x4
Jun 22 16:58:33 debian kernel: snd_emu10k1_ptr_read returns 0x47f
So the IPR_CHANNELLOOP interrupts are a good timer source.
I am not exactly sure how to proceed from here, I will keep hacking at
the driver and report anything interesting.
Lee
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
next prev parent reply other threads:[~2004-06-22 21:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 20:14 emu10k1 latency / capture period Lee Revell
2004-06-16 20:52 ` James Courtier-Dutton
2004-06-16 21:02 ` Lee Revell
2004-06-20 4:06 ` Lee Revell
2004-06-21 15:35 ` Takashi Iwai
2004-06-21 15:54 ` Takashi Iwai
2004-06-21 20:20 ` Lee Revell
2004-06-22 11:13 ` Takashi Iwai
2004-06-22 11:29 ` Jaroslav Kysela
2004-06-22 12:47 ` Takashi Iwai
2004-06-22 21:15 ` Lee Revell [this message]
2004-06-28 20:44 ` Lee Revell
2004-06-22 20:26 ` Lee Revell
2004-06-22 18:48 ` Lee Revell
2004-06-21 20:25 ` Lee Revell
2004-07-08 0:40 ` Lee Revell
-- strict thread matches above, loose matches on Subject: below --
2004-06-17 9:06 Peter Zubaj
2004-06-17 18:37 ` Lee Revell
2004-06-17 23:26 ` Paul Davis
2004-06-18 9:33 ` Takashi Iwai
2004-06-18 19:39 ` Lee Revell
2004-06-18 23:26 ` Lee Revell
2004-06-21 8:03 Peter Zubaj
2004-06-21 15:26 ` Takashi Iwai
2004-06-21 20:27 ` Lee Revell
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=1087938917.2426.14.camel@debian \
--to=rlrevell@joe-job.com \
--cc=alsa-devel@alsa-project.org \
--cc=perex@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox