Date: Thu, 27 Apr 2006 23:28:54 -1000 From: Stephen Bartlett <stephen@bartlettsoftware.biz> To: freebsd-multimedia@freebsd.org Subject: re: Problems recording sound in FreeBSD 5.1 (now 6.0) Message-ID: <1146216534.797.18.camel@tux> In-Reply-To: 3F131802.9040301@ludd.luth.se
next in thread | raw e-mail | index | archive | help
--=-TuJech1/N5nltWSfYmsn Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I just installed FreeBSD 6.0-RELEASE on my laptop. I was bummed that the microphone seemed inoperative because I really wanted to use Skype (especially after having gotten it running). I Googled around and found the solution in a 2003 message from Stuart Barkley: On Mon Jul 14 22:36:57 PDT 2003, Stuart Barkley wrote: [snip] > Two other things come to mind for AC97 recording: >=20 > - 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). This seemed like just the ticket, as I have the AC97 chipset: # cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <Intel ICH4 (82801DB)> at io 0x1c00, 0x18c0 irq 17 bufsz 16384 (1p/1= r/0v channels duplex default) Well, I figured out the code enough to apply that patch to the newer source, and voila -- microphone now works great in gnome-sound-recorder and in Skype. Yay. Patch is below. Notice that it's in a different location in the file. - Stephen --=20 Stephen Bartlett President, Bartlett Software, Inc. http://www.bartlettsoftware.biz/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (in /sys/dev/sound/pcm/ ) *** ac97.c.orig Sun Apr 10 04:45:27 2005 --- ac97.c Thu Apr 27 22:37:17 2006 *************** *** 455,460 **** --- 455,466 ---- int cur =3D ac97_rdcd(codec, e->reg); val |=3D cur & ~(mask); } + /* stuartb: Enable 20dB mic channel gain boost */ + /* TODO: Add ioctl or something else to control this */ + /* Do ALL AC97 chips support this? */ + if (channel =3D=3D SOUND_MIXER_MIC) + val |=3D 0x40; +=20 ac97_wrcd(codec, reg, val); snd_mtxunlock(codec->lock); return left | (right << 8); --=-TuJech1/N5nltWSfYmsn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBEUeBWR7d3GIt7UjgRAsg+AJ9J65AtQdhpPeUbQi3uoZfLMkjj7wCgj/KR Ttj3dzGwDeXWPtIYtG2BmXA= =JOe7 -----END PGP SIGNATURE----- --=-TuJech1/N5nltWSfYmsn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1146216534.797.18.camel>