[nas] Re: debugging help: nas enabled mpg123 sounds slow and scratchy?
jon at radscan.com
Fri Feb 28 15:03:31 MST 2003
On Fri, 28 Feb 2003, Scott Presnell wrote:
> Date: Fri, 28 Feb 2003 13:47:55 -0800
> From: Scott Presnell <srp at tworoads.net>
> To: jon at radscan.com
> Cc: nas at radscan.com, netbsd-help at netbsd.org, pgf at foxharp.boston.ma.us,
> fredb at immanent.net
> Subject: Re: debugging help: nas enabled mpg123 sounds slow and scratchy?
> Jon Trulson wrote:>
> >>Greg A. Woods wrote:
> >>>[ On Friday, February 28, 2003 at 10:45:23 (-0800), Scott Presnell wrote: ]
> >>>>Subject: debugging help: nas enabled mpg123 sounds slow and scratchy?
> >>I just now checked from host A, and with a different audio card,
> >>I have the same audio quality issues running mpg123-nas from a remote
> >>host, to my workstation where nasd is running, and the same if I reverse
> >>the client and server hosts.
> >>And now, unfortunately, to add to the story...
> >>With some .wav files from host A to my workstation, auplay also shows
> >>the same poor audio quality issues...
> > To get this straight... You are getting these dropouts and
> > samplerate problems with nasd no matter which machine it's on, and no
> > matter what data you send to it?
> > Is it only ssamplerate problems, or
> > are you getting dropouts as well? Can you use auplay to send a 16b stereo
> > wav to the nasd server? Is that messed up as well (local or remote)?
> No, not quite: .wav's on the same machine seem OK,
> some .wavs across machine, and all .mp3 (at 128kb/44100 Hz) (intra and
> inter host) are poor quality
Probably 16b stereo .wavs at 44.1khz? Almost sounds like it's
just not getting data fast enough if it works locally, but not remotely...
Are there alot of latencies on your network, or collisions, or other
errors on your netowrk interface (netstat -i)?
> >>So now I'm thinking it's nasd... am I outside the expected performance
> >>parameters of nasd?
> > No - it should work just fine. What sound card are you using?
> > Sometimes tuning the parameters in /etc/nas/nasd.conf can help (fragsize,
> > numfrags, etc). On some audio hardware (an ISA soundblaster) I had to
> > reduce the output samplerate to 22Khz to get acceptable performance (no
> > dropouts). No problem with the PCI variants though - runs at full
> > 44.1Khz, 16b stereo...
> So here is what I have tried.
> I played withg nasd.conf parameters to no avail.
> I added a great deal of optimization to the compilation of nasd ("-O4
> -mpentium -mieee-fp -fbuiltin -fomit-frame-pointer -funroll-all-loops
> -ffast-math", instead of just "-O2"). but that didn't make a difference,
Yeah, I doubt what little you gained there would have made much
> ...8/16 bit didn't change things...
> so I moved on to playing with sample rates, and found that I must use
> less than 44100Hz, 42000Hz seems to be about the threshold intrahost,
> about 38000 interhost. This is for a PCI audio card:
Interesting... I had a similiar problem with my thinkpad a21m
(running linux). Samplerate changes didn't work at all, and there were
frequent dropouts. The laptop uses some no-name cirrus chip. All those
problems went away after upgrading to kernel version 2.4.19.
> eap0 at pci2 dev 12 function 0: Ensoniq CT5880 CT5880C (rev. 0x02)
> eap0: interrupting at irq 10
> eap0: SigmaTel STAC9708 codec; 18 bit DAC, 18 bit ADC, Rockwell 3D
Not familiar with this hardware - I've always stuck to
soundblaster's where possible.
> and for Frederick: the output of audioctl -a is below.
> I played with blocksize and hi/lowat while a 44100 sample was playing
> intrahost, but I could only make it worse :-(
> Thanks for your comments.
It seems almost like a network issue... If it works fine locally,
but you are getting dropouts at higher bit rates when going remote, that
does indicate that nasd just isn't getting data fast enough...
> - Scott
> name=Ensoniq AudioPCI
Jon Trulson mailto:jon at radscan.com
ID: 1A9A2B09, FP: C23F328A721264E7 B6188192EC733962
PGP keys at http://radscan.com/~jon/PGPKeys.txt
You talk like a Ferengi.
More information about the Nas