Kodi Community Forum
Android Passthrough Changes with v17 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: Android Passthrough Changes with v17 (/showthread.php?tid=289735)



RE: Passthrough Changes with v17 - Etzi - 2017-01-21

(2017-01-19, 23:43)Etzi Wrote:
(2017-01-19, 22:22)fritsch Wrote: Edit: Making you a build with only 448 kbit/s and the livetv workaround that is too intrusive for general android: http://jenkins.kodi.tv/job/Android-ARM/10724/ <- will have "not so shitty" in its name :-)

Will test it on weekend, planning to watch some movies... Big Grin
Not sure about LiveTV testing as I don't use it, I have separate STB provided by ISP and they use encryption so you cannot watch those streams without it.

For reference it is: http://mirrors.kodi.tv/test-builds/android/arm/kodi-20170119-28c689e-notsoshitty-armeabi-v7a.apk

Installed, have watched two movies with DTS via Transcoding so far, no audio issues...5.1 works like charm... Tongue


RE: Passthrough Changes with v17 - fritsch - 2017-01-21

Perfect. Thanks for the feedback.


RE: Passthrough Changes with v17 - Etzi - 2017-01-21

(2017-01-21, 14:31)fritsch Wrote: Thanks for the feedback.

Nope, all the thanks goes to you, for that workaround...
And at least it is not so nasty and unreliable as PCM hack (which does not work on these chipsets anyway).


RE: Passthrough Changes with v17 - picad - 2017-01-21

(2017-01-20, 20:36)fritsch Wrote: You toyed with ADSP - fix that first.

fritsch
How can I fix the error ADSP?


RE: Passthrough Changes with v17 - Martijn - 2017-01-21

Turn it off


RE: Passthrough Changes with v17 - Etzi - 2017-01-21

Hehe...and...managed to produce that audio sync issue again...

Interestingly, it happens after resample rate is switched from Medium to High and/or after Output configuration is switched from Optimized to Best Match.
When switching those settings back to previous, it does not recover, restarting Kodi or whole TV does not have any effect as well.

Deleted userdata folder, it recovered...so it is somehow related to that and I don't think it is directly audio related.
Debug log is on its way (reproducing issue while logging is running)... Tongue

1. Playing back movie, everything in sync
2. Changed mentioned settings
3. Playing back movie, audio seriously ahead of video
4. Changed settings back
5. Playing back movie, audio still seriously ahead of video

http://paste.ubuntu.com/23840695

Anyway, unless you start seriously messing around with default settings (except enabling transcoding)...everything still works.


RE: Passthrough Changes with v17 - wesk05 - 2017-01-22

Is IEC61937 HD Audio passthrough not enabled in Krypton for the Shield update 5.0 (Android N)? It seems to be still using RAW passthrough. IEC61937 HD audio passthrough is working with the SPMC 16.6.0 beta.

Kodi Log
SPMC Log


RE: Passthrough Changes with v17 - fritsch - 2017-01-22

No.

Quote:12:29:36.203 T:1560271136 DEBUG: AESinkAUDIOTrack: Using IEC PT mode: 13
12:29:36.203 T:1560271136 DEBUG: 8 Channel PT via IEC61937 is supported

Doing as it should

Quote:12:29:45.577 T:1570732320 DEBUG: CAESinkAUDIOTRACK::Initialize returned: m_sampleRate 192000; format:AE_FMT_S16LE; min_buffer_size 262400; m_frames 8200; m_frameSize 16; channels: 8
12:29:45.577 T:1759496480 DEBUG: CVideoPlayerVideo::CalcDropRequirement - hurry: 0
12:29:45.579 T:1570732320 DEBUG: CActiveAESink::OpenSink - AUDIOTRACK Initialized:
12:29:45.579 T:1570732320 DEBUG: Output Device : android
12:29:45.579 T:1570732320 DEBUG: Sample Rate : 192000
12:29:45.579 T:1570732320 DEBUG: Sample Format : AE_FMT_S16NE
12:29:45.579 T:1570732320 DEBUG: Channel Count : 8
12:29:45.579 T:1570732320 DEBUG: Channel Layout: FL,FR,FC,LFE,BL,BR,SL,SR
12:29:45.579 T:1570732320 DEBUG: Frames : 8200
12:29:45.579 T:1570732320 DEBUG: Frame Size : 16

As said multiple times:
Quote:12:29:45.678 T:1560271136 NOTICE: Display resolution ADJUST : 1920x1080 @ 24.000000 - Full Screen (22) (weight: 0.000)
12:29:45.681 T:1570732320 DEBUG: Draining Audio

Refreshrate switching will break it. If it works it works by luck. Nvidia does not support it - they know their drivers are misbehaving, but it's not ontop of the list to fix it. And even if they fixed it - kodi needs to do additional work to do it properly.


RE: Passthrough Changes with v17 - wesk05 - 2017-01-22

(2017-01-22, 22:49)fritsch Wrote: No.
I'm confused with your reply Smile Are you saying it is not enabled in Kodi Krytpon?

The log shows RAW passthrough, right?


RE: Passthrough Changes with v17 - fritsch - 2017-01-22

