• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
hardware acceleration on allwinner ( cedarv )
(2013-08-16, 10:17)rellla Wrote: afaik domenic built from https://github.com/rellla/xbmca10 latest stage/Frodo
rellla

I have done nothing magical here, just compiled the code provided by rella/empatzero/others I am sure. If he had the time I am sure could compile the stuff himself. Anyone with some Linux knowledge could follow the instructions and build this themselves as well. If only I was a coder I could contribute to making it work better...I hope baso4 comes forward and can provide his updated code to make this software even better!

Thanks rella for keeping the code current with base XBMC so we can all keep our A10/A20's working.

Domenic
Reply
hello,

i'm afraid i spreaded som false good news here, now i did more tests and all the builds, including mine, are crashing randomly when playing a stream or a video and here is an excerpt of the log :

V/XBMC ( 1626): 02:03:10 T:1345770888 DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
V/XBMC ( 1626): 02:03:10 T:1337103984 DEBUG: CDVDPlayer::HandleMessages - player started 1
V/XBMC ( 1626): 02:03:10 T:1337914360 WARNING: CDVDMessageQueue(video)::Get - asked for new data packet, with nothing available
F/libc ( 1626): Fatal signal 11 (SIGSEGV) at 0x00000418 (code=1), thread 3209 (org.xbmc.xbmc)
V/XBMC ( 1626): 02:03:10 T:1337103984 DEBUG: CDVDPlayer::SetCaching - caching state 0
V/XBMC ( 1626): 02:03:10 T:1289074696 DEBUG: CSoftAE::Run - Sink restart flagged
V/XBMC ( 1626): 02:03:10 T:1289074696 INFO: CSoftAE::InternalOpenSink - keeping old sink with : AE_FMT_FLOAT, FL,FR, 44100hz
V/XBMC ( 1626): 02:03:10 T:1289074696 DEBUG: CSoftAE::InternalOpenSink - Using speaker layout: 2.0
V/XBMC ( 1626): 02:03:10 T:1289074696 DEBUG: CSoftAE::InternalOpenSink - Internal Buffer Size: 33792
V/XBMC ( 1626): 02:03:10 T:1345770888 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1246.875000, should be:23219.954649, error:21973.079649
V/AudioPolicyManagerBase( 1175): startOutput() output 2, stream 3, session 104
V/AudioPolicyManagerBase( 1175): changeRefCount() stream 3, count 1
V/AudioPolicyManagerBase( 1175): getNewDevice() selected device 2
V/AudioPolicyManagerBase( 1175): setOutputDevice() output 2 device 0002 delayMs 0
V/AudioPolicyManagerBase( 1175): setOutputDevice() prevDevice 0002
V/AudioPolicyManagerBase( 1175): setOutputDevice() setting same device 0002 or null device for output 2
V/AudioPolicyManagerBase( 1175): stopOutput() output 2, stream 3, session 104
V/AudioPolicyManagerBase( 1175): changeRefCount() stream 3, count 0
V/AudioPolicyManagerBase( 1175): getNewDevice() selected device 0
V/AudioPolicyManagerBase( 1175): setOutputDevice() output 2 device 0000 delayMs 190
V/AudioPolicyManagerBase( 1175): setOutputDevice() prevDevice 0002
V/AudioPolicyManagerBase( 1175): setOutputDevice() setting same device 0000 or null device for output 2
I/DEBUG ( 1170): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1170): Build fingerprint: 'softwinners/sugar_ref001/sugar-ref001:4.2.2/JDQ39/20130606:eng/test-keys'
I/DEBUG ( 1170): Revision: '0'
I/DEBUG ( 1170): pid: 1626, tid: 3209, name: org.xbmc.xbmc >>> org.xbmc.xbmc <<<
I/DEBUG ( 1170): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000418
D/dalvikvm(16505): GC_CONCURRENT freed 387K, 10% free 5375K/5956K, paused 2ms+3ms, total 31ms
...
I/DEBUG ( 1170): backtrace:
I/DEBUG ( 1170): #00 pc 012afbec /data/app-lib/org.xbmc.xbmc-1/libxbmc.so (decode_one_slice+540)

this particularly happens if you stop the app and restart it again, so maybe something is missing in the initialization of the GPU or it's not reset correctly?? i only try to guess here.

regards,
sevy
Reply
Anyone here looked into using Hybris / libhybris to try to load Allwinner's bionic-based (Android) libraries and drivers for hardware video decoding?

