[alsa-devel] Bug in aplay?

Takashi Iwai tiwai at suse.de
Wed Dec 12 12:38:28 CET 2012

At Wed, 12 Dec 2012 22:01:38 +1100,
Damien Zammit wrote:
> Hi,
> I think i found a small bug in alsa utility "aplay".
> If you have a sound device that supports the S24_3BE format natively,
> and you have a wav file of the same format, aplay will not play it
> because it detects the wrong format and assumes it is default format.
> (ie 8000Hz Mono 1 channel).
> I compiled my own version of aplay and it works because I hacked the
> default format to match this format, but it is not the ideal solution.
> pi at raspberrypi ~ $ aplay --version
> aplay: version 1.0.25 by Jaroslav Kysela <perex at perex.cz>
> pi at raspberrypi ~ $ aplay -D hw:1 48000-S24_3BE.wav
> Playing raw data '48000-S24_3BE.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
> aplay: set_params:1081: Sample format non available
> Available formats:
> - S24_3BE

Does your WAV file have a valid WAV_FMT_* chunk indicating the 24bit
format?  aplay checks bit_p_spl and byte_p_spl fields of WaveFmtBody
defined in formats.h.


More information about the Alsa-devel mailing list