Odroid XU3/XU4 NEXT thread

Test and fix the Kernel 4.14 features
mattrix
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mattrix » Wed Aug 24, 2016 7:45 am

The link to your config is down :(
http://paste.debian.net/download/789788
"Your requested paste entry '789788' could not be found "

Also, would you mind removing that */ in your repo?
arch/arm/boot/dts/exynos5420.dtsi

Thanks :)

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Wed Aug 24, 2016 8:52 am

I will push soon an update to rc3.
I will do a force push to fix some of the patches, so i would suggest doing a force reset to rc1 then update....

also for those interested, these are my new wayland glmark2 results with the r10p0 driver under gnome3 mutter WM:

* offscreen window: ~700
* offscreen fullscreen: ~300
* onscreen both window and fullscreen are ~55-58 because fps is capped at 60fps, and there are some tests (e.g. terrain, refract) that are <60 that will lower the total score to >55.

User avatar
rooted
Posts: 6331
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by rooted » Wed Aug 24, 2016 10:53 am

memeka wrote:I will push soon an update to rc3.
I will do a force push to fix some of the patches, so i would suggest doing a force reset to rc1 then update....

also for those interested, these are my new wayland glmark2 results with the r10p0 driver under gnome3 mutter WM:

* offscreen window: ~700
* offscreen fullscreen: ~300
* onscreen both window and fullscreen are ~55-58 because fps is capped at 60fps, and there are some tests (e.g. terrain, refract) that are <60 that will lower the total score to >55.
Those are nice numbers, finally a respectable desktop experience (perhaps).

mattrix
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mattrix » Wed Aug 24, 2016 10:12 pm

I will do a force push to fix some of the patches, so i would suggest doing a force reset to rc1 then update....
Great!
Thank you :)

I personally always do a fresh git clone (using depth 1 and single branch) and build every time I compile my kernel.
Saves a lot of space and doesn't take long at all to pull the git repo :)

User avatar
rooted
Posts: 6331
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by rooted » Wed Aug 24, 2016 10:36 pm

Why not just use 'git reset --hard HEAD' and 'git pull'?

That is just as good and uses much less bandwidth.

mattrix
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mattrix » Thu Aug 25, 2016 8:36 am

Would that still work after depth =1?

I had tried just doing 'git pull', but that started getting all the history.

User avatar
rooted
Posts: 6331
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by rooted » Thu Aug 25, 2016 9:02 am

mattrix wrote:Would that still work after depth =1?

I had tried just doing 'git pull', but that started getting all the history.
You're right.

It should be:

Code: Select all

git reset --hard HEAD
git fetch --depth=1
And I always throw a:

Code: Select all

make mrproper
This fully resets the build directory so you may want to backup your .config first.

I'm not at home to test and I haven't used git as much as I should lately but this should work if memory serves.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Thu Aug 25, 2016 2:11 pm

whatever rocks the boat :P

i pushed rc3 now, fixes the comment issue i had previously, and tweaks the voltages for CPU frequencies.
i would recommend however not using the HMP in the config, seems that it prefers the *small* cores and results in a slower system.

fkpwolf
Posts: 48
Joined: Mon Dec 16, 2013 4:24 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by fkpwolf » Thu Aug 25, 2016 2:13 pm

cool. I want to give a try. Where can I download the os image?

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Thu Aug 25, 2016 2:28 pm

fkpwolf wrote:cool. I want to give a try. Where can I download the os image?
there's no OS image atm, since the one i'm using it's 32GB filed of developer stuff. i pushed the kernel on github, the rest of packages can be installed and patched.

mattrix
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mattrix » Fri Aug 26, 2016 10:14 am

Where can we find your config memeka?
The http://paste.debian.net/789788/ is down :(

Would you consider adding an odroidxu4_defconfig to your repo?

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Fri Aug 26, 2016 11:03 am

i will add it tomorrow when i get to my odroid, for now you can go for the older (4.7) http://paste.debian.net/plain/786852/
this one has no MALI defined, so you will need to make menuconfig -> drivers - graphics - mali and just select it, add custom 3-rd party platform named "exynos5422", and select devfreq for it (the rest i think should not be selected).


EDIT: Here you go:

http://paste.debian.net/plain/791598

it's set to never expire :)
Last edited by memeka on Fri Aug 26, 2016 12:57 pm, edited 1 time in total.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Fri Aug 26, 2016 11:35 am

=======================================================
some more updates on gnome3 on wayland desktop replacement:
=======================================================

* with tweaks, performance is very good, it's a very good desktop experience
- performance depends on what core gnome-shell runs on, it's slow on A7 and fast on A15. I found that disabling A7 cores gives the best result (so all processes run on A15 cores) - but the fan will be on most of the time
- HMP will run gnome-shell on A7 cores => slow interface. the alternative would be to disable HMP - with the regular scheduler, you still get 8 cores and gnome-shell will cycle through all so performance would still be OK (tho not as good as only A15 cores)
- I think HMP has issues because it's missing some configuration from dts or it needs different cores masks ...
- An alternative would be a set-up so set affinity to gnome-shell (and other processes as gdm) to A15 cores

* MFC decoding works, but the output is NV12 format. Kodi can work with NV12, but other players cannot. Gstreamer wayland/gtk3 sinks want BGRx, and when using MFC the results is worse than ffmpeg:
- 720p movie -> mfc hw decoder (NV12) -> videoconvert (BGRx) -> wayland display => 3-4 fps with 1 core @ 100%
- 720p movie -> avdec sw decoder (I420) -> videoconvert (BGRx) -> wayland display => no framedrops with 1 core @ 80% (decoding?) + 1 core @ 40% (converting?); 1080p has a framedrop now and then with sw decoding

* MFC encoding via gstreamer works (h264/vc1). I was able to do hardware transcoding with gstreamer realtime.
- currently I need to investigate how to set encoding parameters - profile, bitrate, etc. by default it uses the High L1 profile with no bitrate limit, so resulting file size is quite high.

