Re: Sample Rate Conversion Quality in ALSA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/21/06, James Courtier-Dutton <James@xxxxxxxxxxxxxx> wrote:
> Marc Brooker wrote:
> > Hello,
> >
> > I am new to the ALSA development, and would be interested in
> > contributing in future.
> >
> > After installing the latest Ubuntu on my home machine, I noticed that
> > dmix is enabled by default. This is a very good move in my opinion, as
> > it makes Linux sound much more transparent to the end user. However, I
> > was concerned with the quality of the mixing algorithm and sample rate
> > conversion used by dmix.
> >
> >
> > Cheers
> >
> > Marc Brooker
> >
> The problem is actually far more complicated than you described. A fair
> amount of ALSA core will have to be modified to really fix the problem.
> The main problem is the buffer and period sized as they pass through dmix.
> For example, if the sound card hardware is running with 1024 samples per
> period at 48000, and an application wished to use a sample rate of
> 44100, the application should really get 940.8 samples per period. That
> is nor possible, so the application gets 940. dmix then tries to convert
> 940 samples to 1024 samples ready for the hardware. So, even if the dmix
> algorithm used the super high quality sample rate conversion function,
> the actual rate change applied would still be slightly off.
>
> James
>
>

James

Let me see if I understand you correctly. In the scenario that you
presented the application is told that there are 940 samples per
period. ALSA, internally, converts these to 1024 samples per period at
48kHz sample rate. So the material (sampled at 44100Hz) is played back
at a rate of 44062Hz? I don't know enough about the field to know if
this error (0.08%) will be audible.

There doesn't seem (at first glance, my knowledge of the ALSA source
is limited) to be an easy solution to this problem. It might be naive,
but wouldn't it be better to report 941 as the buffer size to the
application - this way the error is smaller (but still not gone).

It seems to me that using a higher quality SRC function would lead to
some improvement in playback quality.

Cheers

Marc

-------------------------------------------------------------------------
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 easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux