Subject: Re: Audio recording through the microphone
To: None <netbsd-users@netbsd.org>
From: Alan Post <apost@recalcitrant.org>
List: netbsd-users
Date: 10/08/2004 21:08:58
In article <20041008210936.13478621.jmmv@menta.net>, Julio M. Merino Vidal wrote:
> 
> Then I used mixerctl to change several variables: inputs.mic=255,
> inputs.mic.mute=off, inputs.mic.preamp=on, record.source=mic,
> record.volume=192,192, record.volume.mute=off.  After this, if I talk to

inputs.mic sets the level which is used for output, not for recording.

The recording levels are handled by record.*

> So I tried it the simplest way: cat /dev/audio >/tmp/test.au.  Again,
> the same noise!

The test program I've used in the past is audiorecord, though it does
something very similar to the above:  open /dev/audio, a few ioctl
calls, then read.

> May it be a bug in the driver?

Sounds possible to me.  Are you sure you're plugging the microphone
into the mic jack, rather than a "line in" jack or something?

I've successfully recorded using auich(4) and eap(4) to use my voip
program (http://recalcitrant.org/computing/voudp/).  Note that a
SoundBlaster PCI card supported by eap(4) is very cheap these days.

Here's one for $20:
  http://centralcomputer.com/itemdetail.asp?item=CDDCL-SB128S

> PS: The final goal is to get Skype working.

If you can get low-latency audio working on NetBSD without using mmap,
I'd love to hear how.  Many of the audio drivers (for instance,
uaudio(4)) do not implement mmap.  And recording via mmap is not
supported at all, unless you patch audio.c, as in PR 6827:

  http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=6827

My general feeling is that not many people use NetBSD for low-latency
audio.

  Alan