[Pkg-alsa-devel] Bug#663239: mplayer opens audio device in 48000 Hz for 44100 source material

Kurt Roeckx kurt at roeckx.be
Sat May 12 10:52:25 UTC 2012


On Sun, Apr 15, 2012 at 07:17:34PM +0300, Uoti Urpala wrote:
> This is expected behavior with ALSA dmix. It has a fixed hardware output
> frequency, in your case 48000 Hz.

As far as I know this is just a default and has nothing at all to
do with what the hardware supports, it's just a value in a config
file.

> Anything played through dmix will be
> resampled to 48000 Hz. mplayer2 could feed data to ALSA at 44100 Hz if
> it left ALSA resampling enabled, but the only difference that would make
> is that the resampling would happen on the ALSA side rather than on the
> mplayer2 side.

I know, and as far as I understand the default resampling of dmix
is worse quality than what mplayer uses.  And I don't really care
where the resampling happens, but it really should only be done
when the hardware doesn't support the sample rate.

> There's no way hardware would support everything in the 4000-4294967295
> range. That range only tells which rates ALSA is willing to resample to
> 48000 Hz. The values reported for the hw device, "44100 48000 96000
> 192000", are the ones your hardware can actually play without
> resampling. If you select the hw device then you should be able to play
> these rates without resampling (note that in contrast to dmix, using the
> hw device directly reserves the device and no other audio source can
> play at the same time).

I know all this.  That doesn't mean things can't be improved.


Kurt






More information about the Pkg-alsa-devel mailing list