NAS (Network Audio System) as a kernel module?

NAS (Network Audio System) as a kernel module?

Post by Roy Batt » Thu, 29 Oct 1998 04:00:00



Hi all,

I'm using NAS (Network Audio System) to output sound from
Linux boxes to NCD X-Terminals.
The problem with NAS is, that there are only few programs
that support sound output via NAS. Most applications just
use the local /dev/audio (/dev/dsp etc.).
(I'm looking for a mp3-player that supports NAS. Does anyone
know one?)

IF there was kind of a kernel module that works like
a soundcard driver (and supplies /dev/audio, maybe
/dev/mixer and so on), but redirects output to a NAS server
THEN almost all available programs that output sound could use NAS.

Is this a good idea? Or are there other (better) approaches?
Maybe someone has implemented this already?
If not, any volunteers? ;-)

I welcome any hints and comments,

- Roy

-------------------------------------------------
 In a world without fences and walls
 who needs gates and windows?

 
 
 

NAS (Network Audio System) as a kernel module?

Post by Paul Englis » Thu, 29 Oct 1998 04:00:00



Quote:> IF there was kind of a kernel module that works like
> a soundcard driver (and supplies /dev/audio, maybe
> /dev/mixer and so on), but redirects output to a NAS server
> THEN almost all available programs that output sound could use NAS.
> Is this a good idea? Or are there other (better) approaches?

Seems like a good idea, and probably shouldn't be too hard to do.

Quote:> Maybe someone has implemented this already?

It seems likely that they would have, or else NAS would not be much use
at all. In fact, I'm very surprised that NAS itself didn't come with
instructions for how to get this to work.

Quote:> If not, any volunteers? ;-)

Not to do the kernel driver, that's for sure, but I will certainly look into
it. An interesting problem. Incidentally, what NCD terminals are you
using? I'm not familiar with ones which have sound hardware onboard.

Quote:> I welcome any hints and comments,

It seems like you should be able to tell NAS to get its input from a file.
And /dev/audio is a file. So if your program(s) output to a file (/dev/audio)
and NAS takes its input from a file, then it should be easy to set up a pipe
between them. Of course, I'm being vague, because I don't know how NAS
works yet. :-) I'm downloading it now.

Best of luck,
Paul

 
 
 

NAS (Network Audio System) as a kernel module?

Post by Roy Batt » Thu, 29 Oct 1998 04:00:00



> > [...]
> > Maybe someone has implemented this already?

> It seems likely that they would have, or else NAS would not be much use
> at all. In fact, I'm very surprised that NAS itself didn't come with
> instructions for how to get this to work.

I didn't find such information. But then, I didn't look too hard ...
As soon as I find the time I will do some more investigation.

Quote:> > If not, any volunteers? ;-)

> Not to do the kernel driver, that's for sure, but I will certainly look into
> it. An interesting problem. Incidentally, what NCD terminals are you
> using? I'm not familiar with ones which have sound hardware onboard.

We are using NCD Exploras.
I'm not a kernel hacker either. But the NAS source includes an API that
can be used to add NAS support to existing sound applications (assuming
you have its source code).
So, I can think of another interesting project: Adding NAS support to
an existing MP3-player. If I only had the time to look into this ...

If you (or anyone else?) decide to look further into this I will
be happy to here from your results.
Thanks.

- Roy

 
 
 

NAS (Network Audio System) as a kernel module?

Post by Roelofs, ir. M.E.F » Fri, 30 Oct 1998 04:00:00



> Hi all,

> I'm using NAS (Network Audio System) to output sound from
> Linux boxes to NCD X-Terminals.
> The problem with NAS is, that there are only few programs
> that support sound output via NAS. Most applications just
> use the local /dev/audio (/dev/dsp etc.).
> (I'm looking for a mp3-player that supports NAS. Does anyone
> know one?)

> IF there was kind of a kernel module that works like
> a soundcard driver (and supplies /dev/audio, maybe
> /dev/mixer and so on), but redirects output to a NAS server
> THEN almost all available programs that output sound could use NAS.

> Is this a good idea? Or are there other (better) approaches?
> Maybe someone has implemented this already?
> If not, any volunteers? ;-)

> I welcome any hints and comments,

Hi,

The package netaudio-1.1.src.tar.gz can be used for intercepting writes
to /dev/audio (and other audio devices), /dev/fd* and forwards these
writes to the X-terminal. I've been able to use it for floppies quite
well, but I haven't used it with sound.

Taken from its README:

        The trick behind netaudio is a preloaded share object that
intercept
        some low level system call such as open,close,read,write and act
on
        them specially if the target is one of the special files

                /dev/cdrom
                /dev/dsp
                /dev/mixer
                /dev/audio
                /dev/fd0
                /dev/fd0H1440
                /dev/fd1
                /dev/fd1H1440

        Since it is a preloaded share object, there is no need to
recompile
        any software. All is needed to activate netaudio is a single
line
        in /etc/profile on the application server

                export LD_PRELOAD=/usr/lib/netaudio.so.1.0.0

        and on the workstation or Xterminal, you must run the
netaudioserv
        command

                /usr/sbin/netaudioserv &

        That's all. The performance hit of this strategy is almost nil.

Michel

 
 
 

NAS (Network Audio System) as a kernel module?

Post by Roy Batt » Fri, 30 Oct 1998 04:00:00


Thanks, I tried netaudio. It's a nice package but unfortunatly it
uses its own protocol rather than NAS (NCD-terminals support
NAS only).
However, it should be possible to combine the netaudio-code
and the NAS-library-code and write a program that does
what I want to achieve.
I will look into this if I find the time...
- Roy



> > Hi all,

> > I'm using NAS (Network Audio System) to output sound from
> > Linux boxes to NCD X-Terminals.
> > [...]
> Hi,

> The package netaudio-1.1.src.tar.gz can be used for intercepting writes
> to /dev/audio (and other audio devices), /dev/fd* and forwards these
> writes to the X-terminal. I've been able to use it for floppies quite
> well, but I haven't used it with sound.

> Taken from its README:
> [...]

> Michel

--
-------------------------------------------------
 In a world without fences and walls
 who needs gates and windows?

 
 
 

NAS (Network Audio System) as a kernel module?

Post by Victor Wagn » Mon, 16 Nov 1998 04:00:00


: Hi all,

: I'm using NAS (Network Audio System) to output sound from
: Linux boxes to NCD X-Terminals.
: The problem with NAS is, that there are only few programs
: that support sound output via NAS. Most applications just
: use the local /dev/audio (/dev/dsp etc.).
: (I'm looking for a mp3-player that supports NAS. Does anyone
: know one?)

I found the opposite thing. Most sound-aware programs on my box
have a compile-time option to choose between various sound output
system. NAS is always among them.

Only thing which I haven't found NAS equivalent by now is mpeg player.

I'm currently use following shell script:
#!/bin/bash

It needs to reduce quality using -2 switch, but I'm sure that if I would
have only one process in pipeline (replace auplay with some utility,
which is able to play raw audio given frequency and other parameters in
command line) I would be quite able to play on full speed. It is very
straightforward task to write such beast using libaudio, but I haven't
found time yet.

Really I think that there is no place for NAS in kernel. As well as you
use separate program to do graphics you should use separate program to
do sound. I rather would say that direct writing to /dev/audio should be
strongly discouraged in favor of NAS, as well as SVGAlib is discouraged
in favor of X.

: IF there was kind of a kernel module that works like
: a soundcard driver (and supplies /dev/audio, maybe
: /dev/mixer and so on), but redirects output to a NAS server
: THEN almost all available programs that output sound could use NAS.

: Is this a good idea? Or are there other (better) approaches?

I think better appoach is to avoid installing binaries and install
everything from sources, checking for NAS support carefully and adding
one if neccesary. I've already written it for xpat2, and probably should
begin to distribute it. If all of us who prefer to run games remotely
would fix one program each, there would be no NAS unaware programs in
Unix.

P.S. Do you know exactly which NCD models supports NAS?
 I have NCD ECX and it seems to miss it. (I use NAS anyway having old
 486 as X terminal, but it would be nice to have one more sound-able
 workplace)

--
--------------------------------------------------------
I have tin news and pine mail...

 
 
 

1. NAS (Network Audio System) and audio support in general

I'm running FBSD2.1R (2.1.5R may be installed this month if time
allows), and I have a SoundBlaster with all the kernel support and
devices.

Tracker and s3mod play well, as does say from rsynth and I have
installed NAS.  The NAS documentation makes mention of a NAS SERVER
but I have no clue about such a beast.  Is this a piece of NCD
non-free code?  (not to denegrate NCD in any way).  Or am I just
missing something terribly obvious.

Also, what the heck do I use to get sound IN the machine?  Can I just
cat /dev/audio and get stuff?  What format is the stuff?  What about
the other snd devices?  Please tell me where I missed all this in TFM.

Andrew

2. Dual Network Cards

3. Setting up Network Audio System (NAS)

4. Checking system logfiles

5. Network Audio System (NAS) on 2.1.5R

6. XFConfig settings for Samsung Syncmaster with Trident 9680

7. Q: NAS and /dev/audio collision ...

8. Diamond Speedstar Pro Accelerator Card

9. NAS and /dev/audio busy!!!!!

10. new kernel OK but what about system.map, kernel.h and module-info

11. System looks for nonexistent audio modules -> possible hang

12. CD Audio ripper as kernel module

13. Opening a kernel module from another kernel module