All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug in aplay?
@ 2012-12-12 11:01 Damien Zammit
  2012-12-12 11:38 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Damien Zammit @ 2012-12-12 11:01 UTC (permalink / raw)
  To: alsa-devel

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@raspberrypi ~ $ aplay --version
aplay: version 1.0.25 by Jaroslav Kysela <perex@perex.cz>

pi@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

My version:
pi@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:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_3BE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: 48000
PERIOD_TIME: 125000
PERIOD_SIZE: 6000
PERIOD_BYTES: 36000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 24000
BUFFER_BYTES: 144000
TICK_TIME: 0
pi@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.

Regards,
Damien

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-12 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 11:01 Bug in aplay? Damien Zammit
2012-12-12 11:38 ` Takashi Iwai
2012-12-12 11:54   ` Damien Zammit
2012-12-12 11:59     ` Clemens Ladisch
2012-12-12 12:08       ` Damien Zammit
2012-12-12 13:01         ` Clemens Ladisch
2012-12-12 14:23       ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.