Features Download

From: Marc Brooker <marcbrooker <at> gmail.com>
Subject: Re: Sample Rate Conversion Quality in ALSA
Newsgroups: gmane.linux.alsa.devel
Date: Monday 21st August 2006 20:16:53 UTC (over 12 years ago)
On 8/21/06, Lee Revell  wrote:
> On Mon, 2006-08-21 at 21:07 +0200, Marc Brooker wrote:
> > On a related note, on an Athlon64 3200+ running Ubuntu Dapper for i386
> > with backported alsa-libs 1.0.11 and alsa-plugins 1.0.11 (with
> > samplerate plugin) cpu usage figures (while playing a VBR mp3 using
> > gstreamer):
> > standard ALSA linear: 2%
> > samplerate: 6%
> > samplerate_medium: 9%
> > samplerate_best: 20%
> >
> > >From this it seems that samplerate_best is too costly, but samplerate
> > and samplerate_medium would be usable on most modern hardware.
> >
> It would be useful to have the same numbers for the low end of "modern
> hardware", like a 1Ghz fanless Via C3 board, or a Geode - the type of
> thing people use for MythTV boxes and what not.
> Lee

That's fair enough. I know that many people use Linux and ALSA on
lower end hardware which is doing other stuff (like MythTV) where
cycles are short. It's a really difficult problem - one default offers
poor sound quality and one chews CPU cycles.

I have spent some time this evening measuring the performance of the
standard resampler in ALSA versus the libsamplerate plugin.

First, I tested in the built in resampling code. On a 500Hz sine wave,
THD is fairly good (at -71dB) but SINAD (signal to noise and
distortion) is terrible at about 32dB. The picture is worse with 5kHz
sine wave - SNR is 30dB. Finally, on a 16kHz sine wave, SNR is 9dB
with an alias at 20kHz at -20dB and another at 8kHz at -30dB.

With samplerate_best and a 16kHz square wave, SNR is 70dB and the
strongest image is at 8kHz at -90dB. samplerate (fast) and
samplerate_medium performed nearly as well, with a slightly lower
cutoff frequency. The low SNR is probably caused by the recording
hardware. samplerate_order and samplerate_linear do no better than the
built in code.

Tests were performed by playing 44100 material through dmix, through
the Wolfson DAC on my AV710 card, and captured at 48000Hz using
AV710's rather poor line in. Analysis was done with baudline

I hope developers are not taking my arriving on this list and shouting
my mouth off the wrong way. I really appreciate the work you guys do
(and have done) and would like to contribute.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
CD: 13ms