* Gstreamer recognizes 2 GScaler devices that can convert NV12 - however after the first frame the process crashes. you can see a log here: http://paste.debian.net/791596/
- if you can help with gstreamer/gscaler code, you are welcome to :)

* ffmpeg decoder: @Oversun is testing some patches to add MFC decoding to ffmpeg. Code is here: https://github.com/mihailescu2m/FFmpeg/ ... _m2m-2.8.6 - currently this code results in some kernel MFC errors, if you can contribute please do so :)

* gnome3 apps are mostly running OK
- gnome-maps is sometimes crashing the session
- some control-panel items are crashing control-panel
- changing resolution doesn't work (or maybe it doesn't on my monitor)
- libreoffice works as well as on X11
- there's an issue with gnome-settings-daemon, uses one core @ 100% (can be set to run on a little core :D) - fixes found on the bug tracker for this issue were innefective

* browser status:
- chromium works in XWayland => mesa (sw) EGL acceleration
- epiphany (webkit) is working well and it's very fast, but webgl is not accelerated (samsung racer has 3-4fps)
- epiphany + youtube => not a compatible browser, youtube sends only 320p videos
- epiphany playing videos (youtube, vimeo) - it uses gstreamer + MFC => similar issues as before
- up to 480p it's OK-ish
- if you enlarge the video (doesnt matter the video resolution) => it gets slower => probably software scaling / csc converter; probably also epiphany does a copy to wayland compositor?
- trying to get chromium on wayland native working
- version 52 from ubuntu repository crashes => needs to use v48; wayland was mainlined in v50 :(
- version 52 compiled by @mdrjr with wayland support crashes like the one from ubuntu repository
- version 52 compiled by @meveric with X11 support works in XWayland, waiting for a wayland native build :)

* kodi
- wayland support removed on latest kodi17
- can run successfully kodi 16.1 - fast inteface under wayland, MFC decoding enabled
- there were some synchronization issues (sometimes the video was too fast sometimes too slow) - but maybe because i don't have an audio output device
- needs proper testing
- there are some recent branches with updated wayland code that can be tested too

* retroarch
- should work (has wayland support)
- needs testers :)

* kernel status: 4.8.0-rc3
- reports of USB3 issues
- mali integration not perfect (no PM) but usable - can run it at 177 or 600Mhz (depending on what governor you use), wayland glmark2 results are better than x11 glmarks2 results
- X11 usage also possible - gnome3 can start the X11 session too. gnome3 uses gallium drivers, not compatible with mali => you get gnome3 sofware (llvmpipe) which is slow, but you can run EGL apps that will run fast.

So, that's the status atm.
Anyone that can help, please do so :)
Last edited by memeka on Fri Aug 26, 2016 6:36 pm, edited 1 time in total.

User avatar
rooted
Posts: 6331
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by rooted » Fri Aug 26, 2016 12:09 pm

Thanks for the complete status update. Man MFC capable ffmpeg would be awesome.

fkpwolf
Posts: 48
Joined: Mon Dec 16, 2013 4:24 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by fkpwolf » Fri Aug 26, 2016 2:53 pm

Looks you are using a netbook LCD as display. How do you do it? Convert LCD interface to HDMI?

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Fri Aug 26, 2016 3:12 pm

fkpwolf wrote:Looks you are using a netbook LCD as display. How do you do it? Convert LCD interface to HDMI?
no, it's an acer monitor.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Fri Aug 26, 2016 6:37 pm

MFC encoding via gstreamer works (h264/vc1). I was able to do hardware transcoding with gstreamer realtime.
- currently I need to investigate how to set encoding parameters - profile, bitrate, etc. by default it uses the High L1 profile with no bitrate limit, so resulting file size is quite high.

edit: settings found :)

sample run

Code: Select all

gst-launch-1.0 filesrc location=~/Videos/sintel_trailer-720p.mp4 ! qtdemux ! h264parse ! v4l2video2videodec !  v4l2video3h264enc extra-controls="encode,h264_level=10,h264_profile=4,frame_level_rate_control_enable=1,video_bitrate=2097152" ! h264parse ! matroskamux ! filesink location=~/output.mkv
will use 2 small cores @ ~50% to decode and re-encode 720p video.

of course best visual results are with frame_level_rate_control_enable=0 when the resulting bitrate is 20mb/s :)

initial file size:7.3MB
output file size: 10.1MB (8.2MB with frame_skip_enable, or other sizes based on bitrate)

Code: Select all

General
Unique ID                                : 275824051435046389344945568368295141807 (0xCF81C7AE59337C034EE0EABBEC93E1AF)
Complete name                            : output.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 10.1 MiB
Duration                                 : 52s 208ms
Overall bit rate                         : 1 618 Kbps
Encoded date                             : UTC 2016-08-26 11:47:37
Writing application                      : GStreamer Matroska muxer
Writing library                          : GStreamer matroskamux version 1.8.2 / Lavf52.62.0
Copyright                                : "\(c\)\ copyright\ Blender\ Foundation\ \|\ durian.blender.org"
ARTIST                                   : "Durian\ Open\ Movie\ Team"

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.2
Format settings, CABAC                   : No
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=2, N=23
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 52s 208ms
Bit rate                                 : 1 585 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 24.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.072
Stream size                              : 9.87 MiB (98%)
Title                                    : Video
Language                                 : English
Default                                  : Yes
Forced                                   : No

ard
Posts: 72
Joined: Tue Jul 09, 2013 2:12 am
languages_spoken: english, dutch, german
ODROIDs: ODROID-U2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by ard » Fri Aug 26, 2016 11:04 pm

moon.linux wrote:Actually their is bit of issue in the USB hub it's not resetting properly on reboot. Need to find a different way to achieve this.
Hi Moon,
I actually found that resetting the USB is working:
I used the usbreset.c from:
http://askubuntu.com/questions/645/how- ... mmand-line
*twice*:
The state of usb:

Code: Select all

root@odroid8:~/reset# lsusb 
Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. 
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I did:

Code: Select all

root@odroid8:~/reset# ./usbreset /dev/bus/usb/003/002
Which resulted in:

Code: Select all

[85296.014490] [c0] usb 3-1: reset high-speed USB device number 2 using xhci-hcd
[85296.031315] [c0] xhci-hcd xhci-hcd.2.auto: xHCI xhci_drop_endpoint called with disabled ep ddff3540
I did it a second time, which resulted in:

Code: Select all

[85313.168689] [c7] usb 3-1: USB disconnect, device number 2
[85313.413523] [c0] usb 3-1: new high-speed USB device number 3 using xhci-hcd
[85313.454883] [c0] hub 3-1:1.0: USB hub found
[85313.455507] [c0] hub 3-1:1.0: 2 ports detected
[85351.240735] [c5] usb 3-1: USB disconnect, device number 3
[85351.458553] [c0] usb 3-1: new high-speed USB device number 4 using xhci-hcd
[85351.503243] [c1] hub 3-1:1.0: USB hub found
[85351.503749] [c0] hub 3-1:1.0: 2 ports detected
[85366.078708] [c0] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[85366.094836] [c0] usb 4-1: Parent hub missing LPM exit latency info.  Power management will be impacted.
[85366.111317] [c0] hub 4-1:1.0: USB hub found
[85366.111672] [c0] hub 4-1:1.0: 2 ports detected
Bus 4 is the USB3 bus, and Bus 3 is the USB2 bus.
By resetting the USB2 hub, I also reset the USB3 hub. But somehow I need to reset twice in this case.
BTW: this is on 3.10...
I think I will include this sequence in the bootup of my few thousands of xu4s I am managing ;-).

User avatar
rooted
Posts: 6331
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by rooted » Sat Aug 27, 2016 2:22 am

memeka wrote:MFC encoding via gstreamer works (h264/vc1). I was able to do hardware transcoding with gstreamer realtime.
- currently I need to investigate how to set encoding parameters - profile, bitrate, etc. by default it uses the High L1 profile with no bitrate limit, so resulting file size is quite high.

edit: settings found :)

sample run

Code: Select all

gst-launch-1.0 filesrc location=~/Videos/sintel_trailer-720p.mp4 ! qtdemux ! h264parse ! v4l2video2videodec !  v4l2video3h264enc extra-controls="encode,h264_level=10,h264_profile=4,frame_level_rate_control_enable=1,video_bitrate=2097152" ! h264parse ! matroskamux ! filesink location=~/output.mkv
will use 2 small cores @ ~50% to decode and re-encode 720p video.

of course best visual results are with frame_level_rate_control_enable=0 when the resulting bitrate is 20mb/s :)

initial file size:7.3MB
output file size: 10.1MB (8.2MB with frame_skip_enable, or other sizes based on bitrate)
This is exciting, when I get time to set it up I can finally transcode my mpeg2 streams to h264. My 2TB drive is beginning to get full.

Thanks for posting the command and that it is working.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Sat Aug 27, 2016 5:50 am

the USB issue:

from dmesg:

* exynos-dwc3 soc:usb3-0:: no suspend clk specified
* of_get_named_gpiod_flags: can't parse 'samsung,vbus-gpio' property of node '/soc/usb@12110000[0]'
* usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
* exynos-dwc3 soc:usb3-1:: no suspend clk specified
* usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
*** usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted. *** (from @ard)
When you connect a USB device the kernel provides a 10ms delay for the device to initialize, then the kernel begins sending commands to the device.

The delay is hard coded into the kernel for USB2.0 devices, but for 3.0 devices the value is configurable and is provided by the device.

If the device does not provide the latency value for the kernel, the kernel will never send commands to the drive because it will wait forever.
USB4 and USB6 are the USB3 hubs. Maybe enabling LPM would fix things out. @odroid - does XU4 usb hub support LPM?

from kernel code:

Code: Select all

	/*
	 * According to the USB 3.0 spec, all USB 3.0 devices must support LPM.
	 * However, there are some that don't, and they set the U1/U2 exit
	 * latencies to zero.
 	 */
        if (!udev->bos->ss_cap) {
                dev_info(&udev->dev, "No LPM exit latency info found, disabling LPM.\n");
                return 0;
        }
        if (udev->bos->ss_cap->bU1devExitLat == 0 &&
                        udev->bos->ss_cap->bU2DevExitLat == 0) {
                if (udev->parent)
                        dev_info(&udev->dev, "LPM exit latency is zeroed, disabling LPM.\n");
                else
                        dev_info(&udev->dev, "We don't know the algorithms for LPM for this host, disabling LPM.\n");
                return 0;
        }

User avatar
odroid
Site Admin
Posts: 29736
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by odroid » Sat Aug 27, 2016 9:29 am

dwc3 should be a root hub in Exynos5422 SoC.
There are two dwc3 ports in the SoC : one for Gbit Ethernet another one for on-board GL3521 USB 3.0 hub controller.

As far as I remember, Anand.moon could enable LPM via dts change for dwc3 feature with "snps,usb3_lpm_capable".
But it made some negative side effect on 3.10 Kernel and we disabled it again.

moon.linux
Posts: 1162
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by moon.linux » Sat Aug 27, 2016 4:01 pm

Hello memeka
* exynos-dwc3 soc:usb3-0:: no suspend clk specified
Suspend clk is not preset for exynos542x.....it's added for exynos7/exynos5433

* of_get_named_gpiod_flags: can't parse 'samsung,vbus-gpio' property of node '/soc/usb@12110000[0]'
* usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
* exynos-dwc3 soc:usb3-1:: no suspend clk specified
* usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
dwc3 usb 3.0 protocol/driver could be tuned using device tree binding.
https://git.kernel.org/cgit/linux/kerne ... s/v4.8-rc3

So I tried to add the dwc3 device tree feature to usb3 node.

Code: Select all

diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 06a6049..da80230 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -135,6 +135,9 @@
                                interrupts = <0 72 0>;
                                phys = <&usbdrd_phy0 0>, <&usbdrd_phy0 1>;
                                phy-names = "usb2-phy", "usb3-phy";
+                               snps,usb3_lpm_capable;
+                               snps,dis_u3_susphy_quirk;
+                               snps,dis_u2_susphy_quirk;
                        };
                };

@@ -155,6 +158,9 @@
                                reg = <0x12400000 0x10000>;
                                phys = <&usbdrd_phy1 0>, <&usbdrd_phy1 1>;
                                phy-names = "usb2-phy", "usb3-phy";
+                               snps,usb3_lpm_capable;
+                               snps,dis_u3_susphy_quirk;
+                               snps,dis_u2_susphy_quirk;
                        };
                };
But it fails might be my configuration is wrong.

Code: Select all

[    6.093545] usb 4-1.2: Failed to set U1 timeout to 0x0,error code -71
[    6.106709] usb 4-1.1: USB disconnect, device number 3
[    6.119842] usb 4-1.2: Set SEL for device-initiated U1 failed.
[    6.131199] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[    6.131491] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
[    6.162790] usb 4-1.2: Set SEL for device-initiated U2 failed.
[    6.174061] usb 4-1.2: usb_reset_and_verify_device Failed to disable LPM
               .
[    6.196457] hub 4-1:1.0: hub_ext_port_status failed (err = -71)
[    6.209124] usb 4-1-port2: cannot disable (err = -71)
[    6.232410] usb 4-1.2: USB disconnect, device number 4
[    6.262277] usb 4-1: Disable of device-initiated U1 failed.
[    6.277888] usb 4-1: Disable of device-initiated U2 failed.
[    6.662768] random: crng init done
[   10.408059] usb usb4-port1: Cannot enable. Maybe the USB cable is bad?
[   10.769289] hub 4-1:1.0: set hub depth failed
[   10.917853] hub 4-1:1.0: activate --> -19
[   10.939455] usb 4-1: USB disconnect, device number 2
I am investigating this behavior. :roll:

fnoop
Posts: 68
Joined: Thu Apr 28, 2016 6:04 am
languages_spoken: english
ODROIDs: XU4, oCam
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by fnoop » Sat Aug 27, 2016 10:02 pm

memeka wrote:MFC encoding via gstreamer works (h264/vc1). I was able to do hardware transcoding with gstreamer realtime.
- currently I need to investigate how to set encoding parameters - profile, bitrate, etc. by default it uses the High L1 profile with no bitrate limit, so resulting file size is quite high.

edit: settings found :)

sample run

Code: Select all

gst-launch-1.0 filesrc location=~/Videos/sintel_trailer-720p.mp4 ! qtdemux ! h264parse ! v4l2video2videodec !  v4l2video3h264enc extra-controls="encode,h264_level=10,h264_profile=4,frame_level_rate_control_enable=1,video_bitrate=2097152" ! h264parse ! matroskamux ! filesink location=~/output.mkv
will use 2 small cores @ ~50% to decode and re-encode 720p video.

of course best visual results are with frame_level_rate_control_enable=0 when the resulting bitrate is 20mb/s :)

initial file size:7.3MB
output file size: 10.1MB (8.2MB with frame_skip_enable, or other sizes based on bitrate)

Code: Select all

General
Unique ID                                : 275824051435046389344945568368295141807 (0xCF81C7AE59337C034EE0EABBEC93E1AF)
Complete name                            : output.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 10.1 MiB
Duration                                 : 52s 208ms
Overall bit rate                         : 1 618 Kbps
Encoded date                             : UTC 2016-08-26 11:47:37
Writing application                      : GStreamer Matroska muxer
Writing library                          : GStreamer matroskamux version 1.8.2 / Lavf52.62.0
Copyright                                : "\(c\)\ copyright\ Blender\ Foundation\ \|\ durian.blender.org"
ARTIST                                   : "Durian\ Open\ Movie\ Team"

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.2
Format settings, CABAC                   : No
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=2, N=23
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 52s 208ms
Bit rate                                 : 1 585 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 24.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.072
Stream size                              : 9.87 MiB (98%)
Title                                    : Video
Language                                 : English
Default                                  : Yes
Forced                                   : No
This is amazing, fantastic breakthrough for those who want to use the XU4 for realtime video (as in robotics/drones). Unfortunately with USB3 problems we can't connect it to the oCam :( Waiting for everything to come together :)

Are there simple instructions to build and install working kernel from your tree? (for idiots :)


Matioupi
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by Matioupi » Sun Aug 28, 2016 5:36 pm

Hello,

I have a small question : how do you install ubuntu 16.10 ?

Do you install the 16.04 image and then perform the upgrade with somthing like

Code: Select all

sudo do-release-upgrade -d
or there is a way to do a fresh install from another method ?

Regards

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Sun Aug 28, 2016 6:03 pm

Matioupi wrote:Hello,

I have a small question : how do you install ubuntu 16.10 ?

Do you install the 16.04 image and then perform the upgrade with somthing like

Code: Select all

sudo do-release-upgrade -d
or there is a way to do a fresh install from another method ?

Regards
do-release-upgrade won't work because 16.10 is not released. you can upgrade manually from 16.04 by changing sources list, however it's messy.
cleanest is to start with a chroot where you either untar the daily release of ubuntu-base from cdimage.ubuntu.com or run debootstrap on it.
then install kernel and modules in chroot, run u-boot, etc. this method is explained in some posts here, and i think also in the odroid magazine.

tom81
Posts: 23
Joined: Mon Jun 20, 2016 6:08 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by tom81 » Sun Aug 28, 2016 6:40 pm

Short question from me as well: Is audio via HDMI supported on XU4? I only saw DT bindings for XU3 but nothing for XU4 and ALSA does not detect any cards.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Sun Aug 28, 2016 7:31 pm

