Kodi Community Forum

Full Version: XBMC always outputs LPCM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have used XBMC for a long time and I really love the application.

When using 12.0 for OSX I am met with some problems though. When I play DTS/DD 5.1 sources everything is sent perfectly to my surround processor for decoding. But when I play a 2.0 source, XBMC is encodin a 7.1 LPCM stream to my processor which means that I cant do any pro logic decoding on the signal. I have tried disabling the "LPCM receiver" in the audio-settings, but that results in no sound at all.

Is this a known bug or do you have any ideas how to fix it? I have never had this problem before.
I've recently noticed the same thing myself. I don't know how to fix it, but I do have a theory that this behavior is behind the 1 hour, 2 minutes, 8 seconds stuttering bug described here http://forum.xbmc.org/showthread.php?tid=148243 among other bugs seen on osx. Are you using a mac?
Long story short on the audio issues: known bugs, but no OSX audio devs available to work on them. I think the issue stems from the limited API that Apple provides with CoreAudio.

EDIT: This same issue may be why my optical link for 2-channel audio doesn't allow for ProLogic decoding on my Samsung HT-Z510. The optical/HDMI output may be forced into picking LPCM or passthrough for transport.
I've found a workaround, but it probably won't satisfy an audiophile. In XBMC I set the audio output to Analog, the Speaker Configuration to 2.0 and the Audio Output Device to HDMI (could be optical if you have that set up). I then set up the Dolby Pro Logic II on my receiver. On my sound bar system (Sony CT150), the PLII restores the surround sound well enough that it is hard for me to tell the difference with using pass-though. This also solves a few of the annoying video bugs that seem to be related to the XBMC multichannel-LPCM output (like the 1h 2m 8s thing), and it makes stereo files (which are mostly what I watch) sound much better.
So, OSX users lose the digital passthrough until we get some AudioEngine love? Might be acceptable for many users until things get properly fixed.
It sends 7.1 because its set to 8 channels in the audio midi setup. For allowing proper DPII on external receivers you have to set the Audio Midi Setup to 2 Channels - speaker layout 2.0 - and then activate AC3 and DTS receiver in XBMC (speaker config in there only matters for LPCM).

Having it set to Analog is not really part of the fix imo. The Audio Midi Setup setting is the core problem.
Not intending to argue, but being on an optical link and experiencing issues with not getting PLII decoding with 2-channel audio streams tells me that Audio MIDI Setup is not the fix, either. When the optical link is used, Audio MIDI Setup only allows a 2.0 speaker layout. I will add that having used the analog trick, it unlocked the PLII decode and allowed me to switch back to optical while keeping PLII mode enabled. Perhaps that addresses a glitch in my HT-Z510, but all audio seems to perform perfectly with other media players (VLC and DVD Player, mainly).

As I said previously, since I have seen nothing to update this stance, the OSX AudioEngine is known to need much love with no available OSX audio dev to work on it. Has that changed?
Memphiz: No, that isn't right. I've tested this repeatedly. With the Audio-MIDI setup set to 2 channels, XBMC will reset it to 8 channels whenever you play an AAC file, whether its a 2.0 channel file or something else. If you play a file with AC3 audio XBMC resets the Audio-MIDI to encoded digitial, and then back to what you had before when the file is done (assuming you have AC3 passthough enabled). The only way to stop XBMC from always resetting the Audio-MIDI to 8 channels when an AAC is being played is to set the output to analog, which, of course, kills the passthrough.

This is very easy to test. Just open up the Audio-MDI utility, set it to 2 channels, then leave it open as you play a video with a stereo AAC audio. Switch to the Audio-MDI app while the video is playing and you will see it set to 8 channels. This assumes you are using HDMI output. I don't have an optical setup to test.
In my own test, 2-channel audio streams (over optical) were sent in a way that prevented PLII decode. I know this because I would never get audio from my center speaker. That is, until I tried the analog trick. Suddenly, PLII lit up on my HT-Z510 and the center channel was being used. Just for kicks, I switch XBMC back to optical, and the HT-Z510 remained in PLII mode. Exactly why that doesn't get enabled for 2-channel audio streams all the time, I can't say. I honestly thought it was a fault in my HT-Z510, thus I hadn't said anything. The fault still may be in my HT-Z510, but reading about the OSX AudioEngine quirks with other setups makes me think again.

I merely added to this thread because of the similarity to a quirk that I was seeing, and I hoped my input would assist in locating the underlying cause.
The thing I fail to understand is how you Mac developers can write a new Audioengine, but can't fix the errors following? No intention in creating a hate for you guys, I think you're doing a great job! :-)
As far as I know, the OS X version worked much better with audio in the earlier versions of Xbmc. So how come you didn't stick to the original audio code?

I really hope that it will get fixed. I love xbmc and with my setup, I can't see how I should be able to replace my Mac with another platform.
You can't blame the devs for not having a mac specific version of the audio engine. XBMC is a cross platform app (it started on X-Box of all places). I use quite a bit of cross platform software, and the mac is always the worst platform for them due to Apple's "closed ecosystem" mentality. This doesn't really hurt command line programs ported from linux, but anything with graphics or audio suffers. Even Apple's own software is sometimes inferior. For instance, my macbook's wifi works much better (better speed, stability) when I boot in Windows via bootcamp than when I'm in OSX. This is a known issue with lots of discussion on Apple's own forums, but they refuse to do anything about it. I've bought nothing but macs since my first 512k model back in the 80's, but my next PC will be a linux box.

Of course, in the meantime, I'll keep tinkering with open source programs like XBMC and bugging the devs with all my issues, both real and imagined. Sorry about that Memphiz, it really is a good piece of software, and I know that you guys do your best with a difficult platform.
(2013-04-26, 10:53)Memphiz Wrote: [ -> ]It sends 7.1 because its set to 8 channels in the audio midi setup. For allowing proper DPII on external receivers you have to set the Audio Midi Setup to 2 Channels - speaker layout 2.0 - and then activate AC3 and DTS receiver in XBMC (speaker config in there only matters for LPCM).

Having it set to Analog is not really part of the fix imo. The Audio Midi Setup setting is the core problem.

I made this change a while ago and Memphiz is right (at least with my hardware using HDMI). I changed the MIDI to 8 channel on my MAC, thinking that's the right place to setup the speaker config when I first got my Mini. Whenever I played a file, I got the LPCM light and no DD, DTS or DPII. After some research I came across a post over a year ago to set MIDI to 2.0 and sure enough, I get 5.1 to my speakers and the DD, DTS or DPII light up on the receiver. If I change anything in MIDI from 2.0, I don't get those lights playing files in XBMC on my MAC-Mini.

I've always found trying to understand the speaker setup on a MAC confusing. I see some people suggest using Optical even if you're using HDMI and other suggestions. What I get from this post is: Speaker setup in XBMC only matters to LPCM and ignored for passthrough. This should be in a FAQ somewhere (including the OSX MIDI requirements). You'd think that setting the MAC sound config to 8 channel and XBMC to 8 channel would give you 8 channels but really you need to have both set to 2 channels. Talk about confusing...
I have my Audio-MIDI set to 2 channels also, but XBMC changes this to 8 channels during playback of 2-channel AAC files. During playback of any kind of AC3 file, XBMC changes the Audio-MIDI to Encoded Digital. You must have audio output set to HDMI for this to happen, not analog. As I've said, it's easy to check, but you must look at your Audio-MIDI utility while playing back a video file.

These are the audio settings to reproduce this:
Audio Output : HDMI
AC3 capable receiver: enabled
DTS capable receiver: enabled
Multichannel-LPCM capable receiver: enabled

I do get PLII on stereo AC3 with this setup as it is doing a passthrough, but not on stereo AAC.

Xtropy: What version of XBMC are you using? I use a recent nightly, updated about once a week. I just installed 20130425 today. It's certainly possible that different version behave differently. Have you tried playing a file with 2 channel AAC and checking whether you get LPCM and/or PLII lights on your receiver? I get LPCM, but no PLII in this case, unless I set my XBMC audio output to analog.
(2013-04-26, 21:31)RipT Wrote: [ -> ]I have my Audio-MIDI set to 2 channels also, but XBMC changes this to 8 channels during playback of 2-channel AAC files. During playback of any kind of AC3 file, XBMC changes the Audio-MIDI to Encoded Digital. You must have audio output set to HDMI for this to happen, not analog. As I've said, it's easy to check, but you must look at your Audio-MIDI utility while playing back a video file.

These are the audio settings to reproduce this:
Audio Output : HDMI
AC3 capable receiver: enabled
DTS capable receiver: enabled
Multichannel-LPCM capable receiver: enabled

I do get PLII on stereo AC3 with this setup as it is doing a passthrough, but not on stereo AAC.

Xtropy: What version of XBMC are you using? I use a recent nightly, updated about once a week. I just installed 20130425 today. It's certainly possible that different version behave differently. Have you tried playing a file with 2 channel AAC and checking whether you get LPCM and/or PLII lights on your receiver? I get LPCM, but no PLII in this case, unless I set my XBMC audio output to analog.

I am not running a latest nightly, only 12.1 as it's stable and don't see a need to play with the nightlies. The only difference besides the version is that I have "Multichannel-LPCM" unchecked even though I have a LPCM compatible receiver. I also have AAC compatible receiver unchecked in settings. If you uncheck those flags in audio settings do you get PLII lights on the receiver?
(2013-04-26, 19:10)PalleO Wrote: [ -> ]The thing I fail to understand is how you Mac developers can write a new Audioengine, but can't fix the errors following? No intention in creating a hate for you guys, I think you're doing a great job! :-)
As far as I know, the OS X version worked much better with audio in the earlier versions of Xbmc. So how come you didn't stick to the original audio code?

I really hope that it will get fixed. I love xbmc and with my setup, I can't see how I should be able to replace my Mac with another platform.

Thats pretty easy to understand. The guys who did the audio engine (incl. the dev doing the osx part) just quit doing that stuff. Its as easy as that. And for us outstanding devs there is not much motivation on trying to clean a mess which we don't understand. Shit happens.
Pages: 1 2