Kodi Community Forum
Allwinner A10 : Is XBMC ported to MALI-400MP ? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Hardware (https://forum.kodi.tv/forumdisplay.php?fid=112)
+--- Thread: Allwinner A10 : Is XBMC ported to MALI-400MP ? (/showthread.php?tid=126995)



RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-25

After 228 minutes, xbmc compile was successfull :-)
xbmc run but I've not mouse and keyboard connected to my Cubieboard so I cannot test it.

I've tried to --enable-libcec in xbmc_cubian/xbmca10/tools/a10/depends/xbmc/Makefile and compile again but
Code:
checking shairport/shairport.h presence... yes
checking for shairport/shairport.h... yes
checking for libshairport soname... libshairport.so.1
checking for struct AudioOutput.ao_set_metadata... no
checking for UDEV... yes
configure: == libusb disabled. ==
checking for CEC... no
configure: error: == libcec disabled. CEC adapter support will not be available. ==
make: *** [configure] Error 1

I have libcec installed
Code:
# dpkg-query -S cec
libcec1:armhf: /usr/lib/arm-linux-gnueabihf/libcec.so.1
libcec-dev: /usr/lib/arm-linux-gnueabihf/libcec.so
libcec-dev: /usr/lib/arm-linux-gnueabihf/pkgconfig/libcec.pc
libcec-dev: /usr/include/libcec/cecloader.h
libcec1:armhf: /usr/share/doc/libcec1/copyright
libcec-dev: /usr/include/libcec/cecc.h
libcec-dev: /usr/include/libcec/cec.h
libcec-dev: /usr/include/libcec
libcec-dev: /usr/share/doc/libcec-dev
libcec1:armhf: /usr/share/doc/libcec1
libcec-dev: /usr/share/doc/libcec-dev/changelog.Debian.gz
libcec1:armhf: /usr/lib/arm-linux-gnueabihf/libcec.so.1.0.6
libcec-dev: /usr/share/doc/libcec-dev/changelog.gz
libglib2.0-dev: /usr/include/glib-2.0/gobject/gsourceclosure.h
libcec-dev: /usr/lib/arm-linux-gnueabihf/libcec.a
libcec-dev: /usr/include/libcec/cectypes.h
libcec1:armhf: /usr/share/doc/libcec1/changelog.Debian.gz
libcec1:armhf: /usr/share/doc/libcec1/changelog.gz
libcec-dev: /usr/share/doc/libcec-dev/copyright

Any idea to have CEC enabled ?


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-25

BTW this is my newbie guide to compile native xbmc with Cubieboard A10 running Cubian (Debian wheezy) http://cubian.org

Main guide: http://linux-sunxi.org/XBMC with some differences
1) There is no need to have a swap file/partition: Cubieboard 1GB RAM is enough to compile without any problem

2) Because my Cubieboard is not connected to a monitor (I access it only using ssh), I use 'screen' to compile so I can detach terminal without stopping compile
$ sudo apt-get install screen

3) Step-by-step guide , all command run as root:
---------- one time step ----------
edit /etc/apt/sources.list and add
deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
then run usual
# apt-get update && apt-get upgrade

# echo -e "\nA10HWR=1" >> /etc/environment
logout and login
verify env is correct
# set | grep A10
A10HWR=1

# apt-get build-dep xbmc
# apt-get install swig default-jre libgtk2.0-bin libssh-4 libssh-dev
# apt-get install libreadline-dev libusb-1.0

# cd /root
# mkdir xbmc_cubian
# cd xbmc_cubian