tom81 wrote:Short question from me as well: Is audio via HDMI supported on XU4? I only saw DT bindings for XU3 but nothing for XU4 and ALSA does not detect any cards.
my branch has a commit similar to the HK kernel that sets-up the monitor via DVI or HDMI from boot.ini
if it's set to DVI mode, there is no audio via HDMI.
if it's set to HDMI mode, there should be audio.

Code: Select all

odroid@odroid:~$ cat /media/boot/boot.ini | grep vout
# setenv vout "hdmi"
setenv vout "dvi"

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Sun Aug 28, 2016 7:33 pm

memeka wrote:whatever rocks the boat :P

i pushed rc3 now, fixes the comment issue i had previously, and tweaks the voltages for CPU frequencies.
i would recommend however not using the HMP in the config, seems that it prefers the *small* cores and results in a slower system.
indeed, default HMP config sets the A7 as the "fast" cores and A15 as "slow" cores :D as a result, A7 cores are preferred for heavy processes :(
with this in config, you set the correct fast/slow cores:

Code: Select all

CONFIG_HMP_FAST_CPU_MASK="F0"
CONFIG_HMP_SLOW_CPU_MASK="0F"

tom81
Posts: 23
Joined: Mon Jun 20, 2016 6:08 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by tom81 » Sun Aug 28, 2016 11:36 pm

memeka wrote:
my branch has a commit similar to the HK kernel that sets-up the monitor via DVI or HDMI from boot.ini
if it's set to DVI mode, there is no audio via HDMI.
if it's set to HDMI mode, there should be audio.

Code: Select all

odroid@odroid:~$ cat /media/boot/boot.ini | grep vout
# setenv vout "hdmi"
setenv vout "dvi"
Unfortunately there is no audio device in any case, it doesn't matter whether I set vout to hdmi or dvi. This is my current kernel config: http://pastebin.com/ZjDmtSUy
The DT entries for XU3 audio are in arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi which is not included in exynos5422-odroidxu4.dts, so it is not so surprising that there's no HDMI audio out on XU4...

moon.linux
Posts: 1162
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by moon.linux » Mon Aug 29, 2016 2:31 am

The DT entries for XU3 audio are in arch/arm/boot/dts/exynos5422-odroidxu3-audio.dtsi which is not included in exynos5422-odroidxu4.dts, so it is not so surprising that there's no HDMI audio out on XU4...
XU3 and U3 have audio port, were are XU4 dose not have one.

What is the output of aplay -l

tom81
Posts: 23
Joined: Mon Jun 20, 2016 6:08 am
languages_spoken: english
ODROIDs: C2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by tom81 » Mon Aug 29, 2016 2:46 am

moon.linux wrote:What is the output of aplay -l

Code: Select all

aplay: device_list:268: no soundcards found...
With kernel 3.10:

Code: Select all

**** List of PLAYBACK Hardware Devices ****
card 0: odroidaudio [odroid-audio], device 0: i2s0-sec dummy-aif1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: odroidaudio [odroid-audio], device 1: i2s0-pri dummy-aif2-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Mon Aug 29, 2016 4:07 pm

==========================================================================================================
ffmpeg on XU4 update: MFC hardware decoding + encoding finally possible!
==========================================================================================================

thanks to Alexis Ballier <aballier@gentoo.org> that made the original ffmpeg plugin and thanks to @oversun that spotted the issue it had on XU4

I am able to view a movie with:

Code: Select all

ffmpeg -i ./sintel_trailer_1080p.mp4 -codec:v copy -codec:a none -bsf:v h264_mp4toannexb -f rawvideo - | ffplay -an -vcodec h264_v4l2m2m -
and also to encode:

Code: Select all

ffmpeg -i ./test.mp4 -acodec aac -vcodec h264 encoded.mp4

Code: Select all

odroid@odroid:~/Videos$ mediainfo encoded.mp4
General
Complete name                            : encoded.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 109 MiB
Duration                                 : 52s 209ms
Overall bit rate                         : 17.5 Mbps
Movie name                               : Sintel Trailer
Performer                                : Durian Open Movie Team
Description                              : Trailer for the Sintel open movie project
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf57.25.100
Copyright                                : (c) copyright Blender Foundation | durian.blender.org

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L1
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=12
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 52s 209ms
Bit rate                                 : 17.4 Mbps
Width                                    : 854 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 24.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.770
Stream size                              : 108 MiB (99%)
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 51s 947ms
Bit rate mode                            : Constant
Bit rate                                 : 129 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Frame rate                               : 46.875 fps (1024 spf)
Compression mode                         : Lossy
Stream size                              : 817 KiB (1%)
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

User avatar
mad_ady
Posts: 5260
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mad_ady » Mon Aug 29, 2016 4:21 pm

Wow, this is BIG!
But - where is the connection to the hardware encoder? I see no reference in the command line. Does this mean that all h264 encoding is done through MFC? Also, where do we get this new ffmpeg code from?

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Mon Aug 29, 2016 4:38 pm

mad_ady wrote:Wow, this is BIG!
But - where is the connection to the hardware encoder? I see no reference in the command line. Does this mean that all h264 encoding is done through MFC? Also, where do we get this new ffmpeg code from?

h264 selects the MFC decoder by default.... you can select h264_v4l2m2m if you want to make sure :)

here's debug:

Code: Select all

ffmpeg version 3.0.2-1ubuntu4 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.0 (Ubuntu 6.2.0-1ubuntu12) 20160824
  configuration: --prefix=/usr --extra-version=1ubuntu4 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 1970-01-01 00:00:00
    title           : Sintel Trailer
    artist          : Durian Open Movie Team
    encoder         : Lavf52.62.0
    copyright       : (c) copyright Blender Foundation | durian.blender.org
    description     : Trailer for the Sintel open movie project
  Duration: 00:00:52.21, start: 0.000000, bitrate: 1165 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1033 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 126 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
[h264_v4l2m2m @ 0x71ec0] Device path not set, probing /dev/video*
[h264_v4l2m2m @ 0x71ec0] Using device /dev/video5
[h264_v4l2m2m @ 0x71ec0] Suggested pixel format yuv420p is not accepted on output pool, will guess one.
[h264_v4l2m2m @ 0x71ec0] Pixelformat nv12 is accepted on output pool, using it.
Output #0, mp4, to 'encoded.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    description     : Trailer for the Sintel open movie project
    title           : Sintel Trailer
    artist          : Durian Open Movie Team
    copyright       : (c) copyright Blender Foundation | durian.blender.org
    encoder         : Lavf57.25.100
    Stream #0:0(und): Video: h264 (h264_v4l2m2m) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=2-31, 200 kb/s, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
      encoder         : Lavc57.24.102 h264_v4l2m2m
    Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : SoundHandler
      encoder         : Lavc57.24.102 aac
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_v4l2m2m @ 0x71ec0] Performing useless memcpy() on output pool because buffers do not match
[h264_v4l2m2m @ 0x71ec0] This could be avoided by using av_v4l_buffer_pool_get_buffer*() or av_v4l_buffer_pool_make_pipe()
[mp4 @ 0x86e30] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0x86e30] Encoder did not produce proper pts, making some up.
frame=   32 fps=0.0 q=-0.0 size=     385kB time=00:00:01.60 bitrate=1972.1kbits/s speed=3.17x    ^Mframe=   67 fps= 67 q=-0.0 size=    2983kB time=00:00:03.07 bitrate=7955.8kbits/s speed=3.05x    ^Mframe=  101 fps= 67 q=-0.0 size=    6771kB time=00:00:04.50 bitrate=12322.1kbits/s speed=2.99x    ^Mframe=  136 fps= 68 q=-0.0 size=   10001kB time=00:00:05.95 bitrate=13765.4kbits/s speed=2.96x    ^Mframe=  168 fps= 67 q=-0.0 size=   14529kB time=00:00:07.25 bitrate=16408.9kbits/s speed=2.89x    ^Mframe=  200 fps= 66 q=-0.0 size=   19871kB time=00:00:08.59 bitrate=18933.9kbits/s speed=2.85x    ^Mframe=  249 fps= 71 q=-0.0 size=   22356kB time=00:00:10.66 bitrate=17169.2kbits/s speed=3.04x    ^Mframe=  309 fps= 77 q=-0.0 size=   26447kB time=00:00:13.14 bitrate=16486.2kbits/s speed=3.27x    ^Mframe=  352 fps= 78 q=-0.0 size=   33772kB time=00:00:14.95 bitrate=18499.8kbits/s speed=3.31x    ^Mframe=  407 fps= 81 q=-0.0 size=   39582kB time=00:00:17.21 bitrate=18834.4kbits/s speed=3.43x    ^Mframe=  458 fps= 83 q=-0.0 size=   45657kB time=00:00:19.37 bitrate=19308.7kbits/s speed=3.51x    ^Mframe=  499 fps= 83 q=-0.0 size=   55653kB time=00:00:21.07 bitrate=21630.4kbits/s speed= 3.5x    ^Mframe=  551 fps= 84 q=-0.0 size=   64440kB time=00:00:23.21 bitrate=22743.6kbits/s speed=3.56x    ^Mframe=  595 fps= 85 q=-0.0 size=   74299kB time=00:00:25.06 bitrate=24281.6kbits/s speed=3.56x    ^Mframe=  640 fps= 85 q=-0.0 size=   83697kB time=00:00:26.94 bitrate=25447.0kbits/s speed=3.58x    ^Mframe=  695 fps= 86 q=-0.0 size=   90978kB time=00:00:29.24 bitrate=25481.7kbits/s speed=3.64x    ^Mframe=  741 fps= 87 q=-0.0 size=  100310kB time=00:00:31.12 bitrate=26401.1kbits/s speed=3.64x    ^Mframe=  789 fps= 87 q=-0.0 size=  107524kB time=00:00:33.13 bitrate=26586.7kbits/s speed=3.67x    ^Mframe=  844 fps= 88 q=-0.0 size=  114773kB time=00:00:35.45 bitrate=26517.9kbits/s speed=3.71x    ^Mframe=  899 fps= 89 q=-0.0 size=  120878kB time=00:00:37.73 bitrate=26239.1kbits/s speed=3.76x    ^Mframe=  948 fps= 90 q=-0.0 size=  127485kB time=00:00:39.78 bitrate=26248.8kbits/s speed=3.77x    ^Mframe= 1000 fps= 90 q=-0.0 size=  133913kB time=00:00:41.96 bitrate=26142.7kbits/s speed= 3.8x    ^Mframe= 1069 fps= 93 q=-0.0 size=  135436kB time=00:00:44.80 bitrate=24765.5kbits/s speed=3.88x    ^Mframe= 1144 fps= 95 q=-0.0 size=  136373kB time=00:00:47.93 bitrate=23305.5kbits/s speed=3.98x    ^Mframe= 1225 fps= 98 q=-0.0 size=  136968kB time=00:00:51.32 bitrate=21860.2kbits/s speed=4.09x    ^M[h264_v4l2m2m @ 0x71ec0] No event occurred while waiting
frame= 1253 fps= 98 q=-0.0 Lsize=  137018kB time=00:00:52.25 bitrate=21482.3kbits/s speed=4.07x
video:136173kB audio:817kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.019993%
[aac @ 0x72e00] Qavg: 659.826

the original patches are already in my repo, based on ffmpeg 2.8.2 (from ubuntu 16.04)
@oversun's patch is 1 line of code :)
and i am now running all on ffmpeg 3.x from ubuntu 16.10... i will push those patches after i fix a few more things (e.g. currently the decoder/encoder grabs the first device it finds, so the decoder may grab the encoder and fail, or the gstreamer, etc... :D)

EDIT: also a divx to h264 encoding: http://paste.debian.net/794630/

User avatar
mad_ady
Posts: 5260
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mad_ady » Mon Aug 29, 2016 6:22 pm

Holy framerates, Batman! 90+fps! I'm sold :)

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Mon Aug 29, 2016 9:42 pm

