public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: jdow <jdow@earthlink.net>, Mark Hounschell <markh@compro.net>,
	linux-kernel@vger.kernel.org
Subject: Re: HZ question
Date: Wed, 14 Sep 2005 21:29:49 -0400	[thread overview]
Message-ID: <1126747789.13893.118.camel@mindpipe> (raw)
In-Reply-To: <Pine.LNX.4.61.0509131615450.8516@chaos.analogic.com>

On Tue, 2005-09-13 at 16:38 -0400, linux-os (Dick Johnson) wrote:
> > That means Linux is not a suitable operating system for multimedia
> > applications.
> > MIDI needs to schedule in 1 ms or smaller increments. The userland
> > application
> > should be able to set this. It should be able to determine this. If it
> > cannot
> > then it is useless. (It also explains why MIDI based applications are so
> > absolutely dreadful on Linux.)
> >
> > {^_^}   Joanne Dow said that.
> >
> >
> 
> Well no. MIDI stuff has drivers that interface with precision timers
> in your audio board such as Creative Labs Soundblaster. They have
> a serial connection that, with a simple adapter becomes MIDI I/O.
> These boards, and even the ones built into motherboards can (do)
> generate and receive precision MIDI.

Um, we know how MIDI interfaces work, thanks very much.

Yes, ideally all MIDI would use the soundcard's interval timer for
timing.  The problem is that so many of the soundcard drivers are
reverse engineered and we don't always know how to use it.  Currently
only the emu10k1 and ymfpci ALSA drivers support the soudn cards
hardware timer.  The emu10k1's interval timer was not supported at all
until ALSA 1.0.8 or so (I added the support).  And the ALSA sequencer
still does not use the soundcard timer by default, you have to pass
module options.  By default we have to use itimers because it works
everywhere.

And what if you're playing back a MIDI file from a sequencer into a
softsynth and sending the audio out through your cheap soundcard?  No
MIDI ports or timers available.  For example the intel8x0 doesn't have
an interval timer at all.

Userspace DOES need to know the timer resolution (but as others pointed
out you don't need to know HZ).  If HZ is 100 then the best itimers can
do is ~10ms which is unacceptable for MIDI, so the program uses /dev/rtc
for timing instead.

If you had checked the linux-audio-dev archives before spouting off
you'd find TONS of apps that do just this.

Lee


  reply	other threads:[~2005-09-15  1:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 12:48 HZ question Mark Hounschell
2005-09-13 13:46 ` linux-os (Dick Johnson)
2005-09-13 14:00   ` Mark Hounschell
2005-09-13 14:20     ` Tim Schmielau
2005-09-13 15:05       ` Mark Hounschell
2005-09-13 16:01         ` Tim Schmielau
2005-09-13 16:41           ` Mark Hounschell
2005-09-13 16:47           ` Mark Hounschell
2005-09-13 18:38             ` Stefan Smietanowski
2005-09-13 19:17               ` Mark Hounschell
2005-09-13 23:19                 ` Daniel Barkalow
2005-09-13 17:34         ` john stultz
2005-09-13 19:15           ` Mark Hounschell
2005-09-14  4:15           ` George Anzinger
2005-09-13 20:13   ` jdow
2005-09-13 20:38     ` linux-os (Dick Johnson)
2005-09-15  1:29       ` Lee Revell [this message]
2005-09-13 14:07 ` Tim Schmielau
2005-09-14  4:00 ` Coywolf Qi Hunt
2005-09-15  1:20   ` Lee Revell
2005-09-15 16:16     ` Joe Bob Spamtest
2005-09-15 20:19       ` Valdis.Kletnieks
2005-09-15 20:34         ` Jesper Juhl

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=1126747789.13893.118.camel@mindpipe \
    --to=rlrevell@joe-job.com \
    --cc=jdow@earthlink.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=markh@compro.net \
    /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