http://en.wikipedia.org/wiki/Hybris_%28software%29

Or would that maybe violate GPL if libhybris support was added to XBMC code just load binary libraries?

https://github.com/libhybris/libhybris

Libhybris was designed to let you use Android drivers ad other hardware libraries under Linux but could work in XBMC under Android too?

https://plus.google.com/1081388376782701...2f8bRa9m1M
Quote:
So, introducing libhybris, http://github.com/stskeeps/libhybris - Hybris is a solution that commits hybris, by allowing us to use bionic-based HW adaptations in glibc systems. Practically, if you know what libdl is, this is a libdl-API-like implementation that happens to be able to load Android libraries, and overrides some symbols from bionic with glibc based ones.

The applications for this is for example being able to use binary-only android HW adaptation parts - GPU, RIL, etc. Included are example thin wrappers for libEGL and libGLESv2, with test programmes. The solution is a bit alpha and the pthread implementation needs wrapping/sanity, but currently, it works and shows quite interesting promise.

Shown on video is a unmodified test program, built against Mesa headers and glibc, using GL shaders, fullscreen on a Qualcomm GPU on a HP Touchpad (thanks to WebOS Developer Relations for sending me one) with the GPU userland driver being utilized. Android kernel is utilized with glibc userland. Future directions can be Wayland on top of this solution, utilizing vendor RIL .so's, etc. Come to #mer on irc.freenode.net to discuss this more and get involved in testing this on various hardware and do more amazing demos than the one shown on the demo.

Libhybris is basically a way to load Android libraries while overriding some Bionic symbols with those symbols from glibc

http://www.cnx-software.com/2013/04/08/l...-in-linux/
Quote:Libhybris Let You Use Android Drivers & HW Libraries in Linux

One of the main issues with Linux on ARM is the lack of proper GPU drivers for the platform, as most silicon manufacturers now only focus on Android drivers which are not compatible with the Linux kernel, because Android is based on Bionic C library, whereas Linux is based on glibc or its variants. There are two ways to solve this issue:

Open Source GPU drivers. This would be the ideal solution, as you would just be able to cross-compile the drivers for the proper, as well as fix bugs without having to ask the silicon manufacturer to fix the driver for you.
Bionic to Glibc library. Such library acts like libdl, and allows to load Bionic library and overrides some symbols from bionic with glibc based ones. This is exactly what libhybris does.

Ubuntu Touch is capable of using Android GPU drivers to run Ubuntu thanks to this library, and Libhybris will provides the interface between the HAL and Mir display server for Ubuntu 14.04.

Libhybris is released under an Apache 2.0 license, and the source code, written in C, is available in github. This library is based on the initial work of Carsten Munk.

There are 3 main directories in the source tree:
  • compat
  • ui – Some wrapper for Android UI.
    hybris
  • common - Common parts, including parsing /system/build.prop and matching common C functions (e.g. pthread*, str*…) between Bionic and glibc
  • egl – EGL support
  • gles2 – OpenGL ES 2 support
  • hardware – Loads /system/lib/libhardware.so
  • tests – Test programs for egl, gles2, lights, sensors, offscreen rendering, and ui
  • ui – Loads /system/lib/libui_compat_layer.so and creates bindings for the related functions.
    utils - Contains load_sym_files.py utility that loads symbol files for debugging.

Libhybris not only let you access the GPU, but also other hardware such as lights and sensors. I assume, but I may be wrong, that it could also be used with Wi-Fi and Bluetooth closed source drivers. Hopefully, work can also be done for VPU (Video Processing Unit) support in order to take advantage of hardware video decoding and encoding in Linux with Android libs, but I’m not knowledgeable enough to know if it’s feasible or not.

Using Libhybris is not an optimal solution, as there may be a small performance degradation, and you’ll be using the Android kernel, so many of the things you’d got used to with the Linux kernel won’t be available, and you’ll have to use the “Android” way. The implementation is not straightforward either, as Canonical’s Ubuntu Touch preview makes use of SurfaceFlinger which means applications relying on X11, GTK… will not work at the beginning, and you’ll have to wait until 2014 and and implementation with Mir display server to get a full solution based on libhybris with X11 compatibility. Nevertheless, even though libhybris is not a perfect solution, it’s a practical one, as it’s a technical solution, and not one which relies on convincing management and lawyers to release open source drivers.

