2024-02-04, 08:25
During the development of version 21 a huge load of fixes were done, find a small documentation below, categorized as follows:
- Transparently (no need to do anything)
- More ore less FW bug workarounds (user has to explicitely enable them)
- Known issues that won't be fixed.
- Changes related to Audio
Transparently:
- TrueHD delay fixes were done and tested for month in a dedicated thread. Here especially Shield shortcomings of the audio driver implementation which caused fluctuating delay due to large software period size in their Audio-Hal resulted in skip issues in the renderer. An automated delay learner checks that - on every box - and adjusts that during the first view seconds: https://github.com/xbmc/xbmc/pull/22870 - you can additionally control this offset by specifying an advancedsetting value, if you feel the need, choose a value between 10 and 100:
- Channel Mapping. It was found out, that basically every box we tested is unable to properly do 3.0, 3.1 or 4.0, 5.0 or 6.0. Kodi opened that channel configuration perfectly, the Audiotrack also took it nicely, but sadly under the hood only 2.0 stereo was output. As a workaround kodi opens 2.0 for 2 channels and 5.1 for more than 2 channels but less than 6 channels, and 7.1 for more than 6 channels: https://github.com/xbmc/xbmc/pull/24554
More or less FW bug workarounds (action is needed, if you have an affected box):
- The FireTV Cube 3rd Gen was the first box who had a broken delay firmware on startup. That means it consumed up to 2 seconds audio without playing a single bit, then just to reopened its internal Sink, throwing seconds of audio away without telling the clients. Result: Huge out of sync on those devices. Fun-Fact: Other devices using same Amlogic BSP are affected as well. A workaround for tracking that issue inside kodi was implemented, but sadly this broke "semi-broken" devices like the Ugoos box, which would also open with 160 ms buffer, but consume up to 480 ms of data before moving, but afterwards having a more or less proper audio-sync. Result: We could not enable this workaround by default, cause of breaking other boxes. This had to be changed from "enabled by default" to opt-in short before v21 release.
If you have a FireTV Cube 3rd Gen and your audio is really "seconds off" when doing IEC Passthrough, you will need to have the following advancedsettings.xml for v21 stable in place: https://github.com/xbmc/xbmc/pull/24597
- Multi-channel lossless output. Again many Android firmwares, among others "old FireTV Cube 2nd" and "old FireTV 4K Max" have an issue outputting multi-channel PCM content in higher precission than 16 bit, while other boxes (Shield) and Firetv 4K Max 2nd Gen or FireTV Cube 3rd Gen, among others can nicely do that. As always in Android world, it might change daily with a vendor or firmware update, which is the reason whitelists are no solution, it changes faster than we can build. As having it by default would break a huge load of boxes, I tried in v19 iirc, but you can enable that via and advancedsetting: https://github.com/xbmc/xbmc/pull/24553
See also the wiki: https://kodi.wiki/view/Advancedsettings.xml#audio
- Known issues that won't be fixed:
RAW Passthrough was most likely the worst idea ever that Android folks had to implement. Reason for this: They don't provide any functionality to fill the sink (delay problems) or even move data out of the sink when seeking (same issue). So in comparison to IEC there are no pause bursts possible to be generated and the implementations to cope with that heavily differ. Some boxes seem to create pause bursts if you pause the Audiotrack sink, other boxes don't do that and will silently fail the moment you do. During kodi development cycle we had enabled sometimes one or the other, while people heavily complained that now their (Sony) TV is broken but worked before. While Shield users said: Works now great, was broken before. Out of that reason every change for RAW passthrough was reverted - in short: we won't waste any energy here anymore. If it works for you, use it - if your firmware cannot seek: sorry for that, works as designed: https://github.com/xbmc/xbmc/pull/22945
- Changes related to Audio:
Refreshrate switching workarounds were incorporated affecting behaviour of kodi in two positive ways:
- When switching during startup, remember that decision and properly enumerate audio afterwards
- On resume, when e.g. kodi was moved in background, AVR went off, rescan for audio devices
- See: https://github.com/xbmc/xbmc/pull/24484
This thread documents changes only, it is not meant as "my stream buffers support channel".
- Transparently (no need to do anything)
- More ore less FW bug workarounds (user has to explicitely enable them)
- Known issues that won't be fixed.
- Changes related to Audio
Transparently:
- TrueHD delay fixes were done and tested for month in a dedicated thread. Here especially Shield shortcomings of the audio driver implementation which caused fluctuating delay due to large software period size in their Audio-Hal resulted in skip issues in the renderer. An automated delay learner checks that - on every box - and adjusts that during the first view seconds: https://github.com/xbmc/xbmc/pull/22870 - you can additionally control this offset by specifying an advancedsetting value, if you feel the need, choose a value between 10 and 100:
Code:
<advancedsettings>
<audio>
<maxpassthroughoffsyncduration>80</maxpassthroughoffsyncduration>
</audio>
</advancedsettings>
More or less FW bug workarounds (action is needed, if you have an affected box):
- The FireTV Cube 3rd Gen was the first box who had a broken delay firmware on startup. That means it consumed up to 2 seconds audio without playing a single bit, then just to reopened its internal Sink, throwing seconds of audio away without telling the clients. Result: Huge out of sync on those devices. Fun-Fact: Other devices using same Amlogic BSP are affected as well. A workaround for tracking that issue inside kodi was implemented, but sadly this broke "semi-broken" devices like the Ugoos box, which would also open with 160 ms buffer, but consume up to 480 ms of data before moving, but afterwards having a more or less proper audio-sync. Result: We could not enable this workaround by default, cause of breaking other boxes. This had to be changed from "enabled by default" to opt-in short before v21 release.
If you have a FireTV Cube 3rd Gen and your audio is really "seconds off" when doing IEC Passthrough, you will need to have the following advancedsettings.xml for v21 stable in place: https://github.com/xbmc/xbmc/pull/24597
Code:
<advancedsettings>
<audio>
<superviseaudiodelay>true</superviseaudiodelay>
</audio>
</advancedsettings>
Code:
<advancedsettings>
<audio>
<allowmultichannelfloat>true</allowmultichannelfloat>
</audio>
</advancedsettings>
See also the wiki: https://kodi.wiki/view/Advancedsettings.xml#audio
- Known issues that won't be fixed:
RAW Passthrough was most likely the worst idea ever that Android folks had to implement. Reason for this: They don't provide any functionality to fill the sink (delay problems) or even move data out of the sink when seeking (same issue). So in comparison to IEC there are no pause bursts possible to be generated and the implementations to cope with that heavily differ. Some boxes seem to create pause bursts if you pause the Audiotrack sink, other boxes don't do that and will silently fail the moment you do. During kodi development cycle we had enabled sometimes one or the other, while people heavily complained that now their (Sony) TV is broken but worked before. While Shield users said: Works now great, was broken before. Out of that reason every change for RAW passthrough was reverted - in short: we won't waste any energy here anymore. If it works for you, use it - if your firmware cannot seek: sorry for that, works as designed: https://github.com/xbmc/xbmc/pull/22945
- Changes related to Audio:
Refreshrate switching workarounds were incorporated affecting behaviour of kodi in two positive ways:
- When switching during startup, remember that decision and properly enumerate audio afterwards
- On resume, when e.g. kodi was moved in background, AVR went off, rescan for audio devices
- See: https://github.com/xbmc/xbmc/pull/24484
This thread documents changes only, it is not meant as "my stream buffers support channel".