From: Lee Revell <rlrevell@joe-job.com>
To: Jaroslav Kysela <perex@suse.cz>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>, tiwai@suse.cz
Subject: Re: [PATCH] emu10k1: add interval timer support
Date: Wed, 03 Nov 2004 14:43:54 -0500 [thread overview]
Message-ID: <1099511035.1617.32.camel@krustophenia.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0409171052300.1774@pnote.perex-int.cz>
On Fri, 2004-09-17 at 10:59 +0200, Jaroslav Kysela wrote:
> On Fri, 17 Sep 2004, Lee Revell wrote:
>
> > This patch adds the necessary functions to support the emu10k1's
> > interval timer. The interval timer is the mechanism used by every other
> > known emu10k1 driver to generate the period interrupts for playback.
> > These are ported from the OSS driver.
>
> 1) please, make snd_emu10k1_timer_set() function inlined
> 2) use atomic bitops for timer->state and make also enable/disable
> functions inlined
> 3) I don't like so much proposed scheduling as I stated in my previous
> e-mails; you cannot guarantee the right period boundary acknowledge
> at all - there will be always some additional delay when more than one
> stream is activated
> 4) the more appropriate place for the card's timer is timer API
> 5) multichannel PCM should be created rather trying to do ugly things with
> timer
OK I converted this code to use the ALSA timer API. This seems to work
fine, I can access the timer from userspace. However there does not
seem to be an existing example of a driver that uses the ALSA timer API
internally; all the drivers that use the interval timer internally for
PCM period interrupts have open coded timer handling. AFAICT the ALSA
timer API should be OK for this purpose as well. Is this correct?
I am going to use the interval timer for multichannel PCM playback.
This works by allocating 16 voices, setting loop stop on all of them,
then setting the timer. In the first timer interrupt we clear loop stop
on all the voices with one PCI write, then re-arm the timer, and set the
PCM running; we now have 16 voices in perfect sync. Subsequent timer
interrupts just call snd_pcm_period_elapsed.
The above scheme could also work with an extra voice for timing but
would be uglier. Since the multichannel device does not have to support
multiple open, and only 48KHZ playback, the timer seems to be a much
cleaner solution. Regular PCM playback will continue to use the extra
voice.
--
Lee Revell <rlrevell@joe-job.com>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
next prev parent reply other threads:[~2004-11-03 19:43 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-17 7:19 [PATCH] emu10k1: add interval timer support Lee Revell
2004-09-17 8:59 ` Jaroslav Kysela
2004-09-21 19:36 ` Lee Revell
2004-09-22 10:16 ` Takashi Iwai
2004-09-22 10:17 ` Jaroslav Kysela
2004-09-22 15:01 ` Lee Revell
2004-09-24 13:43 ` Takashi Iwai
2004-09-24 13:56 ` Jaroslav Kysela
2004-09-24 14:53 ` Paul Davis
2004-09-24 15:13 ` Takashi Iwai
2004-09-24 15:26 ` Paul Davis
2004-09-24 15:33 ` Takashi Iwai
2004-09-24 21:02 ` emu10k1 multichannel playback design (was Re: [PATCH] emu10k1: add interval timer support) Lee Revell
2004-09-24 22:32 ` Paul Davis
2004-09-24 22:57 ` Lee Revell
2004-09-25 4:05 ` Lee Revell
2004-09-26 0:55 ` Lee Revell
2004-09-26 2:51 ` Lee Revell
2004-09-26 3:10 ` Lee Revell
2004-09-26 3:15 ` Paul Davis
2004-09-26 3:19 ` Lee Revell
2004-09-26 3:50 ` Lee Revell
2004-09-26 6:50 ` Lee Revell
2004-09-26 11:38 ` Jaroslav Kysela
2004-09-27 0:40 ` Lee Revell
2004-09-27 6:48 ` Jaroslav Kysela
2004-09-27 14:35 ` Lee Revell
2004-11-03 19:43 ` Lee Revell [this message]
2004-11-03 21:24 ` [PATCH] emu10k1: add interval timer support Lee Revell
2004-11-03 23:08 ` Lee Revell
2004-11-09 14:24 ` Takashi Iwai
2004-11-10 4:32 ` Lee Revell
2004-11-10 9:50 ` Takashi Iwai
2004-11-04 17:05 ` Jaroslav Kysela
2004-11-04 19:13 ` 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=1099511035.1617.32.camel@krustophenia.net \
--to=rlrevell@joe-job.com \
--cc=alsa-devel@lists.sourceforge.net \
--cc=perex@suse.cz \
--cc=tiwai@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.