There’s also some work on reverse-engineered open source GPU drivers such as the lima project, and some companies, e.g. Freescale / Vivante, release proper (closed-source) drivers for ARM Linux, but the company with the highest market share, namely Imagination Technologies, does not participate in any of those initiatives, and libhybris could become the way of the future, so most people may end-up using Android kernels on their ARM “Linux” distribution.
http://www.cnx-software.com/2013/03/05/f...s-drivers/

http://mer-project.blogspot.se/2013/05/w...ivers.html
Reply
As this thread seems to be about the android version, libhybris is kind of offtopic here.
But yes, using libhybris with the linux version is the preferred way due to a bug in th native linux cedar-lib binary. See http://linux-sunxi.org/XBMC#Using_the_An..._libhybris .
Allwinner's cedarx code is rated to proper violate GPL anyway. Source code isn't available though.
rellla
Reply
Android or linux, I just want to run XBMC on these crappy Allwinner devices I have before I give up and sell them on ebayBig Grin
TV Mosaic on Windows 10 as PVR Backend |  1 RaspberryPI 3 Client (LibreElec) | Amazon FireTV box | 5 Amazon FireTV sticks | FireTV Cube | 2 Nvidia Shield TV
Tuners: HD HomeRun 4 ATSC (OTA) | IPTV
Reply
hello,

sorry rella, but your analyis is wrong, XBMC for android uses cedarx-libs which are based on libhybris of course, it means you can cross compile for android in a gcc environment and load android native libs at run-time, that's it.

regards,
sevy
Reply
(2013-08-24, 16:15)chevil Wrote: hello,
sorry rella, but your analyis is wrong, XBMC for android uses cedarx-libs which are based on libhybris of course,
How can cedarx-libs base on libhybris? Libhybris is a layer that makes bionic-based software work on glibc-linux systems.
(2013-08-24, 16:15)chevil Wrote: it means you can cross compile for android in a gcc environment and load android native libs at run-time, that's it.
Sure. I never did that though. Native Android Libs at runtime, but not libhybris. I was talking about using libhybris on linux systems. On Android it's ... useless.
rellla
Reply
no not true, read back again, and yes cedarx libs come with a libvecore.a, which comes from libhybris ( read the code a bit ).

regards,
sevy
Reply
hello chevil,
i can't reproduce your statement. don't even know if we are talking about the same thing.
never mind, i never dealt with xbmc for android. you should end up being right.
regards rellla
Reply
chevil,
once again, what is the xbmc source you are talking about. is it empat0's with http://ydegoyon.free.fr/git-xbmca10-0221.diff ?
thanks rellla
Reply
hello,

sorry i was wrong, for some confusing names of libraries, i thought libvecore.a in cedarx libs was coming from libhybris, but this is not the case, it's a lib for android already.

the problem i that it crashes with the A20 ( and was working with the A10 ), do you know who i should contact for the cedax libs for android, as you seem to have mostly worked on the linux version, isn't it?

regards,
sevy
Reply
in fact, i'm still not sure where the libvecore.a from cedarx libs is coming from, but this is where all the crashes are located, so if someone could enlight me here? know how to produce it? it seems like a static piece of code...

thanks,
sevy
Reply
I heard Mele already release new firmwar support XBMC.
Here is the link from their forum:
http://forum.mele.cn:81/viewtopic.php?f=4&t=46
http://forum.mele.cn:81/viewtopic.php?f=4&t=40

They said:
Except that we improved the performance and stability of the firmware, we also developed new features:
1. Pre-install the APK named Game Store which introduces end users to download the popular android games which are compatible with MeLE android boxes and Air mouse.

2. Pre-install the APK named Vidon.me TV which is a media center that can switch to XMBC.

3. Support hardware decode of Blu-ray ISO and with simple navigation when using XMBC, which other android boxes cannot.

4. Support decode and playback for 4K video and 1080P video over 60Mbps.

5. Support two launchers for end users to choose MeLE or Generic. Check this topic that shows you how to switch viewtopic.php?f=5&t=41

hope someone can make one a20 xbmc ,thanks so much
Reply
hello,

good for Mele users, but mine is an A20 based set-top box and i don't think i can install this on it.

on my box, some stock video players are working with hw accelration, it's only xbmc compiled withe cedarx libs that crashes.

best,
sevy
Reply
i got the same as well. a20 base box, chevil what is the best apk is good for a20? can intro me pls?
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10

Logout Mark Read Team Forum Stats Members Help
hardware acceleration on allwinner ( cedarv )2