Sound problem - aplay lock up


7 posts
by bgreat » Thu Jan 17, 2013 1:07 am
Good day!

I do not use sound often and was surprised to find out after that my HDMI sound was working with 16-Dec-2012 Raspbian Wheezy release. I spent a lot of time using aplay and mpg321 verifying that I could now play all of the sounds in the /usr/share/scratch/Media/Sounds directories. Mostly for fun as two of my Raspberry Pi's run headless and the other is used for command line development work. I did entertain myself by using the Kitten.wav, Meow.wav files to annoy my daughter's kitten. It was fascinating to watch it try to find where the other cat was hiding. Then, about two weeks ago, aplay started locking up after playing one or two sound files. I could not use Ctrl-C or Ctrl-Z to return to a command prompt and was unable to kill aplay from another terminal. I shrugged my shoulders and went on about my other uses for the Pi. The only factor I could identify as being different was a recent 'apt-get update; apt-get dist-upgrade'.

Now, I would like to use the sound output for some constructive work and to make it more interesting for the grandchildren. I am desperately trying to get them introduced and comfortable with computers -- beyond the M$ ecosystem. So, regular lockups are not acceptable.

I have investigated the system log files and I do not see anything that is particularly helpful from my standpoint. After running aplay for two successful instances, the third instance locked up with no sound output.

kern.log has the only interesting information:
Code: Select all
Jan 16 19:04:03 raspberrypi kernel: [277072.371301] INFO: task aplay:4361 blocked for more than 120 seconds.
Jan 16 19:04:03 raspberrypi kernel: [277072.371323] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan 16 19:04:03 raspberrypi kernel: [277072.371339] aplay           D c037a204     0  4361   4318 0x00000001
Jan 16 19:04:03 raspberrypi kernel: [277072.371405] [<c037a204>] (__schedule+0x2bc/0x568) from [<c037b720>] (__mutex_lock_slowpath+0xb8/0x154)
Jan 16 19:04:03 raspberrypi kernel: [277072.371545] [<c037b720>] (__mutex_lock_slowpath+0xb8/0x154) from [<bf0ed918>] (snd_pcm_open+0xe8/0x200 [snd_pcm])
Jan 16 19:04:03 raspberrypi kernel: [277072.371711] [<bf0ed918>] (snd_pcm_open+0xe8/0x200 [snd_pcm]) from [<bf0ad5cc>] (snd_open+0xf8/0x250 [snd])
Jan 16 19:04:03 raspberrypi kernel: [277072.371791] [<bf0ad5cc>] (snd_open+0xf8/0x250 [snd]) from [<c00bc43c>] (chrdev_open+0x188/0x1f8)
Jan 16 19:04:03 raspberrypi kernel: [277072.371829] [<c00bc43c>] (chrdev_open+0x188/0x1f8) from [<c00b6be8>] (__dentry_open.isra.15+0x22c/0x2f8)
Jan 16 19:04:03 raspberrypi kernel: [277072.371865] [<c00b6be8>] (__dentry_open.isra.15+0x22c/0x2f8) from [<c00c59a4>] (do_last.isra.35+0x2c4/0x6f0)
Jan 16 19:04:03 raspberrypi kernel: [277072.371897] [<c00c59a4>] (do_last.isra.35+0x2c4/0x6f0) from [<c00c6108>] (path_openat+0xb8/0x39c)
Jan 16 19:04:03 raspberrypi kernel: [277072.371927] [<c00c6108>] (path_openat+0xb8/0x39c) from [<c00c64d0>] (do_filp_open+0x2c/0x80)
Jan 16 19:04:03 raspberrypi kernel: [277072.371955] [<c00c64d0>] (do_filp_open+0x2c/0x80) from [<c00b79bc>] (do_sys_open+0xdc/0x178)
Jan 16 19:04:03 raspberrypi kernel: [277072.371993] [<c00b79bc>] (do_sys_open+0xdc/0x178) from [<c000d980>] (ret_fast_syscall+0x0/0x30)

This repeats every two minutes.

Any thing I can do to help isolate this issue, just let me know.

Raspberry Pi is an original Model B, 256MB, with the polyfuses removed. USB is connected to a RTL8188CUS 802.11n WLAN adapter and a Motorola Atrix dock. Power is supplied from the dock and measures 4.9 VDC at TP1/TP2. This is my only issue. Up time has been typically in excess of 14 days -- until I reboot during an update. I regularly run 'apt-get update ; apt-get upgrade'. When appropriate, I use 'apt-get dist-upgrade'. I do not use 'rpi-update'.

Thanks and enjoy!
Bill
User avatar
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm
by bgreat » Thu Jan 17, 2013 1:23 pm
I did a little more investigation. This only occurs with the digital audio via HDMI. The analog audio output works fine. Today I will reimage my SD and confirm the problem is coincident with an update.

Thanks and enjoy!
Bill
User avatar
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm
by bgreat » Thu Jan 17, 2013 4:52 pm
Here are the results of some tests. All tests are started from a clean shutdown, power off, power on sequence.

Test 1:
Original SD card with Wheezy 16-Dec-2012, all apt-get update, apt-get dist-upgrade:
  • aplay locks after three .wav files are played

Test 2:
New SD card with Wheezy 16-Dec-2012, no updates, hdmi_drive=2:
  • aplay locks after three .wav files are played

Test 3:
New SD card with Wheezy 18-Sep-2012, no updates, hdmi_drive=2:
  • aplay works with no lockup, over 20 .wav files played

Test 4:
New SD card with Wheezy 16-Dec-2012, no updates, hdmi_drive=2:
  • Ran amixer to view current settings
  • aplay works with no lockup, over 20 .wav files played

Test 5:
Original SD card with Wheezy 16-Dec-2012, all apt-get update, apt-get dist-upgrade:
  • Ran amixer to view current settings
  • aplay works with no lockup, over 20 .wav files played

Test 6:
Original SD card with Wheezy 16-Dec-2012, all apt-get update, apt-get dist-upgrade:
  • aplay works with no lockup, over 20 .wav files played


Now I am unable to get aplay to lock up using the original SD card. I have no explanation. I will monitor and post if there is a recurrence and I can come up with any helpful information. Right now, it is inexplicable.

Thanks and enjoy!
Bill
User avatar
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm
by scruss » Sat Feb 16, 2013 4:35 pm
Can't help you here, but I'm getting exactly the same problem when I'm trying to run Boodler. Like you, I'm running a fully-updated system from the console. Same lockup. My thread on this - Which sound system for reliable Python audio? - will have more details of what I'm seeing.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
User avatar
Posts: 284
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
by KenT » Sat Feb 16, 2013 4:49 pm
16/12/2012 image has pulseaudio installed with the aim of getting rid of the clicks. Because of this switching between hdmi and analog needs amixer -c 0 cset numid=3 n not amixer cset numid=3 n

uninstalling pulseaudio might solve your problem
Pi Presents - A display package for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 534
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
by Cloudcentric » Sat Feb 16, 2013 4:57 pm
Actually a new image was released which seems better for audio 09/02/2013 http://www.raspberrypi.org/downloads

Sound output http://www.raspians.com/Knowledgebase/n ... hone-jack/
I know everything about nothing"
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am
by scruss » Sat Feb 16, 2013 8:27 pm
KenT wrote:16/12/2012 image has pulseaudio installed with the aim of getting rid of the clicks.


I'm effectively running 09/02/2013 through dist-upgrade and rpi-update. pulseaudio works fine, so I'll stick with that. Thank you!
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
User avatar
Posts: 284
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON