Aplay not working for Unsigned 8 bit, Rate 8000Hz, Mono


13 posts
by Alistair12 » Sat Oct 26, 2013 8:37 pm
As the subject says, about 3 months ago I noticed that when trying to aplay an Unsigned 8 bit, Rate 8000Hz, Mono wav file that only half the sound was played, if you aplay the file twice 'aplay heyrocky.wav heyrocky.wav' you get the whole sound. It had worked previously.

Just wondered if it was my setup or a general thing?

Alistair.
Posts: 4
Joined: Sat May 11, 2013 10:02 pm
by dom » Sat Oct 26, 2013 8:57 pm
Is this HDMI or analogue?
HDMI receivers often take a second or two to lock on to a signal, so often miss the start of sound.
Analogue shouldn't have this problem.
Moderator
Moderator
Posts: 3858
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Alistair12 » Sun Oct 27, 2013 6:16 pm
I'm using a Hanns-G HG216D monitor over the HDMI, it’s actually at the end of the sound that’s missing. I'm familiar with the HDMI start missing as I have a Sony Bravia TV which annoyingly does this!

I've got sound working for acm flight sim, by installing Network Audio System (nas) then installing alsa-oss. I then edit the /usr/bin/start-nas file to include aoss. This might be my own setup issue I suppose, but, I sure that aplay work and acm at the same time.

I'll check out the analogue soon and report back.

Cheers,

Alistair.
Posts: 4
Joined: Sat May 11, 2013 10:02 pm
by manganmus » Sun Oct 27, 2013 7:30 pm
I've got a similar problem - have a bunch of wav files, some play, some don't. Ones that play are signed 16-bit 44.1 or 48 kHz stereo. Ones that don't are unsigned 8 bit 11.127 or 11.025 kHz Mono. I converted one that doesn't work to signed 16-bit 8 kHz stereo and it still didn't work, gave same result Haven't tried to upsample to 48 kHz yet. aplay gives the right properties when it tries to play them. Anyone know why it wouldn't work?
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm
by dom » Mon Oct 28, 2013 3:53 pm
manganmus wrote:I've got a similar problem - have a bunch of wav files, some play, some don't. Ones that play are signed 16-bit 44.1 or 48 kHz stereo. Ones that don't are unsigned 8 bit 11.127 or 11.025 kHz Mono. I converted one that doesn't work to signed 16-bit 8 kHz stereo and it still didn't work, gave same result Haven't tried to upsample to 48 kHz yet. aplay gives the right properties when it tries to play them. Anyone know why it wouldn't work?


Have you tried rpi-update?

There was a bug in firmware that affected 8-bit audio which could help.
Moderator
Moderator
Posts: 3858
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by manganmus » Tue Oct 29, 2013 3:10 am
Just ran rpi-update to get the latest firmware - no change in the issue. I forgot to mention first time that I'm using the analog audio.
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm
by Alistair12 » Tue Oct 29, 2013 9:36 pm
Hi Dom,

I've only been doing sudo apt-get update/upgrade, this rpi-update was news to, but, has worked great! Thanks for the help. :D

I still should do the apt-get yes? I'll see if this has improved the HDMI connection to the TV maybe.

Alistair.
Posts: 4
Joined: Sat May 11, 2013 10:02 pm
by dom » Tue Oct 29, 2013 9:46 pm
manganmus wrote:Just ran rpi-update to get the latest firmware - no change in the issue. I forgot to mention first time that I'm using the analog audio.

What are you using to play it?
Uploading a sample file and giving me the link may be useful.
Moderator
Moderator
Posts: 3858
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by manganmus » Tue Oct 29, 2013 11:12 pm
dom wrote:
manganmus wrote:Just ran rpi-update to get the latest firmware - no change in the issue. I forgot to mention first time that I'm using the analog audio.

What are you using to play it?
Uploading a sample file and giving me the link may be useful.


Here's one of the files that doesn't play: http://www.insentricity.com/file.cl/6108.wav
I tried with aplay and with sox's play.
What I did just now that worked - resampled the files with sox to 44100 Hz, and then the resampled file plays:
sox -S infile.wav -r 44100 -b 16 outfile.wav
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm
by dom » Wed Oct 30, 2013 3:54 pm
manganmus wrote:Here's one of the files that doesn't play: http://www.insentricity.com/file.cl/6108.wav


File played fine for me with aplay (both to analogue and hdmi output).

What does
Code: Select all
vcgencmd version

report?
Moderator
Moderator
Posts: 3858
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by manganmus » Thu Oct 31, 2013 3:41 am
The output of vcgencmd version:
Broadcom version dbda126981820ea5681263042435388dddf65131 (tainted) (release)
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm
by dom » Thu Oct 31, 2013 1:41 pm
manganmus wrote:The output of vcgencmd version:
Broadcom version dbda126981820ea5681263042435388dddf65131 (tainted) (release)

Can you report the date output?
Moderator
Moderator
Posts: 3858
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by manganmus » Thu Oct 31, 2013 8:41 pm
dom wrote:
manganmus wrote:The output of vcgencmd version:
Broadcom version dbda126981820ea5681263042435388dddf65131 (tainted) (release)

Can you report the date output?


Don't know why I didn't include that - the full output is Oct 18 2013 16:07:43
Copyright (c) 2012 Broadcom
version dbda126981820ea5681263042435388dddf65131 (tainted) (release)
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm