Alistair12
Posts: 6
Joined: Sat May 11, 2013 10:02 pm

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

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.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5099
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

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.

Alistair12
Posts: 6
Joined: Sat May 11, 2013 10:02 pm

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

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.

manganmus
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm

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

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?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5099
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

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.

manganmus
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm

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

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.

Alistair12
Posts: 6
Joined: Sat May 11, 2013 10:02 pm

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

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.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5099
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

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.

manganmus
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm

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

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

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5099
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

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?

manganmus
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm

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

Thu Oct 31, 2013 3:41 am

The output of vcgencmd version:
Broadcom version dbda126981820ea5681263042435388dddf65131 (tainted) (release)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5099
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

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

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?

manganmus
Posts: 5
Joined: Sun Oct 27, 2013 7:22 pm

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

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)

pablo53
Posts: 1
Joined: Tue Apr 29, 2014 11:27 pm

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

Tue Apr 29, 2014 11:35 pm

Hi!

I have noticed the same problems as all of You, so I decided to code my own tool in order not to have underrun problems. However, having been experienced a little bit more now, I can see that the core problem does not concern the aplay nor rtl_sdr. I worked out a solution and it appeared that it stalls on the system pipline if any sampling rate is choosen above 1kHz.

So, to sum up - I believe the clue is to guess which update/upgrade to have done all the mess for us with stdout/pipeline.


Regards,
Pablo

Return to “Troubleshooting”

Who is online

Users browsing this forum: lapse, pcmanbob and 70 guests