From alsa-devel-owner@alsa.jcu.cz  Thu Dec 31 15:07:00 1998
Received: from nic.funet.fi (nic.funet.fi [128.214.248.6])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id PAA01898
	for <alsa-devel@alsa.jcu.cz>; Thu, 31 Dec 1998 15:05:09 +0100
Received: from localhost (user: 'kouhia', uid#241) by nic.funet.fi id <1501-2281>; Thu, 31 Dec 1998 16:04:32 +0200
From: Juhana K Kouhia <kouhia@nic.funet.fi>
To: alsa-devel@alsa.jcu.cz, linux-audio-dev@ginette.musique.umontreal.ca
Subject: My audio recording problems
Message-Id: <19981231140434Z1501-2281+1068@nic.funet.fi>
Date: 	Thu, 31 Dec 1998 16:04:32 +0200
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Hi there. I just joined to these alsa-devel and linux-audio-dev lists.

I have problems in recording 44100 Hz, stereo, 16 bits audio to disk.
Because I feel I have now done everything what I can do, I would
like to ask your help on this. I even believe the problem is in Linux
kernel.

Please read the story from "http://www.funet.fi/~kouhia/recprob.html"
and download my two process  shmrec  recording program. It uses OSS/free
drivers but I plan to add ALSA support (directly or via PSL).

I greatly apologize for giving you a link to a web page explaning
the problem. You may feel that giving a link is rude.

But here I would like to say more about the shmrec: my original motivation
for the two process recording program was that I think the traditional
read()/write() loop recording is not optimal. Because reading from A/D
and writing to disk are totally different kind of tasks, the recording
should not be done with the same buffer size used in both the read() and
the write(). My intuition says that the disk buffer should be larger than
the A/D buffer. Of course, Linux has a disk buffer but my shmrec is not
relying on its flush times. I'm forcing the flush more often because
I think Linux is delaying the saving for too long time and thus causing
a load peak which is freezing the recording process itself.

You may not have the problems I have (because you may have a SCSI disk
instead of IDE disk) but the more efficient two process recording may help
you when you decide to simultaneously record more channels than just two.

I'm in Audiotechque project and lurking in various other projects.
I'm also writing my own audio software --- so far merely trying to produce
components to be used in any free audio software. I plan to extend
and improve the shmrec myself and hope no dublicate work is done.

Yours,

Juhana