while there are still some issues with ffmpeg mfc plugin, the software decoding is not that bad either, as you can see: https://www.youtube.com/watch?v=Ie7BR3WgXWQ

mattrix
Posts: 89
Joined: Tue Jan 13, 2015 7:12 am
languages_spoken: english
ODROIDs: C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by mattrix » Tue Aug 30, 2016 6:35 am

Do you think TVheadend could use this to transcode Freeview DVB-T MPEG2 channels to H264?

Also,
CONFIG_HMP_FAST_CPU_MASK="F0"
CONFIG_HMP_SLOW_CPU_MASK="0F"
I notice these arn't set in your config: http://paste.debian.net/plain/791598
Should they be?

Also the link in your first post to your config needs updating :)

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Tue Aug 30, 2016 6:50 am

yes they should be :)

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Tue Aug 30, 2016 4:36 pm

for those interested:

i pushed the ffmpeg changes to https://github.com/mihailescu2m/FFmpeg/ ... _m2m-3.0.2

new it's oversun's patch to enable MFC decoding on XU4, and 2 more patches: one to select the correct video device (there were cases when the decoder was opening the encoder device), and one to convert H264 packets into annexB.
MFC works only with annexB frames.
however, atm this is not working, so you still need to do -codec:v copy -codec:a none -bsf:v h264_mp4toannexb -f rawvideo manually.
MFC decoding also crashes after a while sometimes - i think because there's no sleep after buf enq, and it runs out of buffers very fast....

help in testing & developing is welcome :)

ard
Posts: 72
Joined: Tue Jul 09, 2013 2:12 am
languages_spoken: english, dutch, german
ODROIDs: ODROID-U2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by ard » Tue Aug 30, 2016 5:48 pm

