No sound Rasbian Wheezy


28 posts   Page 1 of 2   1, 2
by paul773car » Sat Jul 21, 2012 4:35 pm
Hi all, got my PI yesterday and all set up and working fine other than sound. I dont get anything out of the audio socket or the HDMI cable.

I'm new to linux (literally the first time i looked at it was yesterday). However i have managed to install vlc and an "play" and MP3. I can see VLC is playing it but i cannot hear it!!
I have checked my config.txt file and added HDMI_group=2

Please treat me as a complete noob, as I'm literally clueless with Linux thats why i bought it!

thanks

Paul
Posts: 2
Joined: Sat Jul 21, 2012 4:21 pm
by dom » Sat Jul 21, 2012 4:56 pm
Try here first:
http://elinux.org/R-Pi_Troubleshooting#Sound

and see if hello_audio works.
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by paul773car » Sat Jul 21, 2012 5:15 pm
hi, I get nothing from hello audio, when I type make I get an error that says "cannot find lilclient, collect2: ld returned 1 exit status, make: *** (hello_audio.bin) error 1

Thanks

Paul
Posts: 2
Joined: Sat Jul 21, 2012 4:21 pm
by dom » Sat Jul 21, 2012 6:22 pm
paul773car wrote:hi, I get nothing from hello audio, when I type make I get an error that says "cannot find lilclient, collect2: ld returned 1 exit status, make: *** (hello_audio.bin) error 1


Ah, the wiki's build instructions were out of date. I've updated them, can you try again.
Moderator
Moderator
Posts: 3861
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by cgul1 » Sun Jul 22, 2012 2:54 am
I get same results with vlc trying to play an MP3 - shows the music file graphics and progress, but no music.

I do get audio from the .hello_audo.bin now after the remake on troubleshooting

I see there is an ALSA plugin for vlc, but was unable to install from apt-get

OR is this a codec problem. (sorry altho a Linux user for a while, a bit of a noob at this level)

thanks for any help 8-)
Posts: 3
Joined: Sun Jul 22, 2012 2:42 am
by dwreid55 » Sun Jul 22, 2012 11:01 pm
I'm having the same problem that Paul773car is having.

HDMI monitor with no sound capability - monitor only
Analog sound connected to stereo speakers
Release version of Rasbian Wheezy
Applications produce no sound.
VLC shows MP3 files as playing and shows unmuted sound with active volume control. No sound
Game GWELED runs but produces no sound
Game Frozen Bubble refuses to run when attempting sound
Attempting to make hello_audio gives "cannot find lilclient, collect2: ld returned 1 exit status, make: *** (hello_audio.bin) error 1
Using aplay to play wav files DOES play sound files properly
Adding the hdmi_drive=2 to the config.txt file makes no difference. I have now removed it.

If I can provide any other useful information please let me know.
Posts: 12
Joined: Wed Jul 11, 2012 3:13 am
by Ocean20 » Mon Jul 23, 2012 9:37 am
Same problem here. HDMI monitor... no sound capability. Plugged in USB speakers into powered hub plugged into sound socket. VLC seemed to make all the right moves but no sound. Hmmmm. I am open to suggestions. I can use Ubuntu on my desktop PC with the same USB speakers and it works so I know speakers are fine. I am having fun though.
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by Lob0426 » Mon Jul 23, 2012 5:41 pm
The key settings for a HDMI monitor without sound should be:
hdmi_group=2 (in /boot/config.txt)
hdmi_drive=1

at the command line enter:
sudo amixer cset numid=3 1 (there is a space between 3 and 1)

Those are what worked for me.

@Ocean20: Do those speakers only plug into USB or are they powered by USB and have a plug for the analog (3.5mm jack)? If they only have a USB "A" connector, then they have their own sound card built in and you may need drivers to get them working.
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by dwreid55 » Mon Jul 23, 2012 5:54 pm
Thank you. I'll give that a try and report back.
I did have one more bit of information that may be helpful for creating a permanent fix for everyone. Not sure but it will mean more to the developers.

Although the other applications don't generate any sound there is one program (other than aplayer) that does. The distro includes Python Games. The game GemGem DOES produce sound when I select the "force headphones" or the "automatic" setting for sound.
Posts: 12
Joined: Wed Jul 11, 2012 3:13 am
by dwreid55 » Mon Jul 23, 2012 7:10 pm
The key settings for a HDMI monitor without sound should be:
hdmi_group=2 (in /boot/config.txt)
hdmi_drive=1

at the command line enter:
sudo amixer cset numid=3 1 (there is a space between 3 and 1)


