Date: Tue, 15 Jul 2003 01:36:52 -0400 (EDT) From: Stuart Barkley <stuartb@4gh.net> To: =?ISO-8859-1?Q?Joachim_Str=F6mbergson?= <watchman@ludd.luth.se> Cc: freebsd-multimedia@freebsd.org Subject: Re: Problems recording sound in FreeBSD 5.1 Message-ID: <20030715005046.R74615@freeman.4gh.net> In-Reply-To: <3F131802.9040301@ludd.luth.se> References: <3F131802.9040301@ludd.luth.se>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 14 Jul 2003 at 22:52 +0200, Joachim Strömbergson wrote: > Hardware wise, I've got an Asus A7V8X motherboard with built in AC97 > sound. I'm running FreeBSD 5.1 and KDE3. > > Is there ar simple way to directly verify that the mic input works? > Has anybody experienced similar problems? Anybody knows what might > be the problem? You should be able to bring up the microphone volume in the mixer and hear it in your speakers or headphones: % mixer mic 100 Setting the mixer mic to 100:100. % For recording from the microphone, I normally select the recording source with mixer and set the record level with the rec device: % mixer =rec mic mic 100 Setting the mixer mic to 100:100. Recording source: mic % As a test you can copy from /dev/audio to a file and vice-versa for playback: % cp /dev/audio test.au ^C [after several seconds of recording] % cp test.au /dev/audio % Are you sure you are going into a microphone input and not a line-in input? If you have a line-in input, are you able to record from that input when feeding it a signal from a cd player or something similar? Are you sure you are going into an input and not an output? I've seen some newer motherboards replace the line-in and microphone in jacks with output jacks for 5.1 sound systems. Two other things come to mind for AC97 recording: - AC97 specifies a control register bit which enables a 20dB microphone input gain. For the microphones I use, I seem to always need the boost. I apply the following patch (to 4.7, I'm not sure if it applies to 5.1 at all). --- ../src_dist/sys/dev/sound/pcm/ac97.c Mon Aug 26 20:25:55 2002 +++ ./sys/dev/sound/pcm/ac97.c Tue Jan 7 20:47:36 2003 @@ -332,6 +332,12 @@ int cur = rdcd(codec, e->reg); val |= cur & ~(max << e->ofs); } + /* stuartb: Enable 20dB mic channel gain boost */ + /* TODO: Add ioctl or something else to control this */ + /* Do ALL AC97 chips support this? */ + if (channel == SOUND_MIXER_MIC) + val |= 0x40; + } if (left == 0 && right == 0 && e->mute == 1) val = AC97_MUTE; - The AC97 specification also has support for an alternate mic input. I think this controls selection between a front panel and a rear panel microphone jack. You might need to set bit 0x0100 (MS) in the General Purpose Register 0x20. I have not created a patch for this function. If you have Windows XP or similar running on your system you can see these options as advanced setting on the microphone channel.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030715005046.R74615>