Posts: 43
Joined: Mar 2009
Reputation:
0
I'm using XBMC on Windows with an HDMI video and audio connection. The HDMI cable is connected to an A/V receiver which in turn is connected to my TV.
If, when watching a video through XBMC, the input changes (either to another HDMI input or to a non-HDMI input), upon return XBMC is playing the video extremely slowly and without sound.
Pausing/unpausing makes no difference. Stopping/restarting fixes the video speed but sound does not return and I get an "unable to initialise video" error.
If I either quit and restart XBMC, or change the Audio input from "HDMI Device" to "Primary Sound Driver" (which is the HDMI audio anyway) the audio will return until the input changes again.
However, if I use a different media player, such as MPC-HC, both video and audio resume successfully when the input returns to the HTPC. Note that I only tried in windowed mode with MPC-HC and fullscreen mode (actually, not fullscreen mode but with the resolution the same as my desktop) in XBMC.
Is this a known issue or is there a known fix in XBMC? I don't really want to run something like HDMIOn at a regular interval in case some switches input either on purpose or accidentally as other applications manage to resume upon input changes just fine.
Posts: 43
Joined: Mar 2009
Reputation:
0
So no one has seen this issue at all? Really? It's easy to replicate if you have an HDMI output and HDMI display.
Posts: 42
Joined: Feb 2005
Reputation:
0
I have this same problem. I have HDMI coming out of a 780g motherboard into a Onkyo receiver then to a 1080p TV via HDMI. I am currently passing the sound through the receiver to the TV via HDMI. Once I get my speaker wire run I will not pass the sound through to the TV. My problem normally happens after the TV has been off for sometime. When I turn it back on I get no sound. If I reboot the sound will start working when it plays the logoff sound and will work once it is rebooted. I will try today to restart XBMC instead of rebooting and see if that fixes it.
Posts: 43
Joined: Mar 2009
Reputation:
0
I've tested this with builds r19378 and r19715 and it is a problem on both.
Posts: 170
Joined: May 2007
Reputation:
0
I think it has to do with the HDMI audio handshake between system and tv/receiver. I know it takes a while for my Onkyo to negotiate audio from the PC but I'm not sure if it's XBMC's fault.
I have also had different experiences based on ATI or Nvidia HDMI. ATI will send "silent" audio to keep the HDMI communication up while Nvidia cuts off audio when there is none so my Onkyo loses audio if I'm not playing anything or moving the cursor.
My two workarounds is to restart XBMC (which I have set to a Eventghost macro) or play a DTS audio file. This will force my receiver to renegotiate audio type with the PC. I normally just restart XBMC. I did notice severe video stuttering if audio isn't working right in XBMC.
Posts: 260
Joined: Aug 2008
Reputation:
0
phi2039
Team-XBMC Developer
Posts: 260
The problem here has to do with the way HDMI audio devices are handled by Windows. Since you truncated the debug log, I do not know what Windows version/SP you all are running, and will have to guess. Regardless, when the input is 'switched', what really happens to the PC is that the connection is broken. This causes Windows to remove the device from the list of available hardware. If you were to look at the Device Manager after changing inputs on your receiver, you would see that the HDMI audio device is gone. The trouble with the XBMC code in this regard is that it initializes a given device only once, and reinitialization is done only if the selected output device is changed. The single initialization is a carryover from the xbox, where there was only one device. This single instance is shared application-wide, because the nav sounds (clicks, etc...) use it as well. I will have a look and see what, if anything, can be done with out causing major disruptions on the other platforms.
Posts: 70
Joined: Dec 2008
Reputation:
0
Hi Phil,
well I didnt truncated the Logfile in purpose...., just copyed the file form the HTPC to my Upload directory.....anyway I use WinXP Pro, SP2 :-)
A Intermediate perhaps solution (till the problems is correctly fixed) could be, to make a function (taht can be maped to a key on the remote) that forces xmbc to reinitialize the audio device(s).
What do you say ?
Cheers,
Konstantin
XBMC, Intel P4 3.0GHz with HT, 2GB RAM, ATI 3450 HDMI GPU
Posts: 260
Joined: Aug 2008
Reputation:
0
phi2039
Team-XBMC Developer
Posts: 260
The other applications are using DirectShow (a Windows-only API) to handle audio output. I can only imagine that the switching is being handled behind the scenes. This is not a problem on Linux or OSX, adn varies by audio chipset, as my Realtek onboard HDMI works without incident on Vista.
@bob_loblaw: I would suggest that you familiarize yourself with the intricacies of audio handling on Windows before you comment on whether or not the code 'just blindly' does anything. Much effort and thought has been put in place to make the code as robust as possible, given the tools that are available.
Video playback is synced to the audio stream, therefore any disruptions will cause video to begin trying to catch back up.
The device can be forced to reinitialize by selecting a difference audio stream in the OSD menu or by changing from Digital to Analog and back again.
One last question I have is in regard to when the output is being disconnected. Are you changing sources mid-playback or between videos? The partial logfile is inconclusive.