[nas] isolate input/output?
Jon Trulson
jon at radscan.com
Mon Mar 12 22:44:42 MDT 2007
On Mon, 12 Mar 2007, Paul Fox wrote:
> erik wrote:
> > On Sun, Mar 11, 2007 at 01:33:33PM -0400, Paul Fox wrote:
> > > i'll let you know how it goes.
> >
> > Thanks, I'd really like to know if this works.
>
> success! at least, lircd and nasd are running together.
>
> the last (tiny) hurdle was that i'd never noticed the "readwrite"
> parameter in nasd.conf. as distributed, it's set to "no" for
> input devices, and "yes" for output devices. changing the output
> device's value to "no" makes "cat /dev/dsp >/dev/null" succeed
> while nasd is running, where it gave EBUSY before. and, as i
> said, lircd no longer fails to open the device either.
>
> anyone have any thoughts on why the defaults for the open() mode
> are the way they are? they're as i wrote above in the config
> file (i.e., different for input and output). worse, in the code,
> both devices are opened O_RDWR unless specified otherwise via the
> config. i'm not sure i can imagine why one wouldn't default to
> O_RDONLY for input, and O_WRONLY for output. (i note that this
> is the case for CYGWIN.) at the very least, i think we should
> change the default nasd.conf values (which come from
> nasd.conf.eg, i assume).
>
<grumpyoldman>
Because in the old days sonny, we used to open full-duplex
audio devices read/write for no particular reason, and we
LIKED IT!
</grumpyoldman>
:)
I guess if you've never seen the grumpy old man on SNL, the
above reference will be meaningless, sorry.
Since we deal with input and output using seperate fd's, I
can't really think of a good reason why we cannot simply
always open output devices write-only and input devices read-only.
I tried it hear, and it seems to work fine, at least for my
basic output-only duties. I am using an SB PCI (basic). I do
not recording via NAS.
Think it's a safe default?
> erik -- thanks for all your help. jon -- i'd go ahead and apply
> the patches from my and erik's mail. they're no worse than
> what we had before, and almost certainly better. :-)
It is done.
--
Jon Trulson
mailto:jon at radscan.com
#include <std/disclaimer.h>
"No Kill I" -Horta
More information about the Nas
mailing list