[alsa-devel] [Alsa-devel] Quality resampling code for libasound

Rene Herman rene.herman at gmail.com
Thu Mar 22 23:11:37 CET 2007

On 03/21/2007 06:24 PM, Takashi Iwai wrote:

>> Well, my (latest) prpoposal is:
>> - keep speex resampler in alsa-plugins tree - installing this
>> plugin automatically enables it as the default rate converter
>> without touching any configuration
>> The second part is missing right now.
> ... and the patch below supports it.
> With this patch, you can set the list of multiple default PCM rate 
> converters.  For example,
> defaults.pcm.rate_converter [ "speexrate" "samplerate" "linear" ]
> will look for speex plugin, then libsamplerate plugin, lastly it will
> take the built-in linear converter as a fallback.  So, we can define
> this safely in the default alsa.conf file.

I guess this should work. This would be "import the speex version 
unchanged" only with s/alsa-lib/alsa-plugins/. It would depend on how 
many distributions would have no issue with making alsa-lib dependent on 

Keeping it in alsa-plugins would as far as I've understood have two reasons:

a) if it were to be put into alsa-lib directly, you'd want (style) 
changes that would have to be kept in place over possible frequent 
updates, and

b) some fear and doubt with respect to licenses?

As to b), if alsa-lib is dependent on alsa-plugins in distributions, 
this might mean all the same license questions arise at least for them. 
Given that Jean-Marc himself is advocating just pulling it into alsa-lib 
directly, I assume something could be worked out that would quiet any 
worries instead?

Not really any coments on a). How many updates can be expected? I saw 
Jean-Marc say things about SSE optimizations, but optimizations aren't 

I did try the effect of upsampling 8000 to 44100 using the current ALSA 
resampler today and that made for a quite significantly different 
sounding file. If you spend your time on getting the sound quality of a 
low bandwidth codec such as speex better, I can see why you'd not be too 
thrilled with then having the final step in the chain undo much of your 
efforts again ;-\


More information about the Alsa-devel mailing list