You see that quite nicely in the SPMC log:
Quote:12:34:04.868 T:1558173984 DEBUG: CEGLNativeTypeAndroid: SetNativeResolution: 13: [email protected]
12:34:04.877 T:1558173984 DEBUG: CreateWindow: Created surface of size 1920x1080
12:34:04.879 T:1606420768 NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 10
12:34:04.880 T:1558173984 NOTICE: Previous line repeats 1 times.
12:34:04.881 T:1558173984 INFO: GLES: Maximum texture width: 16384
12:34:04.881 T:1558173984 DEBUG: CRenderManager::UpdateDisplayLatency - Latency set to 0 msec
12:34:04.882 T:1558173984 DEBUG: ------ Window Init (VideoFullScreen.xml) ------
12:34:04.885 T:1558173984 DEBUG: RenderUpdate: Dest - 0.000000+0.000000-1920.000000x1080.000000
12:34:04.885 T:1558173984 DEBUG: RenderUpdate: Adj - 0.000000+0.000000-1920.000000x1080.000000
12:34:04.962 T:1606420768 DEBUG: CDVDPlayerAudio::HandleSyncError - average error -15942.536978 below threshold of 50000.000000
12:34:04.962 T:1606420768 DEBUG: CDVDClock:Big Griniscontinuity - CDVDPlayerAudio::HandleSyncError2 - was:-366791.093219, should be:-382733.265197, error:-15942.171978
12:34:05.960 T:1564465440 ERROR: CAESinkAUDIOTRACK::AddPackets write returned error: -12(95232)
12:34:05.960 T:1564465440 ERROR: CActiveAESink::OutputSamples - sink returned error
12:34:05.992 T:1564465440 DEBUG: CAESinkAUDIOTRACK:Confusedtopiing audiotrack
12:34:05.997 T:1564465440 INFO: CActiveAESink::OpenSink - initialize sink
12:34:05.997 T:1564465440 DEBUG: CActiveAESink::OpenSink - trying to open device AUDIOTRACK:AudioTrackPT
12:34:05.997 T:1564465440 DEBUG: CAESinkAUDIOTRACK::Initialize requested: 0x5cb5d400, sampleRate 192000; format: AE_FMT_DTSHD(21); channels: 8
12:34:06.012 T:1564465440 ERROR: AESinkAUDIOTRACK - Unable to create AudioTrack

And then evil happens:

Quote:12:34:06.012 T:1564465440 ERROR: AESinkAUDIOTRACK - Unable to create AudioTrack
12:34:06.013 T:1564465440 DEBUG: CActiveAESink::OpenSink - trying to open device AUDIOTRACK:AudioTrackPCM
12:34:06.013 T:1564465440 DEBUG: CAESinkAUDIOTRACK::Initialize requested: 0x5cb5d400, sampleRate 192000; format: AE_FMT_DTSHD(21); channels: 8

PCM hack going active.

Just poorly named in this combination.


RE: Passthrough Changes with v17 - fritsch - 2017-01-22

(2017-01-22, 22:51)wesk05 Wrote:
(2017-01-22, 22:49)fritsch Wrote: No.
I'm confused with your reply Smile Are you saying it is not enabled in Kodi Krytpon?

The log shows RAW passthrough, right?

We use IEC passthrough on Krypton (if supported by firmware). This is what the log says. No raw passthrough. Why it does not work is "Adjust Refresrhate to match video" ... this is severely broken. I linked you the SPMC log to demonstrate it's also fully broken there.


RE: Passthrough Changes with v17 - wesk05 - 2017-01-22

(2017-01-22, 23:00)fritsch Wrote: We use IEC passthrough on Krypton. This is what the log says. No raw passthrough. Why it does not work is "Adjust Refresrhate to match video" ... this is severely broken. I linked you the SPMC log to demonstrate it's also fully broken there.
I will check again without "Adjust refreshrate...."

In SPMC, right after the error that you linked, it shows this:
DEBUG: CAESinkAUDIOTRACK::Initialize returned: m_sampleRate 192000; format:AE_FMT_DTSHD(21);


RE: Passthrough Changes with v17 - fritsch - 2017-01-22

And yeah - no need to test. I wrote the code for IEC - two months ago on the firmware you got a week ago. I know it is working :-)


RE: Passthrough Changes with v17 - Supernovasx - 2017-01-22

(2017-01-21, 14:25)Etzi Wrote:
(2017-01-19, 23:43)Etzi Wrote:
(2017-01-19, 22:22)fritsch Wrote: Edit: Making you a build with only 448 kbit/s and the livetv workaround that is too intrusive for general android: http://jenkins.kodi.tv/job/Android-ARM/10724/ <- will have "not so shitty" in its name :-)

Will test it on weekend, planning to watch some movies... Big Grin
Not sure about LiveTV testing as I don't use it, I have separate STB provided by ISP and they use encryption so you cannot watch those streams without it.

For reference it is: http://mirrors.kodi.tv/test-builds/android/arm/kodi-20170119-28c689e-notsoshitty-armeabi-v7a.apk

Installed, have watched two movies with DTS via Transcoding so far, no audio issues...5.1 works like charm... Tongue

Watched 3 movies this weekend with DTS, DTS-HD, True HD. All transcoded to Dolby digital and no Audio issues. Like Etzi Says, works like a charm on my Sony Bravia Wink


RE: Passthrough Changes with v17 - fritsch - 2017-01-22

@Supernovasx: Yeah - nice to hear. v18 development also starts nicely. peak3d is currently porting Android and AMLogic ...so it won't get worse in the future :-)