[alsa-devel] Bug in aplay?
damien.zammit at gmail.com
Wed Dec 12 12:01:38 CET 2012
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
pi at raspberrypi ~ $ ./aplay -D hw:1 48000-S24_3BE.wav
Playing raw data '48000-S24_3BE.wav' : Signed 24 bit Big Endian in
3bytes, Rate 48000 Hz, Stereo
aplay: set_params:1145: Unable to install hw params:
pi at raspberrypi ~ $
This is making it tricky for me to use my sound card. For some reason
it works better with jackd. The error above is also a mystery to me,
but it seems to be detecting the format better.
More information about the Alsa-devel