(using blue-screen fix http://forum.xbmc.org/showthread.php?tid=126995&pid=1470645#pid1470645 )
# git clone git://github.com/rellla/xbmca10.git
download about 374 MB data
# cd xbmca10
# git checkout stage/Frodo_fixblue2
-------------- end one time step ----------

--------- native compile, can be repeated -------------
# screen -L (with -L you have output copied into log file 'screenlog.0')
# cd /root/xbmc_cubian/xbmca10/tools/a10/depends
# make
download extra sources and compile time about 6'
# make -C xbmc
about 230’ compile time
--------- end compile ---------

edit /etc/modules and remove '#' in front of 'mali' module
reboot (or modprobe mali without rebooting)
run /root/xbmc_cubian/xbmca10/xbmc.bin


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-25

Very strange.

I reboot Cubieboard and then run xbmc.bin : it works. In my TV I watch XBMC main screen
I stop xbmc.bin
I start xbmc.bin again but nothing in my TV: black screen.
xbmc is running but nothing is showed in my TV

It's like xbmc run correct only the first time.
I need to reboot to have again xbmc main screen, but only the first time I run it.

I've tried to rmmod mali && modprobe mali without success.
Nothing strange in dmesg
Code:
first run ok
[  291.340000] Warning: this sunxi disp driver will see significant redesign.
[  291.340000] Applications using /dev/disp directly will break.
[  291.350000] For more information visit: http://linux-sunxi.org/Sunxi_disp_driver
[  291.370000] disp: process 2491 (xbmc.bin) has skipped the version handshake.
[  291.370000] [DISP] layer released: 0,101
[  291.390000] [DISP] released layer not allocated in this session: 0,101
[  291.390000] [DISP] layer released: 0,102
[  291.390000] [DISP] released layer not allocated in this session: 0,102
[  291.410000] [DISP] layer released: 0,103
[  291.410000] [DISP] released layer not allocated in this session: 0,103
[  291.410000] [DISP] layer allocated: 0,101
[  291.420000] [DISP] layer released: 0,101
[  291.420000] [DISP] layer allocated: 0,101
[  291.450000] UMP<2>: New session opened
[  324.010000] UMP<2>: Session closed
[  324.010000] [DISP] layer allocated at close: 0,101

second run: TV black screen
[ 3266.000000] disp: process 6025 (xbmc.bin) has skipped the version handshake.
[ 3266.020000] [DISP] layer released: 0,101
[ 3266.020000] [DISP] released layer not allocated in this session: 0,101
[ 3266.020000] [DISP] layer released: 0,102
[ 3266.050000] [DISP] released layer not allocated in this session: 0,102
[ 3266.050000] [DISP] layer released: 0,103
[ 3266.050000] [DISP] released layer not allocated in this session: 0,103
[ 3266.070000] [DISP] layer allocated: 0,101
[ 3266.070000] [DISP] layer released: 0,101
[ 3266.070000] [DISP] layer allocated: 0,101
[ 3266.080000] UMP<2>: New session opened
[ 3298.060000] [DISP] layer allocated at close: 0,101
[ 3298.060000] UMP<2>: Session closed



RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - rellla - 2013-08-26

For sure there seems to be some issues with layer init/ de-init. Someone has to investigate that ....
Futher be sure not to run into the console blanking issue ... https://github.com/rellla/xbmca10/issues/9
rellla


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-28

Ok.
The workaround
echo 0 > /sys/devices/platform/disp/graphics/fb0/blank
(I run it before XBMC)
works fine.

I've setup LIRC and I use XBMC with a remote controller.
XBMC is working fine but play video ... not.
It looks that video hardware acceleration is totally NOT used.
Cubieboard A10 clocked @ 1.2 GHz
It cannot be able to play any 720p or 1080p MKV videos. Raspberry PI play them without any problem.
And no any audio through HDMI

It's totally useless as media center :-( :-( :-(

Any idea ? Is there something wrong in my compile process ?


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - rellla - 2013-08-29

(2013-08-28, 21:23)ambrosa Wrote: It's totally useless as media center :-( :-( :-(
<- Partially right. Remember it's a developer board. atm

Provide a logfile please.

rellla


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-29

Dear rellla,
I've a big respect for developers and your work too :-)
My opinion "It's totally useless as media center" is correct in my setup: without hw video acceleration, my Cubieboard is not suitable to be used as media player like Raspberry PI
Well, my question is:
"do you know if someone else run your XBMC A10 branch on a Cubieboard with hw accell working ?"
The problem can be: XBMC or kernel or something else regarding Cubian OS.

Today or tomorrow I run my xbmc with log enabled (loglevel=2 will be ok ?) and I will analyze them.
I'm a newbie in XBMC and I need little more time to tune my brain :-) :-)


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - rellla - 2013-08-29

(2013-08-29, 10:32)ambrosa Wrote: Dear rellla,
I've a big respect for developers and your work too :-)
You must not. I'm only hosting the repo.
(2013-08-29, 10:32)ambrosa Wrote: "do you know if someone else run your XBMC A10 branch on a Cubieboard with hw accell working ?"
The problem can be: XBMC or kernel or something else regarding Cubian OS.
Yes, me. But some time ago. I succeeded on a vanilla Debian Wheezy with Cubieboard. It should generally work. Not perfect, but useable imo.
(2013-08-29, 10:32)ambrosa Wrote: Today or tomorrow I run my xbmc with log enabled (loglevel=2 will be ok ?) and I will analyze them.
I'm a newbie in XBMC and I need little more time to tune my brain :-) :-)
Just provide default $HOME/.xbmc/temp/xbmc.log to see if Cedar is used.
Regards
rellla


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-08-30

This is the default xbmc log while I play a 720p MKV (h264 and AC3 audio downsampled by XBMC to stereo)
http://xbmclogs.com/show.php?id=52053

HDMI audio now works: it was a misconfiguration.

But video ( file test-720p-h264-ac3.mkv ) is played very bad: squares, magenta color, many frames dropped etc. etc.
I've uploaded a 90 seconds sample here:
http://youtu.be/mU9Xgyir6uc
Cubie CPU clock @ 1.2GHz (CPU and RAM have heatsink)

Video is located into a NAS in my local network and remote share is mounted locally in /mnt/bak-p2p with CIFS filesystem.
No problem with same configuration with Raspberry: it's played absolutely fine.
This test is made using the same network Raspberry cable: I've disconnected Raspberry and connect Cubieboard.
I've tested bandwidth copying locally the MKV file: available throughput is about 9 Mbytes/sec.

XBMC in Cubieboard run very fast. Faster than Raspberry. Only video playback is bad.
While [email protected] play files CPU is about 13.5% and uptime is about 0.50. Very good values compared to Raspberry (CPU 100% and uptime > 1.00). While [email protected] is not playing a file, values are higher: CPU is about 40% and uptime 1.00. It sounds strange for me.


Cedar looks to work:
Code:
20:14:19 T:2900988992  NOTICE: A10: using hardware rendering.
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: fpsrate 1000000000 / fpsscale 41708331
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: Framerate 23976
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: Frame Duration 41708
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: CodecID 28
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: StreamType 2
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: Level 31
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: Profile 100
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: PTS_invalid 0
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: Tag 0
20:14:19 T:2900988992   DEBUG: A10: MEDIAINFO: extradata 43 0164001fffe1001b6764001facd94050045a6a020202800000030080015f90078c18cb01000568ebecb22c
20:14:19 T:2900988992  NOTICE: A10: CEDARV_FORMAT: 4
20:14:19 T:2900988992  NOTICE: A10: CEDARV_SUBFORMAT: 0
20:14:19 T:2900988992  NOTICE: A10: CEDARV_CONTAINERFORMAT: 0
20:14:19 T:2900988992   DEBUG: A10: cedar not in use yet
20:14:19 T:2900988992   DEBUG: A10: cedar initialized
20:14:19 T:2900988992   DEBUG: A10: vstream_info set
20:14:19 T:2900988992   DEBUG: A10: cedarv opened
20:14:19 T:2900988992   DEBUG: A10: cedarv playing
20:14:19 T:2900988992   DEBUG: A10: cedar open.

I see only few problems but all video is played in a terrible way all the time.
Code:
20:14:21 T:2848977984   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:609661.110000, should be:361509.701667, error:-248151.408333
20:14:22 T:2848977984   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:1454772.640667, should be:1344000.000000, error:-110772.640667
20:14:24 T:2848977984   DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:3208510.356000, should be:3104179.293000, error:-104331.063000
20:14:46 T:2976486464   DEBUG: Thread Jobworker 2976486464 terminating (autodelete)
20:14:46 T:2909377600   DEBUG: Thread Jobworker 2909377600 terminating (autodelete)
20:16:07 T:3048808448   DEBUG: LIRC: Update - NEW at 146951:000100a900000001 00 KEY_STOP qboxhd (KEY_STOP)


Please, see my log and if you have any suggestion for further test, let me know.

Regards.

PS:
Refresh rate is forced to 60Hz. And with XBMC GUI this is the only value.
How can I set it to 50Hz ?
Raspberry use 50Hz ......
Code:
20:13:40 T:3048808448   ERROR: A10: display mode 255 is unknown. Assume refreh rate 60Hz
20:13:40 T:3048808448  NOTICE: InitWindowSystem: Using EGL Implementation: A10
20:13:41 T:3048808448   DEBUG: CreateWindow: Created surface of size 1920x1080
20:13:41 T:3048808448  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
20:13:41 T:3048808448  NOTICE: Previous line repeats 1 times.
20:13:41 T:3048808448  NOTICE: Found resolution 1920 x 1080 for display 0 with 1920 x 1080 @ 60.000000 Hz
20:13:41 T:3048808448  NOTICE: Found ([email protected]) at 16, setting to RES_DESKTOP at 16
20:13:41 T:3048808448  NOTICE: Checking resolution 16
20:13:41 T:3048808448  NOTICE: Current resolution: 1920x1080 @ 60.00 - Full Screen
20:13:41 T:3048808448   DEBUG: CreateWindow: Created surface of size 1920x1080



RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - oliv3r - 2013-09-01

Forgot to post here, so here goes: http://linux-sunxi.org/Reverse_Engineering/Cedar_Status

Summary, it is now possible to decode jpeg, mpeg12 and h264 using only opensource software (ignoring mali for now, as that's Lima's thing which is progressing immensly!).

There is no driver yet, it's only dev code; but the simple fact that it's possible to do this, is a big win for the linux-sunxi community.

end self promotion Wink


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - rellla - 2013-09-02

Thanks oliv3r for announcing.
Until it's useable in productive environment, let's try to solve issues with the blobs Wink

@ambrosa: Try one of the videos on http://linux-sunxi.org/CedarXVideoRenderingChart
I also think, that this commit breaks cedar decoding. Maybe you can test that.
I can't find something strange in your log. Cedar HW schould be used.

rellla


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-09-02

@rellla

There is something strange. I've tried with some AVI video encoded with DivX and MPEG-2
Same problems ! Not squared but very crappy. XBMC play about 0.5 sec, then stop, then restart.... and so on.
So it's look not H264 related.

During these days I will download some sample from here:
http://samplemedia.linaro.org/
and I will try them.

Then I will change source code as you suggest and I will retry tests.

@rellla
Analyzing my XBMC log and compared to low CPU load (about 13%) , I'm sure that Cedar is used during playback.
If not, CPU load will be >> 100%

The problem, if any, is located in another place.

Do you know if it's possible to test Cedar with command-line VLC (no X) ?
I see that someone use it but I don't know how in a console environment and with cedar.


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-09-02

@rellla
MMhh there's something strange.
I've used you GitHub stage FRODO_fixblue2 as suggested in a previous post.
BUT in FRODO_fixblue2
https://github.com/rellla/xbmca10/blob/stage/Frodo_fixblue2/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecA10.cpp
is used
m_hcedarv->ioctrl(m_hcedarv, CEDARV_COMMAND_FLUSH, 0);

It's looks that this GitHub stage looks to be old compared to your other stage.

Can you suggest me the correct stage to use/compile ?

BTW: I've tested sample in http://samplemedia.linaro.org/
Downloaded 1080p and 720p sample coded with H264, MPEG2, MPEG4, VC1
ALL OF THEM are played PERFECT !

Then I've tried with about my 50 different MKV, AVI, MP4, TS, M2TS and so on (copied in local storage to avoid network problem, if any).
NONE OF THEM is played correctly

I'm going crazy.

Any idea ?


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - rellla - 2013-09-02

Yes. You've done right. You can use this branch. Did you try and compare with the samples here: http://linux-sunxi.org/CedarXVideoRenderingChart Please do that and see if you have the same problems or play the files correctly. If so, cedar is running right.
For me it seems, that hw acc is working basically. There might be a codec issue in general with your files ...
rellla


RE: Allwinner A10 : Is XBMC ported to MALI-400MP ? - ambrosa - 2013-09-02

http://linux-sunxi.org/CedarXVideoRenderingChart show problems with "AVC High" coding.
I need to analyze my video files to see if they are AVC "baseline" or "high"
Do you know a software that can perform this analysis ? (Win or Linux doesn't matter).
I've found many software but thery are very expensive (not free).


Damn ! I suppose I will use Raspberry PI as media player for a loooooong time :-(

EDIT: as suggested here http://linux-sunxi.org/CedarXVideoRenderingChart , there is http://mediaarea.net/en/MediaInfo to analyze video stream