[nas] [PATCH] changed method of setting the input gain
Erik Auerswald
auerswal at unix-ag.uni-kl.de
Mon Jul 24 20:18:30 MDT 2006
Hi,
I've read this mail after the others referring to a list of MixerInit
values... the joys of a threaded mail client. ;-)
On Mon, Jul 24, 2006 at 06:41:09PM -0600, Jon Trulson wrote:
> On Mon, 24 Jul 2006, Erik Auerswald wrote:
> >On Sun, Jul 23, 2006 at 10:29:07PM -0600, Jon Trulson wrote:
> >>On Mon, 24 Jul 2006, Erik Auerswald wrote:
> >>>
> [...]
> >> Hmm... It should setup default gains and recsrc if mixerinit
> >> is true.
> >
> >That's my opinion as well.
>
> But you believe it should only ever do this _once_?
I do so.
> >> It should probaby setup these defaults every time it
> >> opens the device, shouldn't it?
> >
> >I don't think so. The defaults should be applied the first time the
> >device is opened. After that the last set values should be activated
> >(what is done now to keep the changes made while the device was
> >released).
> >
>
> Right now, the default gains and linemode are set the
> first time createServerComponents() is called.
>
> Then, the behavior you prefer is actually the way it
> should be working now... As long as it's a NAS app doing the
> changing (volume, etc), these settings will be remembered
> across open/close.
>
> If a non-NAS aware app (say... xmms) accesses the device
> directly, then NAS will reset the specified default values the
> next time it opens the device.
Right now NAS will restore the last NAS settings.
> It seems to me, that this is the behavior that you do not
> like?
I prefer the way it is now (ignoring the initialization part for this
statement). I would not want NAS to revert the changes I made to the NAS
settings.
> Hehe, I actually like this behaviour... I'd even prefer one
> further and have NAS reset to the defaults on every server
> iteration (essentially whenever NAS opens the device), not
> caring about what previous NAS client did, in case some
> nas/non-nas set the volume to low for me to hear what
> 'festival' is telling me :)
In this case I'd say use auctl just before festival to set the right
gain for festival.
> So, right now MixerInit simply sets/doesnotset the RECSRC.
> Perhaps this needs to be expanded:
And the RECSRC should be controllable via NAS even if MixerInit is set
to "no" IMHO.
> Assuming I were to make MixerInit handle an integers well as
> a bool:
>
> 0 = do not modify mixer characteristics at startup at all.
> Use whatever is there.
I've sent a patch to the list to do just that when MixerInit is "no". We
could continue work on this and implement the other modes as well.
> 1 = setup all default gains/recording options the
> first time NAS is started, and never again thereafter.
>
> 2 = setup all default gains/recording options everytime the
> device is opened (actually, every server 'generation' so
> it would work even if releasedevice == no). This would of
> course ignore any of the last* settings.
>
> If MixerInit is "yes", this would be equivalent to '1' above.
> If "no", then '0', above (for compatibility).
>
> The default would be 1. Personally, I'd use '2'. :)
>
> Would this cover all the bases?
This would be fine with me.
Erik
More information about the Nas
mailing list