USB3 issues:
I've never ever had my gnic disappear on a xu4. This was a first. This was on a 15.10 "mdrjr" image.
After the install of the 4.8 kernel something retarded happened to udev/systemd, causing it to go to a 100% busy loop after ifupping a retarded interface name. Booting back into an official 3.10, the retardedness sticked.
(Naming conventions with mac-addresses are retarded, as it will cause a lot of grieve with anyone). I don't know what it did, but it was probably harassing the nic driver in such a way that the nic itself commits suicide and needs a clean *powercycle* to recover.
Usually only a reboot works, but no, in this case it was dead. This happened with 3.10 as well as with 4.8, whatever I booted, it renamed to the obnoxious enx<mac> and an ifup would kill the nic
I recovered from that by rm /lib/udev/rules.d/*net* *and* removing the use of the initrd (replace the initrd ram address with a - in the bootm command), and then do a powercycle again. After that 3.10 and 4.8 work ok again.
Earlier experiments with usbreset on a root hub indicated it wouldn't do that. Maybe because of the LPM.
Anyway: to recover from these names I use this as my /etc/udev/rules.d/70-network.rules :

Code: Select all

root@odroid:~# cat /etc/udev/rules.d/70-network.rules 
# B6P1 Internal port usb3
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/usb.2/12400000.dwc3/xhci-hcd.5.auto/usb6/6-1/6-1:1.0/net*", KERNEL=="eth*", NAME="eth0"
# B5P1 Internal port usb2 not used
# B4P1P1 Lower port usb3
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/usb.1/12000000.dwc3/xhci-hcd.2.auto/usb4/4-1/4-1.1/4-1.1:1.0/net*", KERNEL=="eth*", NAME="eth1"
# B3P1P1 Lower port usb2
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/usb.1/12000000.dwc3/xhci-hcd.2.auto/usb3/3-1/3-1.1/3-1.1:1.0/net*", KERNEL=="eth*", NAME="eth1"
# B4P1P2 Upper port usb3
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/usb.1/12000000.dwc3/xhci-hcd.2.auto/usb4/4-1/4-1.2/4-1.2:1.0/net*", KERNEL=="eth*", NAME="eth2"
# B3P1P2 Upper port usb2
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/usb.1/12000000.dwc3/xhci-hcd.2.auto/usb3/3-1/3-1.2/3-1.2:1.0/net*", KERNEL=="eth*", NAME="eth2"

# B2P1 USB1.1 root hub

# B1P1
SUBSYSTEM=="net", ACTION=="add", DEVPATH=="/devices/12110000.usb/usb1/1-1/1-1:1.0/net*", KERNEL=="eth*", NAME="eth3"
This will give any nic put into any port a dedicated device name, regardless if it is usb2 or 3. Rename to your own liking. nic1...4 would be better, but in my case I needed the name eth* for legacy reasons :-(.
On servers if there is a naming contention, I would name them nic1...n depending on their pci slot. It's the only sane way to manage 1000+ systems ;-).

The 16.04 image works out of the box after purging network-manager, as network manager seems to have bodged ipv6 support. At least the udev rules work :-).

Anyway: back to the USB3 problems: if you have the udev problems, you would likely see the gnic disappear. You will need a clean powercycle to recover from that, as there are usb3 reset issues in 3.10 as well as in 4.8, but usually only the usb3 hub was in a weird mode, and the gnic usually never disappears (it did appear as a cd-rom once on my system, as I was getting desperate and cleansed the usb3 connectors with alchol :-) ).

In the mean time:
moon.linux, how can I debug this part? I can easily make the usb3 hub disappear, so it's easy to test. Also, I can reset the usb3 hub by resetting the usb2 part, which causes the usb3 to be reset too. Maybe that's the quirck with it?
I don't think I can make the gnic disappear again. I really don't know what udev was doing.

About the MFC:
I've noticed that all stuff that worked in 14.04 with mfc on 3.10 do not work on 4.8. The mfc interface has changed.
I used to play streaming multicast video with the memeka gstreamer for the u3 on the xu4 (I think). That's been working for at least 8 months now (since I fixed using the wrong xorg driver in my private image and suddenly gles worked).
So be prepared that if you want to use the mfc you need to upgrade.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Tue Aug 30, 2016 6:09 pm

@ard
MFC: kodi still works, gstreamer-plugins-good works with newer versions, as long as you add --probe-v4l2 do the compile flags (not included by default in ubuntu package)

ard
Posts: 72
Joined: Tue Jul 09, 2013 2:12 am
languages_spoken: english, dutch, german
ODROIDs: ODROID-U2
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by ard » Tue Aug 30, 2016 10:56 pm

memeka wrote: indeed, default HMP config sets the A7 as the "fast" cores and A15 as "slow" cores :D as a result, A7 cores are preferred for heavy processes :(
with this in config, you set the correct fast/slow cores:

Code: Select all

CONFIG_HMP_FAST_CPU_MASK="F0"
CONFIG_HMP_SLOW_CPU_MASK="0F"
I think this is because earlier octa's boot with A15 CPU(Galaxy S4), but HK's boot with A7 CPU (which is I think better). This is pin configurable on the SoC.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Wed Aug 31, 2016 8:53 pm

ard wrote:
memeka wrote: indeed, default HMP config sets the A7 as the "fast" cores and A15 as "slow" cores :D as a result, A7 cores are preferred for heavy processes :(
with this in config, you set the correct fast/slow cores:

Code: Select all

CONFIG_HMP_FAST_CPU_MASK="F0"
CONFIG_HMP_SLOW_CPU_MASK="0F"
I think this is because earlier octa's boot with A15 CPU(Galaxy S4), but HK's boot with A7 CPU (which is I think better). This is pin configurable on the SoC.
I've seen reported before, and it happens to me as well: under heavy load (after a few hours of compiling) kernel crashes because of the HMP patches.
With the configuration above, HMP performs fantastically well, however those crashes are kind of a deal-breaker :(
So again, I recommend not using HMP for the time being :(

I was initially thinking of releasing an image with Ubuntu 16.10 - Gnome 3.20 Wayland in oct/nov, but now i am considering pushing the date back and releasing the image based on Debian Stretch + Gnome 3.22, as Gnome 3.22 has more wayland improvements.

hokoon
Posts: 262
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by hokoon » Tue Sep 06, 2016 11:47 pm

And I'm just visiting here every day waiting for ffmpeg with mfc hw encoder.

User avatar
memeka
Posts: 4168
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by memeka » Wed Sep 07, 2016 5:42 am

hokoon wrote:And I'm just visiting here every day waiting for ffmpeg with mfc hw encoder.
the econder works in ffmpeg, it's the decoder that still have some issues.

Matioupi
Posts: 48
Joined: Fri Aug 05, 2016 3:56 pm
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by Matioupi » Wed Sep 14, 2016 4:12 am

Hello,

did you "guru's" made any progress on USB 3.0 issue ?

will there be an Odroid official 16.10 release with "high performance" drivers coming out sooner or later ?

regards

kicker22004
Posts: 51
Joined: Tue Dec 08, 2015 4:20 am
languages_spoken: english
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by kicker22004 » Tue Sep 20, 2016 3:12 pm

I'm very interested in this project. Anyone have an updated image for testing? Or would someone be willing to clone their drive for me?

derko
Posts: 58
Joined: Tue Jul 14, 2015 2:16 am
languages_spoken: englisch, german
ODROIDs: XU4
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by derko » Wed Sep 21, 2016 6:53 am

Let´s talk about the remaining issues - it is time to update and i like to know what´s working and what not. Is there any showstopper for an odroid default image ?

I am still on 4.7-rc6 (https://github.com/ioft/linux/tree/new_master) with minor changes to the config, but:
-> USB 3.0 is working stable for me now since beginning of july (http://forum.odroid.com/viewtopic.php?f ... 50#p150507). Transfer speed is about 80 mb/s with two attached external HDDs, i´ve copied over many gigabytes since then, no single crash.
-> Also, all cores work + fan spins depending on temperature as expected
-> Headless (VNC) only so i can´t tell about HDMI or acceleration

Can we create one list of issues so that new people and also odroid-guys can decide on jumping on the train or not ?


EDIT:
My config is:
Fetch URL: https://github.com/ioft/linux.git
Kernelconfig: http://pastebin.com/tnjVpGhX

Thanks !

beopbo
Posts: 2
Joined: Sun Oct 02, 2016 1:29 am
languages_spoken: english, german, french
ODROIDs: XU3 lite, XU4, C1
Contact:

Re: Odroid XU3/XU4 NEXT thread

Unread post by beopbo » Sun Oct 02, 2016 1:46 am

derko wrote:Let´s talk about the remaining issues - it is time to update and i like to know what´s working and what not. Is there any showstopper for an odroid default image ?

I am still on 4.7-rc6 (https://github.com/ioft/linux/tree/new_master) with minor changes to the config, but:
-> USB 3.0 is working stable for me now since beginning of july (http://forum.odroid.com/viewtopic.php?f ... 50#p150507). Transfer speed is about 80 mb/s with two attached external HDDs, i´ve copied over many gigabytes since then, no single crash.
-> Also, all cores work + fan spins depending on temperature as expected
-> Headless (VNC) only so i can´t tell about HDMI or acceleration

Can we create one list of issues so that new people and also odroid-guys can decide on jumping on the train or not ?
Fetch URL: https://github.com/ioft/linux.git
Kernelconfig: http://pastebin.com/tnjVpGhX

Thanks !
Hallo derko,

I tried your links, because I' m also interested in Headless XU3(lite) + working USB3.0 (mainly for Network, in another setup for HDD)..
But I can't find your referenced 4.7-rc6 at your link, just a 4.8-rc8 while using the Fetch URL??
I use your config with this new version, and reached, that on XU3 lite only USB3 is working, if for example an usb stick is placed in some of the usb2.0 - Port ??
(without plugging anything into the USB2.0 Port, the USB3.0 Port doesn't reached a Gigabit USB3.0 Adapter ...)
Do you have the same strange issue in your setup ??

bye

Post Reply

Return to “Linux Kernel 4.14 Debugging Party”

Who is online

Users browsing this forum: No registered users and 1 guest