[nas] isolate input/output?
Paul Fox
pgf at foxharp.boston.ma.us
Sat Mar 10 21:51:05 MST 2007
hi -- i've had a chance to try this, and now i'm confused. :-)
i'm running release 1.8a of nasd.
as a reminder, i'm trying to configure an output-only nasd. a
different application will be opening the input side of the device.
erik wrote:
> On Fri, Mar 09, 2007 at 07:15:20PM -0500, Paul Fox wrote:
> > i need to be able to tell nasd to use its normal output channels,
> > for remote access, but to leave the mic input alone, so that it
> > can be used by a local app. can i do this currently? or are the
> > inputs and outputs all tied together in the single mixer device?
>
> The input device is only opened if there is some NAS client requesting
> data from it (if ReleaseDevice is set to "yes" in the config file). This
> is independant of the input mixer settings. If MixerInit is set to "no",
> then the mixer settings will not be changed when nasd is started.
this all works correctly, i believe.
>
> Since version 1.8a the input- and output-devices can be totally
> independant, including the mixer (for the OSS NAS server).
>
> You can set the mixer in the inputsection of the config file to the
> empty string ("") to disable any input gain control for NAS. The mixer
> settings will not be changed by nasd in this case.
>
> If you set autoOpen to "no" in the input section, nasd will not even try
> to open an input device, unless some NAS client tries to read from the
> input device.
first, a typo bug in openDevice(), in auvoxware.c. however, in practice,
i don't think we ever execute this code. (i found this by inspection --
i can't make it fail.)
--- /tmp/nas-1.8a/server/dda/voxware/auvoxware.c Wed Aug 30 20:46:11 2006
+++ dda/voxware/auvoxware.c Sat Mar 10 20:33:27 2007
@@ -873,7 +873,7 @@
}
if ((inmixerfd == -1) && !share_mixer) {
- if (sndStatIn.mixer[0] != '\0') {
+ if (sndStatIn.mixer[0] == '\0') {
osLogMsg("openDevice: no input mixer device specified\n");
} else {
while ((inmixerfd = open(sndStatIn.mixer, O_RDWR | extramode,
but to get things to work, in addition to the things you said
above, i also have to set the input device to /dev/null, and it's
kind of complicate as to why. setting it to either a nonexistent
device (/dev/dsp1) or to the same device as output (/dev/dsp)
causes nasd to loop 5 times, with timeout, when trying to open
the input device. in the former case it's because the device
doesn't exist, and in the latter, i think it's because the device
is already open (for output).
note that this looping i'm referring to all happens at client
connection time, since i have autoOpen disabled. things work
better with autoOpen enabled, since in that case, failure to open
the input device initially causes the "share_in_out" flag to be
set, which suppresses later opens of the input device.
paul
=---------------------
paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 41.7 degrees)
More information about the Nas
mailing list