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

Jon Trulson jon at radscan.com
Thu Jul 20 18:06:41 MDT 2006


On Thu, 20 Jul 2006, Erik Auerswald wrote:

> Hi,
>
> 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.
>>
>>         I guess I'm not sure I follow... I haven't played with
>>         recording in NAS since I first tried NAS out so many years ago
>>         :)
>>
>>         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?

>>         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.
         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.

> 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.
>

         Ok, so then

         ioctl(mixerfd, MIXER_WRITE(SOUND_MIXER_MIC), &inputAttenuation);

         is not the right way on your hardware so set the MIC's input
         gain?  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 am looking for some configurable way to add IGain/recording input
> selection to the server without breaking the old way for systems where
> it works right now. And I don't yet know how to actually set the IGain
> value and how to select the recording source.
>
> Erik
>

-- 
Jon Trulson
mailto:jon at radscan.com http://radscan.com/~jon
#include <std/disclaimer.h>
"No Kill I" -Horta




More information about the Nas mailing list