I made these changes and ran the amixer command. There is no observable difference in operation.

vlan and games still produce no sound. Controls on vlan show unmuted and there is normal operation of the volume control. (When sound does not appear to be available vlan usually shows muted at start.) I tested vlan with both MP3 audio and MP4 video files. The video plays fine but no sound.
gweled - no sound
frozen bubble - starts, loads and then, at the point that music normally starts to play, exits with no message. (poof... gone)
aplay will play wav files
Python GemGem will also produce sounds

If you want me to run any sort of diags for you, please let me know. Happy to help out where I can.

Thanks!
Posts: 12
Joined: Wed Jul 11, 2012 3:13 am
by cgul1 » Mon Jul 23, 2012 9:20 pm
post on another thread fixed my vlc problems

viewtopic.php?f=28&t=11605

in summary
/etc/asound.conf with the following contents:
Code: Select all
pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}

Now VLC works for me!
Posts: 3
Joined: Sun Jul 22, 2012 2:42 am
by Ocean20 » Mon Jul 23, 2012 9:49 pm
@Lob0462 the speakers have a USB male connector that plugs into a powered USB hub and there is the analog audio jack that plugs into the audio output from the rpi. It worked OK with Ubuntu on a desktop computer. My monitor does not have sound capabilities and I connect to it using a HDMI/DVI-D cable.
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by Patschi » Mon Jul 23, 2012 11:48 pm
I also have massive problems with the sound on my Raspberry Pi. I tried to get the sound working on for the normal headphones and not HDMI.

When I try modprobe I get these messages:
root@raspberrypi ~ # sudo modprobe snd_bcm2835
libkmod: ERROR ../libkmod/libkmod-module.c:174 kmod_module_parse_depline: ctx=0x403d9008 path=/lib/modules/3.1.9+/kernel/sound/core/snd-pcm.ko error=Input/output error
libkmod: ERROR ../libkmod/libkmod-module.c:174 kmod_module_parse_depline: ctx=0x403d9008 path=/lib/modules/3.1.9+/kernel/sound/core/snd-pcm.ko error=Input/output error
ERROR: could not insert 'snd_bcm2835': Input/output error
root@raspberrypi ~ #


When I try ./hello_audio 1 I can hear something on my headphones...
But if I just try to get sound on Despotify, aplayer or mplayer it won't work.

When I try aplay I get this error:
root@raspberrypi ~ # aplay /root/AmazingHorse.mp3
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:682: audio open error: No such file or directory


I also did reconfigured and reloaded alsa - it still won't work. On some pages there is a command "alsaconf", but this command doesn't exist. Someone maybe knows a solution?
Thanks for your help! :)
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
by Ocean20 » Tue Jul 24, 2012 4:44 am
Here is what I did. I removed VLC by typing apt-get remove VLC at the command line while in root. I made sure that I installed alsa_utils using command line again but wasn't really sure if I needed to do this but did it anyway. I installed omxplayer. This is apparently a command line utility but I didn't know that before.

I went to file manager and found a mp3 file and right clicked on it and in the pop up window I chose "open with" anc clicked on the "custom command line tab" , then in the window under "command line to execute I typed "omxplayer" and then I had sound. A lot of trouble to go to to play one mp3 file though
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by dwreid55 » Tue Jul 24, 2012 6:51 am
I followed the tip provided by CGUL1 above and it did fix my problem with vlan. (Thank you!)

Create file /etc/asound.conf with these contents:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}


The "crackling" that people have mentioned in the sound is related to moving the mouse. As the processor takes time out to process the video for the cursor movement it interrupts the audio stream. Don't move the mouse and no crackles. (at least for me) This MIGHT be corrected by the promised implementation of the graphics acceleration in the future. (completely guessing and pontificating here :D )

Although this fixed the problem for vlan it did not fix the problem for other programs. However this may serve as a clue to those smarter than I am as to the root cause and cure.
Posts: 12
Joined: Wed Jul 11, 2012 3:13 am
by dwreid55 » Tue Jul 24, 2012 7:22 am
Update to my previous post.

I always think that more testing is better than less so this is what I've found.

The changes made above seem to have fixed the vlan problems with audio regardless of the source of the audio. (MP3 or MP4 in this case)

After implementing the changes that made vlan work (above) I found the following "side effects".

If vlan is running in either window mode or minimized to the tray, some programs (GemGem for instance) would not run. In fact they terminate when they try to access the sound system. If you make sure that vlan is completely stopped (not running in the tray) GemGem can access the sound system and create sounds providing you select the "force headphone" option. If you choose the "leave as it is" option the program terminates and does not execute. (I have not tested the auto setting.)

