[nas] segfault on amd64

Jon Trulson jon at radscan.com
Thu Dec 30 13:42:01 MST 2004


On Thu, 30 Dec 2004, David Liontooth wrote:

> Steve McIntyre wrote:
>
[...]
> What confuses me is that the default configuration file,
> /etc/nas/nasd.conf, defines both an input and an output
> device point, as if you needed two soundcards to use nas,
> and the purpose of nas was to pipe sound from one to
> the other.
>

 	Hello David,

 	The config file allows you to specify the characteristics of your 
input and output hardware devices (number of channels, sample size, etc.).

 	When the blurb on the website says 'NAS is the audio equivalent of 
an Xserver' it means just that.

 	In X, you typically fire up an Xserver, and then connect clients 
to it.  That exactly what NAS does.  You run the nasd server on the 
machine with the actual audio hardware, and connect clients to it for 
playing audio.

> What I want to do is to use alsaplayer -nas on box A and
> play the sound on box B -- wouldn't this be the typical
> usage?
>

 	Yes, this is the typical usage.  I have no experience with 
alsaplayer - I primarily use xmms, mplayer and festival with NAS.  I have 
one box with a sound card and where the nasd server runs.  Other machines 
on the network play their sounds on the box via NAS.

> The instructions are unusually cryptic.  I followed the only
> ones I could find:
>
> $  nasd -aa &        # -aa allows any host access
> $  export AUDIOSERVER="`hostname`:0"
> $  auinfo

 	In X equivalent, it would be like:

 	X -ac &
 	export DISPLAY=:0
 	xdpyinfo &

 	I guess the instructions assume familiarity with X11.

>
>   Number of Devices:      3

 	This is good.  One stereo input device (line-in/mic probably) and 
2 outut devices (one mono, one stereo).


> I try aupanel too and now it opens, showing input mode
> Line-in (selected) and Microphone, but Output mode grayed
> out. What is this with needing both an input and an output device?

 	Most sound cards have both in input and output capability.

> Are the three "Devices" seen by auinfo relevant to this question?

 	Not really.  The 'Output Devices' you see in aupanel relate to the 
physical output devices available/selectable in NAS.  This app allows you 
to set the various gains associated with those devices.

> Can I define, say, the third device "Mono Channel Output", as
> the output device in /etc/nas/nasd.conf? How? If so, why is there
> no stereo output device available?
>

 	According to auinfo above, a stereo device is available (as well 
as an additional mono device).  The NAS application is responsible for 
choosing the appropriate device from the available ones.  I would be 
stunned if alsaplayer were not requesting a stereo output device as a 
matter of course :)

> I issue "nmap silver" and get "8000/tcp open  http-alt", so the
> sound is now being piped to port 8000 (if there is any sound).
>

 	8000 is the default port for nas for server :0.  8001 = :1, etc - 
like X11 which starts at port 6000.

> Then on silver, I try to start alsaplayer so that it plays to
> nas rather than to the speakers:
>

 	Try something simpler first:

 	export AUDIOSERVER=<machine where nas is running>:0
 	auplay <some random .wav file>

 	If you hear it, then you know NAS is probably functioning 
properly.

>   # alsaplayer -o nas
>   NAS server not available

 	I do not know enough about alsaplayer to hazard a guess as to this 
problem.  Was AUDIOSERVER set properly?  does auplay work?

> What puzzles me the most is the configuration file -- why the
> two default device nodes, /dev/dsp0 for input and /dev/dsp1 for output?
>

 	You should be able to just use the default setup in that file, 
which works for standard OSS systems (or ALSA with oss compatibility).

 	Each section in that file simply specifies the limits for the 
output and input _hardware_ devices that NAS will attempt to manage.

> How should this be configured in my situation? The sound card is
> an Audigy2 Value with the new (modified) emu10k1 driver in ALSA CVS.
>

 	Use the default that came with your NAS.  Try the auplay test 
above so we can see if the culprit is NAS, or something fishy with the 
alsaplayer plugin.


> PS the documentation is truly atrocious for such an important project!
> Is there a HOWTO somewhere?  The web page referrs to a ten-year old talk:

 	I do accept patches for documentation as well as code :)

 	If you have suggestions as to what kind of documentation should be 
provided let me know.

>
> "Look at the file doc/xcon94paper.ps (Postscript)
> <http://www.radscan.com/nas/docs/xcon94paper.ps> in the source
> distribution for a paper on the Network Audio System."

 	This is part of the original docs for NAS.
>
> But it turns out to be a list of references, a bibliography of
> unavailable papers, not a paper.

 	Did you read any further?  The original postscript (I have never 
had the 'src' for the actual document(s)) is screwed up - the pages are in 
reverse order (look at the page numbers).  There are pdf versions 
available (with the same problem) as well.  Start at the bottom of the 
document and page upwards, or print it and reorganize as you see fit.  (I 
suspect it was formatted this way for printing purposes.)  Since I don't 
have the 'src' for these documents, I would need to redo them from 
scratch to fix this.

 	http://radscan.com/nas/nas-links.html

 	The 'NAS Documentation (supplied with the source distribution)' 
section has links to the pdf versions.

> This document, along with a slide presentation, is also bundled in the
> Debian package,
> the first just a bibliography and the slides a single first slide
> (according to kghostview).
>

 	I think you may be having issues with ghostview then (or the PS is 
so old gs doesn't know what to do with it)... Try the pdf links at the 
above page, there are 18 slides in xcon94slide.  The pdfs were made by 
ps2pdf.

> The man pages are decent but they assume you already know how to use the
> program.
>

 	So you think some kind of overview document needs to be present? 
What technical level?

-- 
Jon Trulson    mailto:jon at radscan.com
ID: 1A9A2B09, FP: C23F328A721264E7 B6188192EC733962
PGP keys at http://radscan.com/~jon/PGPKeys.txt
#include <std/disclaimer.h>
"I am Nomad." -Nomad




More information about the Nas mailing list