Chuckk Hubbard on 3 Oct 2007 17:06:40 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Soundcards ...

  • From: "Chuckk Hubbard" <badmuthahubbard@gmail.com>
  • To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
  • Subject: Re: [PLUG] Soundcards ...
  • Date: Wed, 3 Oct 2007 20:06:31 +0300
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=7RkWuEQcaabxy07zZTFixS+Hwc1vFvi128YhAULbpzk=; b=LqSJvJFymCGnKVhrer2a2ZO92mEnBsfP1Rq1fqSzvgzfghDCFw+fnNnzLLjjZAlAWeFxMCVjzha2Etp4HUwg7ItjuisGKSNaGVOJH/79/qA2LjUgjOP+zFHaFxEhOZEWx3a/UQQCorzcta6u9zAlkdghV3pu+Pka7zSXu7lYCUg=
  • Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
  • Sender: plug-bounces@lists.phillylinux.org

Creative is usually well-supported, due to being in so many machines.  There are packages in Debian's repositories that are just for Creative soundcards.

There are a couple of important things to configure for good audio on Linux.  I suggest the archives of the JACK mailing list (search my name to find all possible issues!....), and the linux-audio-users list/site/IRC channel.
It's important to check your IRQs; cat /proc/interrupts is the command I use.  When you find your soundcard there, remember the IRQ-?? number.  If you have multiple slots available, even better: try the card in each and see where it gets the *lowest* number after IRQ-?? when you run "cat /proc/interrupts".  The hardware with the lowest numbers here gets priority.

It's a good idea to get Ingo Molnar's realtime preemption patch.  There's a lot of confusing info on this online, since various methods for getting low-latency have come and gone, but the Molnar patch for whatever kernel you run is a sure thing today.  Unfortunately, this means compiling your own kernel (unfortunately if you haven't done this before, not a big deal if you have).
Kernel source:
http://www.kernel.org/
Molnar:
http://www.kernel.org/pub/linux/kernel/projects/rt/

It might help to turn off whatever power control or ACPI you don't need when configuring the realtime kernel.  I typically have the button, battery, suspend, and ac adapter stuff turned off (I have several kernels to choose from, depending on whether I'm running audio).  I DO NOT recommend turning off processor/thermal or fan control!  AFAIK that means your machine will overheat pretty quickly and, you know, steam and pop and fuse inside.  So tread carefully with kernel power control options.

Also, essential especially for MIDI is to set the kernel timer resolution to 1000 Hz.  That may be enough alone to set you up for MIDI, and presents no explosive risks.

For real-time audio, I use JACK; this I run from a script.  First, I query for the pid of the IRQ my soundcard is on, and set its priority to 70 with chrt.  Then I run jackd with priority slightly less, and realtime on.  Then I run whatever audio I want to use, usually Rosegarden and/or Csound, with slightly lower priority than that.  Basically this means whatever your soundcard is trying to do will come before almost anything else your comp does; then whatever JACK does; then whatever is going into JACK; then everything else, like mouse movements or CD burning or email checking.
At least this is my understanding.  I'm afraid I'm writing this from Windows, so I don't have all the details at hand.
Do you already have a realtime-kernel?

The topics you'd want to read about to do it the way I do are:
chrt
IRQ/interrupts
kernel patching and compiling
JACK Audio Connection Kit
and the basics of shell scripting, if you want to automate it all.

Good luck.
-Chuckk

On 10/2/07, rmsolino <rmsolino@netaxs.com> wrote:
I found a box of old soundcards, mostly Creative.
Which ones are the most useful?
(for MIDI especially, I'd like low-latency playback)
I've never had a lot of luck with audio/Linux ...
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



--
http://www.badmuthahubbard.com
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug