[nas] [PATCH] consistent gain setting in voxware server

Erik Auerswald auerswal at unix-ag.uni-kl.de
Sat Jul 22 01:46:08 MDT 2006


Hi,

On Fri, Jul 21, 2006 at 09:16:43PM -0600, Jon Trulson wrote:
> On Fri, 21 Jul 2006, Erik Auerswald wrote:
> >On Thu, Jul 20, 2006 at 06:06:41PM -0600, Jon Trulson wrote:
> >>On Thu, 20 Jul 2006, Erik Auerswald wrote:
> >>>On Wed, Jul 19, 2006 at 11:08:11PM -0600, Jon Trulson wrote:
> >>>>On Thu, 20 Jul 2006, Erik Auerswald wrote:
> 
>         Right, I *think* I see your issue now (hard without trying it
>         myself :).  I think we should first look at
>         igain/reclev... Then worry about device selection afterward.

Well, I've got this sorted out for my device, using SOUND_MIXER_IGAIN
and SOUND_MIXER_RECSRC. :-)

>         Apparently when this code was first written (for GUS hw?) this
>         was not the case (ie, setting the MIXER_LINE/MIC was all that
>         was necc.).  As mentioned earlier, I do not think many people
>         have dealt with NAS recording, so it's possible this code has
>         not been really used in many years.

Which means a change to use IGAIN and RECSRC exclusively could lead to
breakage on some obscure hardware that goes undetected a long time...
:-/

>         Using strace, what ioctl's is it using (or maybe the src code
>         itself will tell :) ?  Pehaps auvoxware's mixer code needs some
>         serious updating?

The sorce code to aumix and the soundcard.h file gave the answer (in a
cryptic way I have to say) to what works with my hardware.

>         Yeah, I do not understand why this limitation/assumption is
>         there, except maybe this was all that worked at the time this
>         was originally written.

The GUS only had line and mic inputs IIRC.

>         See if your device supports MIXER_IGAIN or MIXER_RECLEV as in
>         my prev post... Maybe that is the key...

It supports SOUND_MIXER_IGAIN, I'll test SOUND_MIXER_RECLEV when I get
back to my machine.

> >The above ioctl changes the Mic level on my hw. This level is used when
> >amplifying the microphone input to the speakers. This is not used when
> >recording from the mic input. MIXER_WRITE(SOUND_MIXER_LINE) works the
> >same way with the Line value.
> 
>   Yeah, and I would think with that mode, feedback would be an issue
>   with a mic... So you want to actually *decrease* the SOUND_MIXER_MIC
>   and increase IGAIN/RECLEV if you were recording from a mic for
>   instance... ?

The currently active recording source is automatically muted regarding
the output. This might be changable (some monitor setting might exist),
but I did not try this.

Erik



More information about the Nas mailing list