[nas] segfault on amd64

David Liontooth liontooth at cogweb.net
Thu Dec 30 12:21:51 MST 2004


Steve McIntyre wrote:

>On Mon, Dec 27, 2004 at 12:48:28PM -0800, David Liontooth wrote:
>  
>
>>On an amd64 running Debian sid and nas 1.7, I get a segfault:
>>    
>>
>
>Hmmm. Do you mean sid, or do you mean amd pure64 from Alioth?
>  
>
>Which version? Feel free to post a bug in the Debian BTS and I'll take
>a look. A core dump would be useful too - use "ulimit -c unlimited"
>before you start.
>  
>
Hi Steve,

Thanks. Your 1.7-2 update fixes the segfault on amd pure64
from Alioth. Perhaps you could help me out with one more
step: how do I get this to work?

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.

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?

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

This takes me part of the way -- it looks like things are
basically working:

    # nasd -aa &
    [1] 8488
    root at silver:~# config: Maxfrags set to 3
    config: Minfrags set to 2
    config: Fragsize set to 256
    config: Maxfrags set to 3
    config: Minfrags set to 2
    config: Fragsize set to 256
    @(#)Network Audio System Release 1.7
    @(#)Network Audio System Release 1.7
    AuInitPhysicalDevices();
    Init: will close device when finished with stream.
    Init: Leaving the mixer device options alone at startup.
    openDevice OUT /dev/dsp mode 2
    openDevice(1) IN /dev/dsp1 mode 0
    Input open(/dev/dsp1) failed: No such device, using output device
    setupSoundcard(...);
    ++ Setting up Output device (/dev/dsp)
    +++ requesting wordsize of 16, got 16
    +++ requesting 2 channel(s), got 2 channel(s)
    +++ Requesting minimum sample rate of 5000, got 5000
    +++ Requesting maximum sample rate of 44100, got 44100
    setTimer(rate = 0);
    createServerComponents(...);
    closeDevice: out
    closeDevice OUT /dev/dsp mode 2
    closeDevice: mixer

    #export AUDIOSERVER=silver:0

    # auinfo
    Audio Server:           tcp/silver:8000
    Version Number:         2.2
    Vendor:                 Network Audio System Release 1.7 - VoxWare
    Vendor Release:         1
    Min Sample Rate:        5000
    Max Sample Rate:        44100
    Max Tracks:             32
    Number of Formats:      7
    Formats:                ULAW8  LinearUnsigned8  LinearSigned8
                            LinearSigned16MSB  LinearUnsigned16MSB
                            LinearSigned16LSB  LinearUnsigned16LSB
    Number of Elem Types:   12
    Element Types:          ImportClient  ImportDevice  ImportBucket
                            ImportWaveForm  Bundle  MultiplyConstant
    AddConstant
                            Sum  ExportClient  ExportDevice  ExportBucket
                            ExportMonitor
    Number of Wave Forms:   2
    Wave Forms:             Square  Sine
    Number of Actions:      3
    Actions:                ChangeState  SendNotify  Noop
    Number of Devices:      3
        Device 0:
            Changable:      Gain  LineMode
            ID:             0x23
            Kind:           PhysicalInput
            Use:            Import
            Format:         LinearUnsigned8
            Num Tracks:     2
            Access:         Import  List
            Description:    "Stereo Channel Input"
            Min Rate:       5000
            Max Rate:       44100
            Location:       Left  Right  External
            Gain Percent:   50
            Num Children:   0
        Device 1:
            Changable:      Gain
            ID:             0x22
            Kind:           PhysicalOutput
            Use:            Export
            Format:         LinearSigned16LSB
            Num Tracks:     2
            Access:         Export  List
            Description:    "Stereo Channel Output"
            Min Rate:       5000
            Max Rate:       44100
            Location:       Center  Internal
            Gain Percent:   50
            Num Children:   1
            Children:       0x21
        Device 2:
            Changable:      Gain
            ID:             0x21
            Kind:           PhysicalOutput
            Use:            Export
            Format:         LinearSigned16LSB
            Num Tracks:     1
            Access:         Export  List
            Description:    "Mono Channel Output"
            Min Rate:       5000
            Max Rate:       44100
            Location:       Center  Internal
            Gain Percent:   50
            Num Children:   0
    Number of Buckets:      0
    root at silver:~# serverReset();
    setTimer(rate = 0);
    closeDevice: out
    closeDevice: output device already closed
    closeDevice: mixer
    closeDevice: mixerdevice already closed
     done.
    AuInitPhysicalDevices();
    Init: will close device when finished with stream.
    Init: Leaving the mixer device options alone at startup.
    setTimer(rate = 0);
    createServerComponents(...);

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?
Are the three "Devices" seen by auinfo relevant to this question?
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?

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).

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

    # alsaplayer -o nas
    NAS server not available
    Failed to initialize plugin!
    Failed to register plugin: /usr/lib/alsaplayer/output/libnas_out.so
    Failed to load output plugin "nas". Trying defaults.

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

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

Cheers,
Dave


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:

"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."

But it turns out to be a list of references, a bibliography of
unavailable papers, not a paper.
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).

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








More information about the Nas mailing list