Sound no longer working
#1
Sad 
Okay, have had this before and couldn't fix it - I reloaded instead. I have now had it happen again, this time on Hardy, and I don't have a recent backup. I recall others having had this happen but searches aren't bringing me any useful results. The last time this occurred I still had analog output if I used headphones but digital was cooked, I've not got headphones handy but ASSume this is much the same.

Scenario was this - went to watch a movie, menu came up, selected Play Movie, and XBMC crashed to desktop. Mouse was unresponsive, I rebooted via SSH. When XBMC was run again no audio. Play something in mPlayer and I'm not hearing audio there either. Menu sounds etc. all dead in XBMC. Digital output is *not* muted and volume is up. I *know* others have seen this and solved it but danged if I can find those posts, I'd appreciate a hand. Thanks!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#2
I've had this where only digital audio would output and NOT analog (still out of spdif).

What I usually do to fix in my scenario is:

0) Stop XBMC
1) Create a file in your home directory called .asoundrc that contains the following single line: pcm.!default spdif
2) Run: speaker-test -c 2
3) If you hear sound, you can stop.
4) Remove .asoundrc
5) Restart XBMC


Try that...
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Okay, let me tell you what I did and see if I've understood correctly...

1) In my home/blkmgk/ folder I created a folder named .asoundrc - like you I do not normally have this.
2) In .asoundrc I created an empty file and named it pcm.!default spdif
3) Ran the speaker test - no sound Sad

I am using coaxial digital output if that matters. It almost seems like there's a corrupted file or something somewhere. The last time this happened I updated ALSA and tried to remove\reinstall it to no avail. Would love to track this issue down!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#4
Nono..

Create a FILE called .asoundrc in your home directory with the following contents in the .asoundrc file:

pcm.!default spdif
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Fixed!!! Thank you VERY much!
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#6
You're welcome... Don't forget to remove the .asoundrc AFTER running speaker-test. It causes issues otherwise Smile
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
When I tried the .asound method it cause me nothing but issues so I hunted around till I found this:

/usr/bin/iecset audio on

Fixes it every time for me. I experienced the problem daily as I have a script run by irexec to kill xbmc and run myth and vice versa. Every time you kill something with Digital Audio you lose PCM on my machine. The above line in the script before restarting xbmc/myth fixed all my issues.

Cheers,

Arkay
Reply
#8
I tried that iecset as well but it did not fix it for me.

Another thing that works *most* of the time but not as reliably as the asoundrc method is:

cat /dev/urandom | ac3dec -R

I have both run when starting XBMC just to be sure Smile
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
Gotta love HTPC consistency Laugh

Cheers,

Arkay.
Reply
#10
More like a dumb ALSA bug that has existed for a few years apparently.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
Weird thing is it takes a really severe crash of XBMC to trigger this for me and even then it's not consistent. All in all my system has been REAL stable and I've been pretty happy thus I did NOT want to have to reload. Think I might get around to backing it up though Wink
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#12
I think it usually happens when you are watching some movie that has AC3 or some digital audio and then crashes while watching that.
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#13
I still can't seem to figure out how to get my sound to work properly. Movies and digital (ac3) music work but mp3's don't. I tried Tslayers fix (thanks Treefour for explaining it) and no sound, but if I reboot with the .asoundrc file navigation sounds worked. I've been to the Ubuntu forums and found loads of info still no sound. Does anyone know how I can fix this?
Reply
#14
weird i had sound working the past 2 months, had just updated via svn again which i do weekly and installed an esata card rebooted box and no sound. I have tried everything to get it working. I have no menu sounds and fast video / no audio playing even apple trailers. I see in log something about discontinuity. Please help. I notice my amp still says Aux 2.0 which it did when sound workedSmile
Reply
#15
TheBurner: Maybe you knocked your sound card out when putting in your esata card.

Check dmesg or even try speaker-test to see if sound even works at all.

TS
42.7% of all statistics are made up on the spot

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Sound no longer working2