If you have created a conflict by attempting to run GemGem while vlan is active then vlan will not respond to the quit command and the CPU shows high load. You can terminate vlan from the task manager and then CPU use drops to normal.

The changes made that fixed vlan also fixed Frozen Bubble. It now executes instead of terminating and has sound.

Gweled still executes but still does NOT have sound.

While this seems odd to me, I hope that this may provide some insight to others.

As always, if there is something that I can do to provide more information please let me know. I'm also happy to provide someone official with an image of my system as it is now if that would be helpful. (and providing someone can tell me how to make an image of the SD card.)

Thank you everyone!
Posts: 12
Joined: Wed Jul 11, 2012 3:13 am
by Patschi » Tue Jul 24, 2012 12:46 pm
Since I've tried the /etc/asound.conf file I get this error:
root@raspberrypi ~ # aplay /root/AmazingHorse.mp3
aplay: main:682: audio open error: No such file or directory
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
by Ocean20 » Tue Jul 24, 2012 10:45 pm
@ Lob0426 When I open /boot/config.txt using the text editor and try and make the changes you said to play sound with a HDMI monitor with no sound capabilities and then try and save the edited file it says I don't have access or something like that. I guess when you use the editor your are not root and that is the problem so how do I use the editor as root so I can save the changed txt file?
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by Patschi » Tue Jul 24, 2012 10:50 pm
Use this following command:
sudo nano /boot/config.txt
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
by Ocean20 » Tue Jul 24, 2012 11:36 pm
@Patschi... now why didn't I think of that? BTW I notice you are in Austria. I came from Wels but now live in the land of kangaroos
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by Ocean20 » Wed Jul 25, 2012 2:47 am
I got a siren sound to play on the analogue output with ./hello_audio.bin
Don't know how I did it! Getting a bit sick of that sound though
Posts: 38
Joined: Wed Jul 18, 2012 2:36 am
Location: Australia
by Patschi » Wed Jul 25, 2012 1:40 pm
Yes, the siren sound also works on my RaspBi, but normal sound of aplay won't work...
I will try it again soon, because I've reinstalled my Raspberry Pi.
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
by PaulCheffus » Thu Jul 26, 2012 8:12 pm
Patschi wrote:Yes, the siren sound also works on my RaspBi, but normal sound of aplay won't work...
I will try it again soon, because I've reinstalled my Raspberry Pi.


Hi

On a different thread Dom suggested I tried a longer file with aplay. I copied a 1.2mb file from my PC and after about one and a half seconds of silence I had sound. There appears to be a problem with playing the first few seconds over the HDMI cable with the current driver.

Cheers

Paul
Procrastination - The Thief of Time.
Posts: 372
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK
by Lob0426 » Fri Jul 27, 2012 5:46 am
Ocean20 wrote:@ Lob0426 When I open /boot/config.txt using the text editor and try and make the changes you said to play sound with a HDMI monitor with no sound capabilities and then try and save the edited file it says I don't have access or something like that. I guess when you use the editor your are not root and that is the problem so how do I use the editor as root so I can save the changed txt file?


Sudo nano /boot/config.txt
Back-powered 256MB as WordPress Server
Motorola Lapdock with 512MB
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!
User avatar
Posts: 1868
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
by hamj36 » Fri Jul 27, 2012 5:34 pm
I've also been struggling with sound via ALSA to an HDMI TV (Sony KDL32V5500), the problem being that apart from hello_audio (which doesn't use ALSA), little else produced any sound. I now believe that it's a problem with output of mono audio streams - the ALSA driver says it supports it, but the TV doesn't. A quick way to see if this is a problem for you is to first run speaker-test with no parameters, then run it with -c 2 on the command line. In my case the first run gives no sound, and the TV brings up an "Unsupported audio signal" message after a few seconds. The second run works as expected.

I'm not sure whether this is due to the TV claiming to support mono audio when it doesn't, or due to the ALSA driver claiming to support mono audio regardless of whether the TV supports it. I'm attaching the EDID dump from my TV and the output of tvservice -a in the hope that a suitably competent person can tell me which.

In principle it's supposed to be possible to force the ALSA libraries to force conversion of mono audio to stereo to get around this, which is what I'm currently having a play with.

I don't know if this sheds light on anyone else's audio problems, but hope it helps someone.
Attachments
kdl32v5500.zip
EDID dump from tvservice -d and output from tvservice -a
(890 Bytes) Downloaded 93 times
Posts: 8
Joined: Wed Jun 20, 2012 6:12 pm
Location: Southampton, UK