Re: "Noise" in Sound Output

C. Scott Ananian (cananian@lcs.mit.edu)
Sun, 17 May 1998 20:12:44 -0400 (EDT)


On Sun, 17 May 1998 Joe Pranevich <joepran@telerama.lm.com> wrote:

> I have an ESS 1688 AudioDrive [...]
[...]
> When playing sound [...] I get a buzzing/clicking type noise in
> the speaker. These noises seem to happen when a screen update happens,
> but it's hard to tell. I'm pretty sure I hear the clicks with keypresses
> (or is it the key appearing on the terminal?) and a buzzing with the
> moving of the mouse. Heck, I could even swear I heard it when the
> harddrive is doing its thing.

You've got an internal microphone on your machine, and the sound driver by
default sets it's volume non-zero. So you *are* hearing your keypresses,
disk activity, mouse movement, etc... picked up by the mic and amplified
for your listening pleasure. You've probably got a laptop with "built-in
audio." That's my guess, at least; that's what my mysterious noises were.

The following program executed in one of your startup scripts will solve
all your problems:

----------- begin file mutemic.c -------------
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <linux/soundcard.h>

int main(int argc, char **argv) {
int n = 0;
int mixer = open("/dev/mixer", O_RDWR);
if (!(mixer<0)) {
ioctl(mixer, SOUND_MIXER_WRITE_MIC, &n);
close(mixer);
return 0;
} else return 1;
}
------------- end file mutemic.c --------------------
--Scott
@ @
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-oOO-(_)-OOo-=-=-=-=-=
C. Scott Ananian: cananian@lcs.mit.edu / Declare the Truth boldly and
Laboratory for Computer Science/Crypto / without hindrance.
Massachusetts Institute of Technology /META-PARRESIAS AKOLUTOS:Acts 28:31
-.-. .-.. .. ..-. ..-. --- .-. -.. ... -.-. --- - - .- -. .- -. .. .- -.
PGP key available via finger and from http://www.pdos.lcs.mit.edu/~cananian

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu