boxeebox-xbmc icon indicating copy to clipboard operation
boxeebox-xbmc copied to clipboard

Enable S/PDIF and other audio options again

Open quarnster opened this issue 10 years ago • 15 comments

quarnster avatar Aug 28 '13 16:08 quarnster

The current operation is fine for me, but these more advanced options should probably be added back in.

Not sure I have the means to verify that everything is correct though, so might need help here.

quarnster avatar Aug 29 '13 07:08 quarnster

For my understanding, currently it only supports S/PDIF PCM.

If possible, it would be nice to support S/PDIF RAW

rjorge77 avatar Aug 29 '13 10:08 rjorge77

Must be enabled now within xbmc, go to system en change to advanced to expert mode.

devilstrike avatar Nov 06 '13 20:11 devilstrike

You still can't choose output, greyed out for me at least. This might not matter to most, but since I want to have HDMI for default and passthrough to S/PDIF I will look into it in the future.

SpaceOgre avatar Nov 07 '13 00:11 SpaceOgre

you can choose here hdmi analoog and spidf whene set to expert mode.

Edit// with alpha10 that option is gone indeed, on alpha8/9 there whas that option.

devilstrike avatar Nov 07 '13 06:11 devilstrike

What's the latest status on Audio? I was given a sony DAV-S300 which is 5.1 capable so might be able to hack on this myself now.

Any particular reason for this one re SPDIF?

  // can not support more than 2 channels on anything other than HDMI
  if (channels > 2 && (bIsSPDIF || bIsAnalog))
    channels = 2; 

Also any idea how to tweak Airplay support to be more responsive? Might be a client side issue, but it takes ~2 seconds from the point a press "pause" on my laptop until the audio actually pauses in kodi (just got master of quarnster/boxeebox-xbmc built a while ago, thanks for keeping it up to date @quasar1).

(Also pinging @KeyserSoze1 as he's not already in this thread and was looking at audio IIRC.)

quarnster avatar Nov 20 '14 16:11 quarnster

I've been unfortunately busy with other things lately and haven't had much time to work on the Boxee xbmc port. But as for your question. SPDIF is only 2 channels when transmitted over the wire. The encoding provides the additional channels when decoded by the receiver. HDMI allowed more than 2 channels to be transmitted. So as I recall, the calculations using that variable needs to be 2. Hope that makes sense.

KeyserSoze1 avatar Nov 20 '14 17:11 KeyserSoze1

Let me update the status of the audio if I can remember. All options are now able to be enabled (Analog, SPDIF, and HDMI). An All option was also enabled but as I recall it's essentially a stereo downconvert on all outputs. I had problems with DD 5.1 and my receiver but since I worked on this I've found an XBMC bug in the way they handle passthrough that causes the issue on certain receivers (they can't properly detect Dolby digital).

As I recall here's where codec support was left.

DD - Working for most. This goes into my XBMC issue. This should probably be changes and the fix handled in XBMC. So right now XBMC passes the encoded stream into our code and then the boxee hardware takes that and re-encodes it and passes it back out. This fixed the issue for me where my receiver couldn't detect DD. However I believe it is causing issues potentially for others.

DTS - Working as far as I know. DD should be handled the same as this

DD+ - Working over HDMI as far as I'm aware

DTS-MA/TrueHD - I honestly am having a hard time remembering exactly where I had this. But as I recall one of them was working with dropouts and the other is completely dysfunctional.

KeyserSoze1 avatar Nov 20 '14 17:11 KeyserSoze1

Nice to hear from you guys again it's been a long time. I welcome any input or regained enthusiasm from anyone with the mad coding skills that I sadly lack ;)

I look back in frustration that I couldn't do more in the beginning to help out, so one year later I do have a better idea of how XBMC/Kodi works.

With regards to the pause audio in Airplay for me it stops and starts near instantly. This is using the McTube app and using the latest Kodi Helix Beta2 test build. iOS8.1 (set for iOS8 in Kodi settings). https://github.com/quasar1/boxeebox-xbmc/releases/tag/v1.6-alpha_Helix

I haven't tested pause on the Gotham 13.2 Final but I will test that and get back to you.

BTW. on a side note, video seek ahead +30s seems to work (via Kodi coding) perfectly, only chapter skip and on certain files is a little bit flaky. I have also found that if you have a larger audio offset that causes the seek to become less responsive.

EDIT, must be a Gotham issue as I get the '2 seconds to pause' issue too on the Gotham 13.2 Final. I also don't get a video output only audio... just investigating why.

quasar1 avatar Nov 20 '14 18:11 quasar1

EDIT2, well the conclusion is related to the iOS version. On iOS7.1.2 with Gotham 13.2 Final I get video output and pause works instantly, with iOS8.1 Airplay has no picture and pause takes 2 seconds to stop the audio. So, if you want reliable AirPlay on iOS8+ you want the latest Helix Beta2. There are settings for iOS8 in the Kodi settings menu for AirPlay. Just noticed you mentioned laptop... doh!"

quasar1 avatar Nov 20 '14 18:11 quasar1

Aaaand after uncomfortable reaching in and trying to hook up the optical cable, I end up pulling the receiver out to see what I'm doing only to notice that the area where the manual says there is an optical input slot, on mine there is none. Quoth the Raven; d'oh! ;)

Oh well, atleast I can play back dvd's that are 5.1 capable with it. Back to idling...

quarnster avatar Nov 21 '14 14:11 quarnster

We have to wait until quarnster gets given a brand new receiver before he starts any new audio work.... better start a donation fund! :P

quasar1 avatar Nov 21 '14 15:11 quasar1

While I haven't had anytime to work on this recently. I don't like leaving @quasar1 as the only guy keeping things moving (and doing one heck of a job btw). I really want to figure out the XBMC issue and fix it on their end but its complicated. I believe a specific bit (setting whether the incoming packets are PCM or encoded) is not being set correctly over SPDIF/HDMI because they are passing out encoded streams and telling the audio drivers its just PCM. Most equipment doesn't rely on that bit but it appears a few do. There is no easy fix for this that I can think of though. Each audio handler would have to do something specific to work around it. For Boxee we should probably just skip the IEC61937 packer and just pass the packets raw into the Boxee hardware and let it handle it.

I guess what I'm saying is, get @quarnster that new receiver ASAP. Getting a new set of eyes on this stuff would be a good thing :).

KeyserSoze1 avatar Nov 21 '14 15:11 KeyserSoze1

@KeyserSoze1 Some people get issues with audio drop-outs but I have never experienced many, only on a certain build where you made some changes during the testing of your changes. Hardware probably plays a part in it as does the variation in peoples AV equipment. One thing I noticed (very rarely) was losing audio altogether, but a reboot sorted the problem out.

It would be great if we could get the kernel updated and run it without hi-jacking the Boxee kernel as that may be part of all the audio issues some see. The Intel drivers seem to be an issue and still is today for most of the Intel chipsets with regards to audio. My Qnap NAS has XBMC Frodo and all the audio problems are all down to Intel not updating their drivers to fix similar issues the boxee has.

On the other hand we must be grateful for what we have and give thanks to the people who hacked it, cigamit for his work and quarnster for proving the nay-sayers wrong and of course yourself for the enhancements to the audio side of things. Not forgetting SpaceOgre for his contributions and devilstrike for distributing the builds. The Boxee is getting a bit old hat but it works better than my NAS XBMC which is higher spec hardware, so that says it all. If you do the heatsink mods and put in a better fan it seems to play Flash video @720p in software mode (100% cpu) pretty well. Stay away from the SdCard mount method and you should have no issues, but with many new comers that's the first thing they do and they get many problems as a result. I am not sure how well the internal method of running it works but that seems more convenient to some but you are restricted by the size of the flash drive.

quasar1 avatar Nov 22 '14 09:11 quasar1

You are right about the audio part, just tested it and it seems also avr related, om my yamaha i get 3a4 times a hour audio drop with hdmi and spidf, whene i use my old simple avr is works without drops.

Seems indeed that some avr need some bits to get it works and some dont need it.

But for the rest it is running without big issues.

devil-strike avatar Nov 22 '14 09:11 devil-strike