[nas] [PATCH] consistent gain setting in voxware server
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Fri Jul 21 10:32:25 MDT 2006
Hi,
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:
> >>>- On my system the wrong mixer parts are affected, i.e. the value of
> >>>patching the line or mic input to output, but not the value used for
> >>>recording (called 'IGain' by aumix). Selecting the input in aupanel
> >>>(or audemo or ...) works insofar as the line resp. mic level is
> >>>controlled, but the recording input selection is not done.
> >>
> >> Looking at setPhysicalInputGainAndLineMode(), it does appear
> >> we try to set the hw gains. What also interesting is that line
> >> and mic are mutually exclusive with respect to their gain
> >> settings.
> >
> >These gain settings work on the wrong mixer parts for my hardware.
>
> hmm. so setting the mic with Igain, adjusts line in instead?
No, the NAS server sets the Line and Mic values correctly. It does not
set the IGain value at all. It does not choose the recording device. The
Line and Mic values are not used for recording.
Using a local mixer application (aumix) I can change the IGain setting
and select the recording source.
> >> Maybe if you explain the problem in more detail? I am also
> >> using OSS emulation with ALSA, but again, have not tried
> >> recording in some time, so I am not sure I understand the
> >> problem...
> >
> >There are 4 mixer settings connected to the inputs of my sound hardware:
> >
> >Line output volume of line input (not used for recording)
> >Mic output volume of microphone input (not used for
> >recording)
> >IGain input volume of selected recording input
> >record selection to choose between line and mic input for recording
> >
> >The NAS voxware server changes Line and Mic and sets one of them to 0 to
> >select the input channel. But this does not affect the recording
> >settings of my sound hardware.
>
> Yes, looking at this, it seems that you have 2 possible hw
> input devices, line and mic. One one can active at a time.
Right.
> Whatever input gain you've set is applied to the respective
> device (via OSS ioctl). See setPhysicalInputGainAndLineMode()
> in auvoxware to see where this is done.
And this does not work the way it is intended with my hw/drivers.
Presumably it did work back when it was implemented on that hw/drivers
combination.
> >On my hardware a special record selection has to be used and the IGain
> >value modified. This is not done by the NAS voxware server.
>
> ioctl(mixerfd, MIXER_WRITE(SOUND_MIXER_MIC), &inputAttenuation);
>
> is not the right way on your hardware so set the MIC's input
> gain?
Indeed, that does not change the input gain (IGain) on my hardware.
> What does this do on your hw? (one way to see is to
> run something like alsomixer[gui] and see what volumes/gains
> are adjusted) when you do various things.
I used aumix (http://jpj.net/~trevor/aumix.html) to do this...
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.
Erik
More information about the Nas
mailing list