[8.0.2e] LibreELEC 8.0 for S905/S905X


  • Do you have "Sync playback to display" enabled?

    Yes I did :( ... might have been on by default ?

    I moved back to my Atom+ION2 ... and finally updated to LE ... (was still on OpenELEC ... didn't realized its fate ) ... and had the same problem. Just had googled this for Kodi in general ... http://forum.kodi.tv/showthread.php?tid=292983&pid=2492915#pid2492915  - and this resolved my Atom+ION2 issue. I'll go back to the ARM later ... but suspect this was the issue.

    Would have been the last thing to think of.

    Thanks!


  • I'm sorry but I don't know how kernel audio driver works and I tinker only with the easiest part. I cannot help with resolving your issues.

    What I can tell is Amlogic audio driver is very, very messy and works only in some configurations. It needs fixing or a complete rewrite.

    There's still some hope that Kwiboo will find some time to work on driver or someone else with knowledge picks this up...

    I did some more testing with downloaded clips. 5.1 audio plays back fine at 192kHz. It's just the stereo audio that won't so I think it's selecting the wrong playback format. Works if I use "fixed" sample rate of 192kHz.

    kszaq - what did you change to enable 192kHz playback on S905X?

  • I have a problem with HVEC stream from iptv, this is the log while change from a channel in h264 and after to a channel in HVEC,
    In Kodi for pc work correctly, but in libreelec and android is not working and I have to switch off and on the box to restart the video.
    Seems that the video go to a totaly wrong value.
    Please Kszaq can you see what is appening?
    Thank you.

    [ 351.776625@3] codec:video_blackout_policy_store(0)
    [ 351.776728@3] [tsync_avevent]event:1, param 1
    [ 351.776738@3] video pause!
    [ 351.795538@0] codec:video_receiver_event_fun: sent uevent FRAME_RATE_END_HINT
    [ 351.795656@0] DI: di_receiver_event_fun , is_bypass() 1 trick_mode 0 bypass_all 0
    [ 351.795668@0] di_receiver_event_fun: vf_notify_receiver unreg
    [ 351.795696@1] DI: di_task_handle,up enter unreg process.
    [ 351.795709@1] DI: di_unreg_process unreg start 1.
    [ 351.795735@1] codec_mm:NULL mem_handle for keeper!!
    [ 351.795765@1] codec:alloced keep buffer yaddr=0000000078b00000,u_addr=0000000078f00000,v_addr=0000000079000000
    [ 351.795779@1] codec:vf_keep_current keep_y_addr=0000000078b00000 763c3000
    [ 351.795790@1] codec:ge2d_store_frame_NV21 cur_index:s:0x626160
    [ 351.795806@1] codec:ge2d_store_frame d:0xd9d8
    [ 351.799382@1] codec:vf_keep_current: VIDTYPE_VIU_NV21
    [ 351.799402@1] codec:vf_keep_current: keep video on with keep
    [ 351.799413@1] [tsync_avevent]event:2, param 0
    [ 351.799425@1] codec:video first pts = 0
    [ 351.799448@1] DI: di_unreg_process unreg stop 0.
    [ 351.799460@1] DI: di_task_handle,up enter unreg process.
    [ 351.799471@0] DI: di_unreg_process_irq unreg irq start.
    [ 351.799510@0] di_unreg_process_irq unreg irq stop.
    [ 351.805743@0] DI: di_receiver_event_fun:unreg_req_flag_cnt:0 timerc_cnt 39500!!!
    [ 351.805842@0] codec:vdec1 video changed to 0 x 0 0 fps clk->200MHZ
    [ 351.806424@0] codec:vdec_create instance ffffff8004b8a000, total 1
    [ 351.806537@0] codec:Video stbuf alloced at 0000000075200000, size = 3145728
    [ 351.806564@0] codec:vdec_init, dev_name:amvdec_h264, vdec_type=VDEC_TYPE_SINGLE
    [ 351.806574@0] codec:vdec_init set vfm decoder ffffff8004b8a000
    [ 351.806586@0] codec:vdec_dev_reg.mem[0x75500000 -- 0x784fffff]
    [ 351.815376@0] codec:H264 sysinfo: 1280x720 duration=3840, pts_outside=1,
    [ 351.815818@0] codec:vdec_request_irq ffffffc0015b30a0, vh264-irq
    [ 351.815901@0] DI: di_receiver_event_fun: vframe provider reg
    [ 351.815954@0] DI: di_task_handle,up enter reg process.
    [ 351.825975@0] DI: di_receiver_event_fun:reg_req_flag_cnt:0!!!
    [ 351.826013@0] set run_early_proc_fun_flag to 1
    [ 351.826432@0] codec:video_receiver_event_fun: sent uevent FRAME_RATE_HINT=3840
    [ 351.826499@0] codec:vdec_init, vf_provider_name =
    [ 351.827133@0] codec:video first pts = 0
    [ 351.827152@0] codec:vdec_request_irq ffffffc0015a4b28, parser
    [ 351.827438@0] codec:video_blackout_policy_store(1)
    [ 353.249032@2] codec:DisableVideoLayer()
    [ 353.265550@0] codec:video_receiver_event_fun: sent uevent FRAME_RATE_END_HINT
    [ 353.265600@0] DI: di_receiver_event_fun , is_bypass() 0 trick_mode 0 bypass_all 0
    [ 353.265602@0] di_receiver_event_fun: vf_notify_receiver unreg
    [ 353.265621@0] DI: di_task_handle,up enter unreg process.
    [ 353.265622@0] DI: di_unreg_process unreg start 1.
    [ 353.265629@0] codec:DisableVideoLayer()
    [ 353.265630@0] codec:disbled keep video before free keep buffer.
    [ 353.265631@0] codec:disbled video for next before free keep buffer!
    [ 353.265633@0] codec:DisableVideoLayer()
    [ 353.265636@0] codec:free_alloced_keep_buffer 0000000078b00000.0000000078f00000.0000000079000000
    [ 353.265644@0] codec:free_alloced_keep_buffer (null). (null). (null)
    [ 353.265646@0] [tsync_avevent]event:2, param 0
    [ 353.265649@0] codec:video first pts = 0
    [ 353.265656@0] DI: di_unreg_process unreg stop 0.
    [ 353.265657@0] DI: di_task_handle,up enter unreg process.
    [ 353.265660@0] DI: di_unreg_process_irq unreg irq start.
    [ 353.265679@0] di_unreg_process_irq unreg irq stop.
    [ 353.268174@0] codec:VsyncDisableVideoLayer
    [ 353.268175@0] codec:AFBC off now.
    [ 353.276246@2] DI: di_receiver_event_fun:unreg_req_flag_cnt:0 timerc_cnt 39651!!!
    [ 353.278781@2] codec:video_disable_store(1)
    [ 353.278785@2] codec:DisableVideoLayer()
    [ 353.278789@2] codec:free_alloced_keep_buffer (null). (null). (null)
    [ 353.278824@2] vfm_map_store:rm default
    [ 353.278849@2] vfm_map_store:add default decoder ppmgr deinterlace amvideo
    [ 353.288174@0] codec:VsyncDisableVideoLayer
    [ 353.288175@0] codec:AFBC off now.
    [ 353.315662@2] vfm_map_store:rm default
    [ 353.315687@2] vfm_map_store:add default
    [ 353.315844@2] vfm_map_store:rm default
    [ 353.315868@2] vfm_map_store:add default decoder ppmgr deinterlace amlvideo amvideo
    [ 353.316096@2] codec:vdec_create instance ffffff8004bbb000, total 1
    [ 353.316157@2] codec:HEVC stbuf alloced at 0000000075200000, size = 6291456
    [ 353.316163@2] codec:vdec_init, dev_name:amvdec_h265, vdec_type=VDEC_TYPE_SINGLE
    [ 353.316164@2] codec:vdec_init set vfm decoder ffffff8004bbb000
    [ 353.316167@2] codec:vdec_dev_reg.mem[0x0 -- 0x0]
    [ 353.316171@2] codec:vdec base memory alloced [0000000075800000 -- 00000000778fffff]
    [ 353.435061@2] codec_mm:end: cached pages: 16384, speed 120 ms
    [ 353.435069@2] [0]h265:pts_unstable=0
    [ 353.435072@2] [0]h265: ver (201602101,0) decinfo: 1280x720 rate=3840
    [ 353.435407@2] [0]vh265 mmu ucode loaded!
    [ 353.435658@2] DI: di_receiver_event_fun: vframe provider reg
    [ 353.435678@2] DI: di_task_handle,up enter reg process.
    [ 353.445685@2] DI: di_receiver_event_fun:reg_req_flag_cnt:0!!!
    [ 353.445689@2] set run_early_proc_fun_flag to 1
    [ 353.446572@2] codec:video_receiver_event_fun: sent uevent FRAME_RATE_HINT=3840
    [ 353.446670@2] codec:hevc video changed to 3840 x 2160 60 fps clk->667MHZ
    [ 353.446690@2] codec:vdec_init, vf_provider_name =
    [ 353.447066@2] codec:video first pts = 0
    [ 353.447069@2] codec:vdec_request_irq ffffffc0015a4b28, parser
    [ 353.447160@2] [tsync_avevent]event:1, param 1
    [ 353.447163@2] video pause!
    [ 353.447272@2] codec:video_freerun_mode_store(1)
    [ 353.447401@2] codec:video first checkin pts = 0
    [ 353.447403@2] codec:first check in vpts <0x0:0x0> ok!
    [ 353.535156@1] [0]set pic_list_init_flag 1
    [ 353.535167@1] [0]allocate begin
    [ 353.535169@1] [0]allocate end
    [ 353.536289@1] [0]init_decode_head_hw: (1280, 720) body_size 0x167600 header_size 0xf00
    [ 353.536292@1] [0]init_buf_spec2 1280 720
    [ 353.536294@1] [0]set pic_list_init_flag to 2
    [ 353.536311@1] [0]set pic_list_init_flag to 3
    [ 353.541548@1] [0]Bit depth luma = 13
    [ 353.541550@1] [0]Bit depth chroma = 13
    [ 353.541555@1] [0]Pic Width/Height Change (1280,720)=>(38002,37493), interlace 0
    [ 353.541562@1] [0]init_decode_head_hw: (38002, 37493) body_size 0xa9f68000 header_size 0x54fb40
    [ 353.541563@1] over size : 38002 x 37493.
    [ 412.333930@0] aml_snd_m8_card aml_m8_snd.46: I2S playback disable
    [ 412.333945@0] aml_snd_m8_card aml_m8_snd.46: IEC958 playback disable
    [ 412.333985@0] aml_spdif_dai: aml_hw_iec958_init,runtime->rate=48000, same source mode(1)
    [ 412.333989@0] aml_spdif_dai: share the same clock
    [ 412.333993@0] aml_spdif_dai: iec958 mode PCM16
    [ 412.334000@0] aml_audio_hw: IEC958 16bit
    [ 412.334006@0] hdmitx: audio: aout notify rate 48000
    [ 412.334009@0] hdmitx: audio: aout notify size 16
    [ 412.334013@0] hdmitx: audio: no update
    [ 412.334018@0] aml_snd_m8_card aml_m8_snd.46: i2s/958 same source
    [ 422.334489@0] aml_spdif_dai: enterd aml_spdif_play,set_clock:4,sample_rate=4
    [ 422.334647@0] aml_spdif_dai: set normal 512 fs /4 fs
    [ 422.334679@0] aml_audio_hw: IEC958 16bit
    [ 422.334704@0] hdmitx: audio: aout notify rate 48000
    [ 422.334722@0] hdmitx: audio: aout notify size 16
    [ 422.334739@0] hdmitx: audio: no update

  • Hi, can anyone suggest me a best cachebuffersize for my KII Pro 2GB/16GB model ?
    i have a severe buffering issue while using Vidmax and Break Videos. it takes upto 2 minute once after playing the Video to return to the list of Videos. and also it takes upto 30 seconds to play a Video.
    i have a 50 mbps connection and the other Videos like Movies from other Addons work great. it worked like a charm when i installed the new version at first. but after that it is lagging. DOes anyone have a clue why it is like that ? or is it just me or anyone else also facing the same issue ?

    i am waiting for a helping hand. Thanks in Advance.


  • Please Kszaq can you see what is appening?

    Once again I ask to read the first post and sticky post carefully to understand what I need to look into any playback related issue. I am unable to help if you post a random part of kernel log only.

    Hint: post a sample.

  • Still getting weird background changes every 2 seconds, with what looks like a red ghost, also on videos or back screen. Changing refresh rate does nothing. 8.0.1a still works fine.

    3840x2160p Refresh 60 - LG UHD

    Wish I could take a picture, but it occurs so quick....

    Lyle

    Found Issue - Bad HDMI 2 Cable.
    Please cancel :)

    Edited once, last by kf6dlq (April 5, 2017 at 11:01 PM).

  • For people who for some reason want to try 64bit 8.0.1c : LE – Google Drive
    LibreELEC-S905.aarch64-8.0-devel-20170406001607-r25777-gab328ab.img.gz
    [built verbatim from kszaq repository]
    I also rebuilt some TV related addons (none were updated since 8.0.1a)
    pvr.hts-3.4.19.1.zip
    pvr.iptvsimple-2.4.8.1.zip
    pvr.mythtv-5.0.9.1.zip
    service.tvheadend42-8.1.110.zip

  • Some interested questions re 64bit version from Nofan Tasi.
    Is the install the same as 32bit s905X hardware box version? ie copy to update directory and reboot? Does it need the same tree or is none ok?
    If there are problems can roll back to 32bit version (assuming directory update is available)?
    Does current 32bit addons install and work or only 64bit updates?
    thanks for info on this release.


  • minsik

    Thanks for asking.

    I should in fact perhaps repeat upon every update.

    - 64bit image is built from same code as 32bit one, all credits to our
    hero kszaq.

    - I never ran 32bit image. I suppose going from 64bit image to 32bit
    image or vice versa is similar. Also, I always run from external SD.

    Perhaps a clean install on dedicated external SD is safest approach.

    - 32bit image will need less memory.

    - 32bit image runs more addons. One cannot mix 32bit and 64bit code
    So only addons without any binary code can work on both.

    - 32bit image can also, should this ever be needed, use 32bit code
    from android partitions. I doubt however if such would ever be needed
    for average use. And I also doubt if it would work.

    - It may be harder to find some 64bit addons. One may need to build
    them oneself.


    * In short: 32bit image has many advantages. 64bit image has some
    disadvantages.


    That said. For my, agreed, simple usage, 64bit image with some TV
    related addons works just fine. The few other addons I need work fine
    too.

    I use 64bit LE primarily to allow me to maintain a gentoo 64bit
    stage3 chroot. And because I have sufficient amount of RAM. And
    because I have a 64bit machine.

    I would say, use at own risk.

    Edited once, last by Nofan Tasi (April 6, 2017 at 1:41 AM).

  • But... Does it have any significant improvement talking about performance?

  • Thanks for Kszaq's great job!

    Is it a known bug, that you play video and use the rewind , only change time , but no more audio&video ?
    or it is refer to KII pro box?

  • Hello...

    Has anyone else noticed in the remote control buttons any "sticking effect"?

    That is when you push a button for going up or down and you need to push 2-3 times to get it done...

    My remote works alright at the start but after 1 minute or so it stops working fast... If i hold the button pressed the menu options are not scrolling smoothly or if i want to go up or down i need to press the button 2 or 3 times...

  • Sorry should have put that in...

    Its a Tonbux Q Box S905 2GB/16GB rooted I believe already.

    Im currently running it from SD Card but its very slow to respond and load box art etc so was going to backup android and use LIB as the OS hoping it will speed up. Sadly my good san disk ULTRA SD Card is now borked locked as read only so using a chap one which I think is why its slow.


    I run libreelec 8.0.1 (a/b/c) on both old 4gb sdhc class 4 on MXQ 4k Pro smoothly. External old 160gb get half power from USB power hub. Maybe power is the reason.

    Sent from my Venue 8 HSPA+ using Tapatalk

  • Hi Kszaq.

    I am getting a weird picture freeze with all the LE8 builds. Including the latest "c".
    I am playing TV using Simple IPTV PVR client. After a couple of hours (usually 4-5 hours) I have the below in log and the picture just "freezes".
    From the log, I can see that sometimes it does recover from it but then it just gets "stuck" with the "stream stalled" message and I need to manually stop the play, switch the channels a couple of times(just stop/play doesn't work after freeze!) and only then the video playback returns. There is no "buffering" circle, nothing. The picture just freezes.

    Is it related to running on s905 ? Is there any workaround to detect and restart the stream ?
    My box is S905x 2g/16gb (x96). The below happens both in your builds and builds that I did compile manually from your code.
    In the below log, the freeze happened at 05:38. I have came back to TV at around 11am and it was still showing a frozen picture.
    Can I somehow debug the problem further ? Looking at the KODI source where the log message is printed doesn't really help as I am not familiar with how it works and there is a "sleep(10)" in the code that doesn't make a lot of sense.

    Thank you for your work.

    Code
    00:40:26.399 T:3658511264  NOTICE: CVideoPlayerAudio::Process - stream stalled
    00:40:42.355 T:3930067872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    01:32:49.247 T:3658511264 WARNING: Previous line repeats 4 times.
    01:32:49.247 T:3658511264  NOTICE: CVideoPlayerAudio::Process - stream stalled
    01:32:58.030 T:3930067872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    02:36:04.393 T:3658511264 WARNING: Previous line repeats 1 times.
    02:36:04.393 T:3658511264  NOTICE: CVideoPlayerAudio::Process - stream stalled
    02:36:23.489 T:3930067872 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    05:38:09.192 T:3658511264 WARNING: Previous line repeats 1 times.
    05:38:09.192 T:3658511264  NOTICE: CVideoPlayerAudio::Process - stream stalled
  • I did some more testing with downloaded clips. 5.1 audio plays back fine at 192kHz. It's just the stereo audio that won't so I think it's selecting the wrong playback format. Works if I use "fixed" sample rate of 192kHz.

    kszaq - what did you change to enable 192kHz playback on S905X?

    Hi fat-tony,

    your audio issue seems to be very close to the issue then I have. All 44.1k two channel audio is upsampled to 48k and, if I try to force Kodi to use 88.1k is uses 96k (see my post here thread-1492.html?highlight=44.1). It was solved in one older version (7.0.2.009), but however the fix hat been reverted in all later versions.

    You may can try the version 7.0.2.009 and see if it works better for you.

  • Hi fat-tony,

    your audio issue seems to be very close to the issue then I have. All 44.1k two channel audio is upsampled to 48k and, if I try to force Kodi to use 88.1k is uses 96k (see my post here thread-1492.html?highlight=44.1). It was solved in one older version (7.0.2.009), but however the fix hat been reverted in all later versions.

    You may can try the version 7.0.2.009 and see if it works better for you.

    I don't think my issue is the same. My 44.1kHz / 48kHz / 88.2kHz / 96kHz / audio is all played back at the correct sampling rate according to my amplifier display. I only have issues with 176.4 / 192kHz stereo output. When I was using Kodi on android Marshmallow (the Chinese box default), everything was being re-sampled to 48kHz, but once I installed LibreELEC most of my audio issues went away. I think your problems may be with a setting error somewhere in Kodi. I will have a read of your issue and see if I can see anything.
    [hr]

    Edited once, last by fat-tony (April 6, 2017 at 10:32 AM).