[nas] isolate input/output?

Jon Trulson jon at radscan.com
Tue Mar 13 10:19:41 MDT 2007


On Tue, 13 Mar 2007, Paul Fox wrote:

> jon wrote:
> >          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?
>
> is there by chance an ancient changelog entry mentioning this behavior?
> probably not.
>

         Well the readwrite option was added by Philippe Jouguet in
         2001.  It seems that many full-duplex audio devices could
         handle read/write operations on a single fd.  Browsing around
         the internet though, shows that there are some buffering issues
         that can arrise, particularly with stdio operations in buggy
         libc's.

         I had always assumed that half-duplex devices were
         characterized by the inability to be open RW.  I have learned
         though that just because the underlying hardware can do FDX,
         that doesn't mean the driver itself can do this in a sane way.

         Myself, I have never seen an HDX device, though I know that
         several nas users have - which is why I think Philippe added
         this option.

> well, it seems to be okay for the cygwin port, and it makes good

   Well cygwin has a lot of issues :)

> logical sense.  as long as there's a config file mechanism to
> override, then i'd say "yes".  i'd both change the defaults in the
> code, and change the default config file to match.  and i'd put a
> note in the code somewhere noting that we're not sure why its
> necessary to be able to open readwrite -- just so the lucky
> volunteer who decides it's time to add direct alsa support
> doesn't feel they absolutely have to implement it.
>

         To be honest, I cannot think of a reason why it would be
         'neccessary' to open read/write, unless the driver was just
         stupid.

         I'm happy to make this change if there are no objections.

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




More information about the Nas mailing list