[prev in list] [next in list] [prev in thread] [next in thread]
List: nas
Subject: Re: [nas] isolate input/output?
From: Jon Trulson <jon () radscan ! com>
Date: 2007-03-14 3:39:45
Message-ID: Pine.LNX.4.61.0703132138280.20321 () m5 ! radscan ! com
[Download RAW message or body]
On Wed, 14 Mar 2007, Erik Auerswald wrote:
> Hi,
>
> On Tue, Mar 13, 2007 at 10:19:41AM -0600, Jon Trulson wrote:
>> On Tue, 13 Mar 2007, Paul Fox wrote:
>>
>>> 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.
>
> With my hardware there is no difference if the output is opened rw or
> ro, nasd works full-duplex. I'd say go ahead and make the change.
>
Excellent, change committed and patch attached FYI.
--
Jon Trulson
mailto:jon@radscan.com
#include <std/disclaimer.h>
"No Kill I" -Horta
["nas-readwrite-default.patch" (TEXT/x-diff)]
Index: HISTORY
===================================================================
--- HISTORY (revision 233)
+++ HISTORY (working copy)
@@ -2,6 +2,17 @@
??? 3/12/2007
+ - set the default open modes for the output audio device to
+ write-only, and for the input device, use read-only (already the
+ default).
+
+ These can still be changed in the nasd.conf file, if needed.
+
+ Previously, the default was to open the output device
+ read-write, causing various issues with different
+ hardware/driver configurations. There is no need to open this
+ device read-write anyway.
+
- apply patch from Paul Fox, correcting a typo in auvoxware.c
- apply patch from Erik Auerswald
Index: server/nasd.conf.eg
===================================================================
--- server/nasd.conf.eg (revision 233)
+++ server/nasd.conf.eg (working copy)
@@ -57,7 +57,7 @@
forcerate "no" # forces input rate to current
autoOpen "yes" # whether to open the dev
# at init
- readwrite "no" # open read only if "no"
+ readwrite "no" # open 'device' read/write?
end
# These are used by voxware only for now.
@@ -75,7 +75,7 @@
forcerate "no" # forces output rate to current
autoOpen "yes" # whether to open the dev
# at init
- readwrite "yes" # open write only if "no"
+ readwrite "no" # open 'device' read/write?
end
#
Index: server/nasd.conf.man
===================================================================
--- server/nasd.conf.man (revision 233)
+++ server/nasd.conf.man (working copy)
@@ -116,9 +116,9 @@
Whether to open the device at init time (if ReleaseDevice = no). The default is "yes".
.PP
.B readwrite "no"|"yes"
-Whether or not to open the device read/write. The default is "yes".
-If set to "no", then for input devices, the device will be opened
-readonly, and for output devices, the the device will be opened writeonly.
+Whether or not to open the device read\-write. The default is "no".
+If set to "yes", then the device will be opened read\-write. There
+should be no need to set this to "yes", but...
.SH "SEE ALSO"
nas(1), nasd(1), auinfo(1), auplay(1), auctl(1)
.SH BUGS
Index: server/dda/voxware/auvoxware.c
===================================================================
--- server/dda/voxware/auvoxware.c (revision 233)
+++ server/dda/voxware/auvoxware.c (working copy)
@@ -251,39 +251,33 @@
32, /* maxFrags */
"/dev/dsp1", /* device */
"/dev/mixer1", /* mixer */
-#if defined(__CYGWIN__)
O_RDONLY, /* howToOpen */
-#else
- O_RDWR, /* howToOpen */
-#endif
1, /* autoOpen */
0, /* forceRate */
0, /* isPCSpeaker */
50, /* default gain */
100 /* gain reduction factor */
-}, sndStatOut = {
+};
+SndStat sndStatOut = {
+
-1, /* fd */
- 16, /* wordSize */
- 1, /* isStereo */
- 0, /* curSampleRate */
- 4000, /* minSampleRate */
- 44100, /* maxSampleRate */
- 256, /* fragSize */
- 3, /* minFrags */
- 32, /* maxFrags */
- "/dev/dsp", /* device */
- "/dev/mixer", /* mixer */
-#if defined(__CYGWIN__)
- O_WRONLY, /* howToOpen */
-#else
- O_RDWR, /* howToOpen */
-#endif
- 1, /* autoOpen */
- 0, /* forceRate */
- 0, /* isPCSpeaker */
- 50, /* default gain */
- 100 /* gain reduction factor */
+ 16, /* wordSize */
+ 1, /* isStereo */
+ 0, /* curSampleRate */
+ 4000, /* minSampleRate */
+ 44100, /* maxSampleRate */
+ 256, /* fragSize */
+ 3, /* minFrags */
+ 32, /* maxFrags */
+ "/dev/dsp", /* device */
+ "/dev/mixer", /* mixer */
+ O_WRONLY, /* howToOpen */
+ 1, /* autoOpen */
+ 0, /* forceRate */
+ 0, /* isPCSpeaker */
+ 50, /* default gain */
+ 100 /* gain reduction factor */
};
#define auDefaultInputGain AuFixedPointFromSum(sndStatIn.gain, 0)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic