Stuart Levy slevy at ncsa.uiuc.edu
Wed Oct 11 15:30:47 CDT 2000

I think George has sent (is sending?) /dev/sndstat etc. output.

But just look at /usr/src/linux/drivers/sound/es1371.c and you'll see what I mean.
It says, e.g. around line 1480:

              /* SOUND_MIXER_RECLEV and SOUND_MIXER_IGAIN specify gain */
        case SOUND_MIXER_RECLEV:
		[[[ bunch of stuff involving wrcodec( ... ) ]]]
                wrcodec(s, AC97_RECORD_GAIN, (((l1 - 10) / 6) << 8) | ((r1 - 10) / 6));
                return 0;

        case SOUND_MIXER_IGAIN:
                if (!(s->mix.codec_id & CODEC_ID_DEDICATEDMIC))
                        return -EINVAL;
                wrcodec(s, AC97_RECORD_GAIN_MIC, (l1 < 10) ? AC97_MUTE : ((l1 - 10) / 6) & 0xf);
                return 0;

Apparently on our cards, codec_id & CODEC_ID_DEDICATEDMIC (which it seems to read from the
hardware) is false, hence the EINVAL.  Otherwise it treats IGAIN and RECLEV pretty similarly.
And when we adjust the field called "Rec" in aumix, we get the desired effect.

(es1371.c is relevant since it's the driver that gets used if we *don't* use the
OSS-non-free drivers.  And it seems to work, except for rat adjusting the loopback Line
control rather than the desired Rec one.  I.e. if we adjust levels manually with aumix,
we hear normal sound.)


I'm trying to build a hacked es1371.o which interprets IGAIN as the same as RECLEV
if there's no DEDICATEDMIC.  If I can just manage to build a kernel module that the
red hat versioning system considers to be compatible with its own ... !:@*

More information about the ag-tech mailing list