Compiling Kodi to make it have hardware decoding

everlasting
Posts: 47
Joined: Thu Mar 28, 2019 7:10 am
languages_spoken: english
ODROIDs: N2
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by everlasting » Thu Aug 22, 2019 10:14 am

hi, i already changed the default and desktop image has the sound through my speakers, its only when im in kodi that audio is switched to hdmi
edit: actually nevermind for now, seems running kodi like this is not as good as using corelec anyways, thanks for the help
These users thanked the author everlasting for the post:
alpe (Fri Oct 04, 2019 1:09 am)

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Fri Aug 23, 2019 2:35 pm

@OverSun,

Can you please compare this output with yours?

Code: Select all

# cec-client -l
libCEC version: 4.0.4, git revision: libcec-4.0.4+1-ba9b538, compiled on Fri Aug 23 02:38:50 UTC 2019 by odroid@odroid on Linux 4.9.187-53 (aarch64),C
Found devices: 1

device:              1
com port:            AOCEC
vendor id:           0000
product id:          0000
firmware version:    5
type:                unknown
The libcec4 package from Canonical might miss "AOCEC_API" option.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by OverSun » Fri Aug 23, 2019 3:16 pm

This is my output:

Code: Select all

root@n2:~# cec-client -l
libCEC version: 4.0.4, git revision: libcec-4.0.4+1-ba9b538, compiled on Wed Jul 10 10:17:25 UTC 2019 by root@localhost on Linux 4.9.182+ (aarch64), features: P8_USB, DRM, P8_detect, AOCEC
Found devices: 1

device:              1
com port:            AOCEC
vendor id:           0000
product id:          0000
firmware version:    5
type:                unknown
The problem is not the package, the problem is this:

Code: Select all

root@n2:~# cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 4.0.4
no serial port given. trying autodetect:
 path:     /dev/aocec
 com port: AOCEC

opening a connection to the CEC adapter...
DEBUG:   [             160]	Broadcast (F): osd name set to 'Broadcast'
NOTICE:  [             160]	connection opened
DEBUG:   [             160]	<< Broadcast (F) -> TV (0): POLL
TRAFFIC: [             160]	<< f0
DEBUG:   [             160]	processor thread started
DEBUG:   [             160]	>> POLL sent
DEBUG:   [             160]	TV (0): device status changed into 'present'
DEBUG:   [             160]	<< requesting vendor ID of 'TV' (0)
TRAFFIC: [             160]	<< f0:8c
DEBUG:   [            1160]	expected response not received (87: device vendor id)
TRAFFIC: [            1161]	<< f0:8c
DEBUG:   [            2161]	expected response not received (87: device vendor id)
NOTICE:  [            2161]	registering new CEC client - v4.0.4
DEBUG:   [            2161]	detecting logical address for type 'recording device'
DEBUG:   [            2161]	trying logical address 'Recorder 1'
DEBUG:   [            2161]	<< Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [            2161]	<< 11
DEBUG:   [            2161]	>> POLL sent
unable to open the device on port AOCEC
DEBUG:   [            2161]	logical address 'Recorder 1' already taken
DEBUG:   [            2161]	Recorder 1 (1): device status changed into 'present'
DEBUG:   [            2161]	trying logical address 'Recorder 2'
DEBUG:   [            2161]	<< Recorder 2 (2) -> Recorder 2 (2): POLL
TRAFFIC: [            2161]	<< 22
DEBUG:   [            2161]	>> POLL sent
DEBUG:   [            2161]	logical address 'Recorder 2' already taken
DEBUG:   [            2161]	Recorder 2 (2): device status changed into 'present'
DEBUG:   [            2161]	trying logical address 'Recorder 3'
DEBUG:   [            2161]	<< Recorder 3 (9) -> Recorder 3 (9): POLL
TRAFFIC: [            2161]	<< 99
DEBUG:   [            2161]	>> POLL sent
DEBUG:   [            2161]	logical address 'Recorder 3' already taken
DEBUG:   [            2161]	Recorder 3 (9): device status changed into 'present'
ERROR:   [            2161]	AllocateLogicalAddresses - failed to allocate device '0', type 'recording device'
ERROR:   [            2161]	failed to find a free logical address for the client
ERROR:   [            2161]	failed to register the new CEC client - cannot allocate the requested device types
ERROR:   [            2161]	failed to register a CEC client
DEBUG:   [            2161]	unregistering all CEC clients
As you can see in the output cec itself "works", and can even read the TV and data going back and forward (sometime, but not in this output for some reason), what it cannot do, - it cannot obtain client slot: "logical address 'Recorder 1' already taken" and so on up to 3.
CEC itself is a strictly limited system, it communicate on the bus where every device must have an id (like i2c thing), and there are 4 types of devices (cec-client -t option) each having 3 devices id to use. so basically there cannot be more than 12 devices on the bus.
The problem with current cec is whatever device id it is trying to assign - it's already taken by something, code always return that logic address is not available to request.

Also there is pretty strange boot log, but I'm not sure how invalid it is:

Code: Select all

root@n2:~# journalctl --boot | grep -i cec
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cec driver date:Ver 2019/3/25
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: compatible:amlogic, aocec-g12a
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cecb_ver:0x1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: line_reg:0x1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: line_bit:0x3
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: ee_to_ao:0x1
Jul 25 18:19:52 n2.local kernel: input: cec_input as /devices/virtual/input/input0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: not find 'port_num'
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: using cec:1
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: no hdmirx regs
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: no hhi regs
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: not find 'output'
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: irq cnt:2
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: wakeup_reason:0x0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: cev val1: 0x0;val2: 0x0
Jul 25 18:19:52 n2.local kernel: cectx ff80023c.aocec: aml_cec_probe success end
Aug 21 22:38:56 n2.local systemd-logind[3259]: Watching system buttons on /dev/input/event0 (cec_input)
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91
Aug 21 22:39:04 n2.local kernel: cectx ff80023c.aocec: bad iniator with self:CEC RX len 5: 0f 87 00 e0 91

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Fri Aug 23, 2019 3:19 pm

Thanks,
We will look into what you pointed more closely.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by OverSun » Sat Aug 24, 2019 8:40 pm

Maybe something has changed since the very first upstream that I tried, but I do remember I've seen my TV in output of cec-client, and the problem was that all devices were occupied, but now I don't see any return from TV in cec-client, it very quickly goes through all ioctls and fails with no available device id found, but maybe that's just a side effect now of that every ioctl fail.
Anyways, this is seems to be somewhere between HDMI and CEC code, cec itself seems to be available, there are some dmesg, but the data doesn't reach userspace and maybe other way around as well.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by dbod » Mon Aug 26, 2019 8:43 pm

odroid wrote:
Mon Aug 19, 2019 7:03 pm
No.. I was wrong.
You can run the Kodi on the latest Mate image.

Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.

Code: Select all

apt install mali-fbdev kodi aml-libs
type and run "kodi" on the VT.

Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
This is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.

cap00k
Posts: 88
Joined: Tue May 21, 2013 10:46 am
languages_spoken: english
ODROIDs: ODROID
Has thanked: 0
Been thanked: 10 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by cap00k » Wed Aug 28, 2019 6:25 pm

@OverSun,

It seems to be caused by 'cec_func_config' not defined in the code below.

https://github.com/hardkernel/linux/blo ... 5038-L5072
https://github.com/hardkernel/linux/blo ... ec.c#L1774

add "hdmitx = cec3f" to the boot.ini file bootargs,
I checked on LG-TV, it works well.
setenv bootargs "root=...... hdmitx=cec3f ......"
Can you check it?
These users thanked the author cap00k for the post:
sensei73 (Thu Aug 29, 2019 4:18 pm)

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by OverSun » Wed Aug 28, 2019 7:21 pm

damn, I really wanted to test this old config from C2, I had the suspicion the code is just the old one taken from C2 kernel.
Last week was so hectic for me I was not able to do that, going to do that this evening. Thanks for reminding me the idea!

PS. Yes, it works! Confirmed.
These users thanked the author OverSun for the post:
odroid (Thu Aug 29, 2019 9:30 am)

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Thu Aug 29, 2019 9:41 am

Thank you for the confirmation. I've updated the WiKi page.
https://wiki.odroid.com/odroid-n2/os_im ... 90806#kodi
These users thanked the author odroid for the post:
sensei73 (Thu Aug 29, 2019 4:18 pm)

sensei73
Posts: 8
Joined: Mon Aug 05, 2019 1:26 am
languages_spoken: english
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by sensei73 » Thu Aug 29, 2019 4:19 pm

Thanks I can confirm, cec is working again! H265 still not working in Kodi.

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Thu Aug 29, 2019 4:25 pm

I've tested a few different H.265 sample videos and they worked fine.
This heavy 60FPS 4K H.265 sample played smoothly.
SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv

http://4ksamples.com/ses-astra-uhd-test-1-2160p-uhdtv/

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Thu Aug 29, 2019 4:35 pm

dbod wrote:
Mon Aug 26, 2019 8:43 pm
odroid wrote:
Mon Aug 19, 2019 7:03 pm
No.. I was wrong.
You can run the Kodi on the latest Mate image.

Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.

Code: Select all

apt install mali-fbdev kodi aml-libs
type and run "kodi" on the VT.

Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
This is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.
I've used the Kodi on the latest Mate image over two weeks.
But Kodi 18.3 seems to be working on 1080p or 2160p monitor only.
What is your display native resolution?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by OverSun » Thu Aug 29, 2019 4:58 pm

H265 is also working for me. Not brilliantly reliable, rewind work bad, resume from a time point work bad and watching next H265 clip after one fails 50/50, which basically reflect amlogic quality code in general (H265 is waaaaaay more complicated to implement than H264), but in general this can be called "working".

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by dbod » Thu Aug 29, 2019 5:03 pm

odroid wrote:
Thu Aug 29, 2019 4:35 pm
dbod wrote:
Mon Aug 26, 2019 8:43 pm
odroid wrote:
Mon Aug 19, 2019 7:03 pm
No.. I was wrong.
You can run the Kodi on the latest Mate image.

Press "ctrl-alt-F3" to open a virtual terminal and type the following commands to install kodi.
You have to login as a "root" on the VT.

Code: Select all

apt install mali-fbdev kodi aml-libs
type and run "kodi" on the VT.

Once you exit from kodi, you can return to the Mate desktop by pressing "ctrl-alt-F7".
This is not yet fully true. At least for me there are strange artifacts and it looks like the Kodi UI seems to emerge over the regular screen output. So it is not usable yet, but I guess it would only be some small changes until it really works.
I've used the Kodi on the latest Mate image over two weeks.
But Kodi 18.3 seems to be working on 1080p or 2160p monitor only.
What is your display native resolution?
It is a 4K TV, thus 3840 x 2160.

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Thu Aug 29, 2019 5:15 pm

I'm also using a 4K HDR TV. I set the 4K resolution on the Kodi display settings.

Can you take a picture of the strange artifacts ?

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by dbod » Thu Aug 29, 2019 6:00 pm

Will do.

User avatar
odroid
Site Admin
Posts: 32540
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 186 times
Been thanked: 350 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by odroid » Thu Aug 29, 2019 6:37 pm

OverSun wrote:
Thu Aug 29, 2019 4:58 pm
H265 is also working for me. Not brilliantly reliable, rewind work bad, resume from a time point work bad and watching next H265 clip after one fails 50/50, which basically reflect amlogic quality code in general (H265 is waaaaaay more complicated to implement than H264), but in general this can be called "working".
I have to say the Kodi reliability on Ubuntu is far worse than CoreELEC OS.
When we played with CE for a few days, we felt it was almost consumer product level. Rewind, seek, pause and resume with 4K H265 videos worked fine on a recent CE nightly build.


So I consider using a multi-boot function with Ubuntu + CoreELEC via Petitboot since we don't know when the issues can be fixed.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by dbod » Fri Aug 30, 2019 2:27 am

odroid wrote:
Thu Aug 29, 2019 5:15 pm
I'm also using a 4K HDR TV. I set the 4K resolution on the Kodi display settings.

Can you take a picture of the strange artifacts ?
How can I share that picture with you easily? I don't have any pastebin, imgur or whatever accounts....

User avatar
mad_ady
Posts: 6795
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by mad_ady » Fri Aug 30, 2019 2:49 am

imgur doesn't require an account to post an image.

dbod
Posts: 73
Joined: Fri Apr 26, 2019 10:03 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 4 times
Been thanked: 1 time
Contact:

Re: Compiling Kodi to make it have hardware decoding

Unread post by dbod » Fri Aug 30, 2019 4:23 am

odroid wrote:
Thu Aug 29, 2019 5:15 pm
I'm also using a 4K HDR TV. I set the 4K resolution on the Kodi display settings.

Can you take a picture of the strange artifacts ?
    As you can see, the Kodi "interface" is only partially visible. The more you use Kodi, the better the picture gets :-) Until it finally reaches 100%. But every now and then it starts off like this again.

    You cannot see it but in the terminal below I started kodi with "sudo kodi". I hope it is something trivial that I am doing wrong.

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Fri Aug 30, 2019 8:31 am

    As I described, you had to run Kodi on a VT.
    "Press Ctrl-Alt-F3" and login with root/odroid on the VT.
    viewtopic.php?f=177&t=34438&start=50#p266126

    dbod
    Posts: 73
    Joined: Fri Apr 26, 2019 10:03 pm
    languages_spoken: english
    ODROIDs: N2
    Has thanked: 4 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by dbod » Fri Aug 30, 2019 9:01 pm

    My bad. I did not know about those virtual terminals yet. That's why I did not get the point. Now this explains the effects that saw see pretty well.

    dbod
    Posts: 73
    Joined: Fri Apr 26, 2019 10:03 pm
    languages_spoken: english
    ODROIDs: N2
    Has thanked: 4 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by dbod » Mon Sep 02, 2019 6:36 pm

    odroid wrote:
    Thu Aug 29, 2019 9:41 am
    Thank you for the confirmation. I've updated the WiKi page.
    https://wiki.odroid.com/odroid-n2/os_im ... 90806#kodi
    When doing the cmake and the actual make there is a bug in the file env.h, where the git version inserted at line 92 (#define "LIB_INFO") contains a line break, which makes the compiler choke (at lease in my environment). Just join this and the following line and the make runs without any problems.

    But still no device is found:

    Code: Select all

    odroid ~ ❯❯❯ cec-client -l
    libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic ... , features: P8_USB, DRM, P8_detect, randr
    Found devices: NONE
    odroid ~ ❯❯❯ cat /proc/cmdline
    root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw console=ttyS0,115200n8  no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=2160p60hz cvbsmode=576cvbs max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=hdmi  disablehpd=false cvbscable= overscan=100  monitor_onoff=false 
    usb-xhci.tablesize=2 logo=osd0,loaded hdmitx=cec3f enable_wol=1
    odroid ~ ❯❯❯
    

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Tue Sep 03, 2019 8:58 am

    Our tested libCEC version was 4.0.4.

    dbod
    Posts: 73
    Joined: Fri Apr 26, 2019 10:03 pm
    languages_spoken: english
    ODROIDs: N2
    Has thanked: 4 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by dbod » Wed Sep 04, 2019 5:45 pm

    odroid wrote:
    Tue Sep 03, 2019 8:58 am
    Our tested libCEC version was 4.0.4.
    Right. There must be something strange going on during the compilation.

    It looks like cmake prepares things correctly:

    Code: Select all

    odroid ~/l/build ❯❯❯ cmake -DHAVE_AOCEC_API=1 ..                                            master
    -- git found: /home/pi/libcec/build/HEAD
    libcec-4.0.4+1-ba9b538
    CMake Deprecation Warning at /usr/share/cmake-3.10/Modules/UseSWIG.cmake:231 (message):
      SWIG_ADD_MODULE is deprecated.  Use SWIG_ADD_LIBRARY instead.
    Call Stack (most recent call first):
      src/libcec/cmake/CheckPlatformSupport.cmake:190 (swig_add_module)
      src/libcec/CMakeLists.txt:134 (include)
    
    
    -- Configured features:
    -- Pulse-Eight CEC Adapter:                yes
    -- Pulse-Eight CEC Adapter detection:      yes
    -- xrandr support:                         yes
    -- Raspberry Pi support:                   no
    -- TDA995x support:                        no
    -- Exynos support:                         no
    -- DRM support:                            yes
    -- AOCEC support:                          yes
    -- Python support:                         version 3.6.8 (3.6)
    -- lib info: git revision: /home/pi/libcec/build/HEAD
    libcec-4.0.4+1-ba9b538, compiled on Mi 4. Sep 08:35:14 UTC 2019 by pi@odroid.fritz.box on Linux 4.9.187-53 (aarch64), features: P8_USB, DRM, P8_detect, randr, AOCEC
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/pi/libcec/build
    
    It obviously uses libcec-4-0.4....

    But after compiling and installing we have

    Code: Select all

    odroid ~ ❯❯❯ cec-client -l                                                          master
    libCEC version: 4.0.2, compiled on Linux-4.4.0-142-generic ... , features: P8_USB, DRM, P8_detect, randr
    Found devices: NONE
    
    Grrr....

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Wed Sep 04, 2019 5:58 pm

    Remove the canonical's libcec package and build/install the 4.0.4 source will solve the issue probably.

    dbod
    Posts: 73
    Joined: Fri Apr 26, 2019 10:03 pm
    languages_spoken: english
    ODROIDs: N2
    Has thanked: 4 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by dbod » Wed Sep 04, 2019 6:52 pm

    I guess. But for me this would mean too much messing around. You end up in states that you cannot (remember to) reproduce once you have to :-)

    gerulrich
    Posts: 8
    Joined: Tue Jun 18, 2019 10:00 pm
    languages_spoken: english,spanish
    ODROIDs: N2
    Has thanked: 0
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by gerulrich » Wed Sep 11, 2019 1:00 am

    I have compile and install libcec it this way:

    Code: Select all

    cd ~
    mkdir -p ~/ubuntu-packages/libcec-package
    cd ~/ubuntu-packages/libcec-package
    apt-get build-dep libcec4
    apt-get source libcec4
    cd libcec-4.0.2+dfsg1
    vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line
    debuild -us -uc
    cd ~/ubuntu-packages/libcec4-packages
    sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    
    Then you can install kodi with apt-get without problems and cec working.

    On the other hand, kodi binary addons packages are broken (pvr addons at least). I have compiled some addons myself, but it would be great if they could fix them.

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Wed Sep 11, 2019 8:28 am

    @gerulrich,
    Thank you for sharing the instruction to fix the CEC problem.
    We will consider making our own libcec and addon packages for easier life.

    dbod
    Posts: 73
    Joined: Fri Apr 26, 2019 10:03 pm
    languages_spoken: english
    ODROIDs: N2
    Has thanked: 4 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by dbod » Wed Sep 11, 2019 7:27 pm

    odroid wrote:
    Wed Sep 11, 2019 8:28 am
    We will consider making our own libcec and addon packages for easier life.
    And it works. Thanks.

    gerulrich
    Posts: 8
    Joined: Tue Jun 18, 2019 10:00 pm
    languages_spoken: english,spanish
    ODROIDs: N2
    Has thanked: 0
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by gerulrich » Wed Sep 11, 2019 10:18 pm

    Another thing, I put a hold in the libcec4 and cec-utils packages to avoid updating with the repository version that does not have AOCEC enabled:

    Code: Select all

    sudo apt-mark hold libcec4
    sudo apt-mark hold cec-utils
    

    istanbulls
    Posts: 72
    Joined: Tue May 14, 2019 10:18 pm
    languages_spoken: Turkish
    ODROIDs: ODROID N2
    Has thanked: 20 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by istanbulls » Sat Sep 14, 2019 9:23 pm

    I installed Kodi, it worked fine. Thank you.
    I have a problem, I installed a Turkish language pack. Now I just see the Kodi font and the blue strips, I can't see anything else. what should I do? I can't get into the settings because I don't see them.

    User avatar
    memeka
    Posts: 4370
    Joined: Mon May 20, 2013 10:22 am
    languages_spoken: english
    ODROIDs: XU rev2 + eMMC + UART
    U3 + eMMC + IO Shield + UART
    Has thanked: 1 time
    Been thanked: 39 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by memeka » Sat Sep 14, 2019 9:33 pm

    delete ~/.kodi
    These users thanked the author memeka for the post:
    istanbulls (Sat Sep 14, 2019 10:17 pm)

    istanbulls
    Posts: 72
    Joined: Tue May 14, 2019 10:18 pm
    languages_spoken: Turkish
    ODROIDs: ODROID N2
    Has thanked: 20 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by istanbulls » Sat Sep 14, 2019 10:18 pm

    memeka wrote:
    Sat Sep 14, 2019 9:33 pm
    delete ~/.kodi
    thank you for your help.

    "delete ~ / .kodi" command does not work

    gerulrich
    Posts: 8
    Joined: Tue Jun 18, 2019 10:00 pm
    languages_spoken: english,spanish
    ODROIDs: N2
    Has thanked: 0
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by gerulrich » Sat Sep 14, 2019 10:43 pm

    The command is

    Code: Select all

     
    rm -r ~/.kodi
    

    Enviado desde mi Redmi Note 4 mediante Tapatalk
    Last edited by gerulrich on Sun Sep 15, 2019 5:22 am, edited 1 time in total.

    elatllat
    Posts: 1575
    Joined: Tue Sep 01, 2015 8:54 am
    languages_spoken: english
    ODROIDs: XU4, N1, N2
    Has thanked: 24 times
    Been thanked: 65 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by elatllat » Sun Sep 15, 2019 4:17 am

    lol that's "-r" not "- r"

    User avatar
    mad_ady
    Posts: 6795
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4, C1+, C2, N1, H2, N2
    Location: Bucharest, Romania
    Has thanked: 216 times
    Been thanked: 166 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by mad_ady » Sun Sep 15, 2019 4:22 am

    Good thing it wasn't ~ r :D

    gerulrich
    Posts: 8
    Joined: Tue Jun 18, 2019 10:00 pm
    languages_spoken: english,spanish
    ODROIDs: N2
    Has thanked: 0
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by gerulrich » Sun Sep 15, 2019 5:24 am

    elatllat wrote:
    Sun Sep 15, 2019 4:17 am
    lol that's "-r" not "- r"
    thanks, i fixed the typo

    istanbulls
    Posts: 72
    Joined: Tue May 14, 2019 10:18 pm
    languages_spoken: Turkish
    ODROIDs: ODROID N2
    Has thanked: 20 times
    Been thanked: 1 time
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by istanbulls » Sun Sep 15, 2019 5:57 pm

    I have two different edit, which is most accurate? :) :D

    alpe
    Posts: 67
    Joined: Sat Apr 12, 2014 1:21 pm
    languages_spoken: portuguese, english
    ODROIDs: C1, N2 4GB
    Location: Rio de Janeiro, Brazil
    Has thanked: 12 times
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by alpe » Fri Oct 04, 2019 12:58 am

    While I wait for my board I'm doing some research.

    How to install Kodi on Ubuntu minimal?
    Acceleration works on minimal?
    How can I open Kodi automatically on boot? Rc.local?

    Thanks.

    gerulrich
    Posts: 8
    Joined: Tue Jun 18, 2019 10:00 pm
    languages_spoken: english,spanish
    ODROIDs: N2
    Has thanked: 0
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by gerulrich » Fri Oct 04, 2019 1:21 am

    alpe wrote:
    Fri Oct 04, 2019 12:58 am
    While I wait for my board I'm doing some research.

    How to install Kodi on Ubuntu minimal?
    Acceleration works on minimal?
    How can I open Kodi automatically on boot? Rc.local?

    Thanks.

    if you need cec working with kodi do the following:
    Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.

    Code: Select all

    sudo apt-get update
    mkdir -p ~/ubuntu-packages/libcec-package
    cd ~/ubuntu-packages/libcec-package
    apt-get build-dep libcec4
    apt-get source libcec4
    cd libcec-4.0.2+dfsg1
    # edit debian/rules
    vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save
    debuild -us -uc
    cd ~/ubuntu-packages/libcec-package
    sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo apt-mark hold libcec4
    sudo apt-mark hold cec-utils
    
    after that you can install kodi with:

    Code: Select all

    apt-get install kodi aml-libs
    
    Add a service file for kodi: /etc/systemd/system/kodi.service

    Code: Select all

    [Unit]
    Description=Kodi
    After=network.target
    
    [Service]
    Type=simple
    # Another Type: forking
    User=kodi
    WorkingDirectory=/home/kodi
    ExecStart=/usr/bin/kodi-standalone
    Restart=on-failure
    # Other restart options: always, on-abort, etc
    
    # The install section is needed to use
    # `systemctl enable` to start on boot
    # For a user service that you want to enable
    # and start automatically, use `default.target`
    # For system level services, use `multi-user.target`
    [Install]
    WantedBy=multi-user.target
    
    I use kodi as user, but you can use whatever you want. You must verify that the user has the required permissions.

    Code: Select all

    
    systemctl daemon-reload
    systemctl start kodi
    systemctl enable kodi
    
    
    that's all i think
    These users thanked the author gerulrich for the post (total 2):
    alpe (Fri Oct 04, 2019 3:05 am) • rooted (Fri Oct 04, 2019 1:48 pm)

    alpe
    Posts: 67
    Joined: Sat Apr 12, 2014 1:21 pm
    languages_spoken: portuguese, english
    ODROIDs: C1, N2 4GB
    Location: Rio de Janeiro, Brazil
    Has thanked: 12 times
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by alpe » Fri Oct 04, 2019 3:05 am

    gerulrich wrote:
    Fri Oct 04, 2019 1:21 am
    alpe wrote:
    Fri Oct 04, 2019 12:58 am
    While I wait for my board I'm doing some research.

    How to install Kodi on Ubuntu minimal?
    Acceleration works on minimal?
    How can I open Kodi automatically on boot? Rc.local?

    Thanks.

    if you need cec working with kodi do the following:
    Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.

    Code: Select all

    sudo apt-get update
    mkdir -p ~/ubuntu-packages/libcec-package
    cd ~/ubuntu-packages/libcec-package
    apt-get build-dep libcec4
    apt-get source libcec4
    cd libcec-4.0.2+dfsg1
    # edit debian/rules
    vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save
    debuild -us -uc
    cd ~/ubuntu-packages/libcec-package
    sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo apt-mark hold libcec4
    sudo apt-mark hold cec-utils
    
    after that you can install kodi with:

    Code: Select all

    apt-get install kodi aml-libs
    
    Add a service file for kodi: /etc/systemd/system/kodi.service

    Code: Select all

    [Unit]
    Description=Kodi
    After=network.target
    
    [Service]
    Type=simple
    # Another Type: forking
    User=kodi
    WorkingDirectory=/home/kodi
    ExecStart=/usr/bin/kodi-standalone
    Restart=on-failure
    # Other restart options: always, on-abort, etc
    
    # The install section is needed to use
    # `systemctl enable` to start on boot
    # For a user service that you want to enable
    # and start automatically, use `default.target`
    # For system level services, use `multi-user.target`
    [Install]
    WantedBy=multi-user.target
    
    I use kodi as user, but you can use whatever you want. You must verify that the user has the required permissions.

    Code: Select all

    
    systemctl daemon-reload
    systemctl start kodi
    systemctl enable kodi
    
    
    that's all i think
    Thanks. Should work on Armbian as well, right?

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Fri Oct 04, 2019 9:45 am

    alpe wrote:
    Fri Oct 04, 2019 3:05 am
    Thanks. Should work on Armbian as well, right?
    Probably not since they have supported GPU/VPU driver packages very rarely.
    These users thanked the author odroid for the post:
    alpe (Fri Oct 04, 2019 10:11 am)

    alpe
    Posts: 67
    Joined: Sat Apr 12, 2014 1:21 pm
    languages_spoken: portuguese, english
    ODROIDs: C1, N2 4GB
    Location: Rio de Janeiro, Brazil
    Has thanked: 12 times
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by alpe » Fri Oct 04, 2019 10:14 am

    odroid wrote:
    Fri Oct 04, 2019 9:45 am
    alpe wrote:
    Fri Oct 04, 2019 3:05 am
    Thanks. Should work on Armbian as well, right?
    Probably not since they have supported GPU/VPU driver packages very rarely.
    :/
    TBH I think the only think I would miss without armbian on the N2 is the use of zram for logs and /tmp.
    Think I'll just look into how to do the same. StuartIanNaylor/zram-config should do it.

    LostMyDroid
    Posts: 25
    Joined: Tue Jan 13, 2015 10:06 am
    languages_spoken: english
    ODROIDs: XU3 - Lite
    Has thanked: 0
    Been thanked: 0
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by LostMyDroid » Thu Oct 10, 2019 4:39 am

    Will Ubuntu Kodi work on a 720p TV or is that resolution too low?

    User avatar
    odroid
    Site Admin
    Posts: 32540
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 186 times
    Been thanked: 350 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by odroid » Thu Oct 10, 2019 8:45 am

    We didn't try 720p mode but it seems to be support 1080p and 2160p only.
    Please try it if you don't mind.

    LostMyDroid
    Posts: 25
    Joined: Tue Jan 13, 2015 10:06 am
    languages_spoken: english
    ODROIDs: XU3 - Lite
    Has thanked: 0
    Been thanked: 0
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by LostMyDroid » Thu Oct 10, 2019 9:17 am

    I tried minimal install and res seemed to indicate 540 X ? . I was not able to change it from that setting and picture quality was terrible. Coreelec works great at 720p but it would be good to have a web browser.

    Edit: probably a stupid question but why does Coreelec support 720p but not Linux. I assume this is a software issue not the N-2s hardware

    elatllat
    Posts: 1575
    Joined: Tue Sep 01, 2015 8:54 am
    languages_spoken: english
    ODROIDs: XU4, N1, N2
    Has thanked: 24 times
    Been thanked: 65 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by elatllat » Sat Oct 12, 2019 1:17 pm

    LostMyDroid wrote:
    Thu Oct 10, 2019 9:17 am
    ...why does Coreelec [not] support ... Linux...
    Coreelec is Linux Distrobution like Ubuntu etc; except it has fewer official packages, some kernel + driver modifications, and kodi instead of a desktop.

    LostMyDroid
    Posts: 25
    Joined: Tue Jan 13, 2015 10:06 am
    languages_spoken: english
    ODROIDs: XU3 - Lite
    Has thanked: 0
    Been thanked: 0
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by LostMyDroid » Sun Oct 13, 2019 9:06 am

    @ elatllat
    You seem to have reworded and parsed my statement so it doesn't make sense.
    The point I was making is Coreelec supports 720p on the Odroid N-2 but Ubuntu does not. This sounds like a limitation of the Ubuntu version for Odroid. Could this or will this be fixed. I noticed someone else raised the matter in an earlier post on this thread and was ignored

    alpe
    Posts: 67
    Joined: Sat Apr 12, 2014 1:21 pm
    languages_spoken: portuguese, english
    ODROIDs: C1, N2 4GB
    Location: Rio de Janeiro, Brazil
    Has thanked: 12 times
    Been thanked: 5 times
    Contact:

    Re: Compiling Kodi to make it have hardware decoding

    Unread post by alpe » Wed Oct 16, 2019 8:02 am

    gerulrich wrote:
    Fri Oct 04, 2019 1:21 am
    alpe wrote:
    Fri Oct 04, 2019 12:58 am
    While I wait for my board I'm doing some research.

    How to install Kodi on Ubuntu minimal?
    Acceleration works on minimal?
    How can I open Kodi automatically on boot? Rc.local?

    Thanks.

    if you need cec working with kodi do the following:
    Edit /media/boot/boot.ini and add hdmitx=cec3f in bootargs.

    Code: Select all

    sudo apt-get update
    mkdir -p ~/ubuntu-packages/libcec-package
    cd ~/ubuntu-packages/libcec-package
    apt-get build-dep libcec4
    apt-get source libcec4
    cd libcec-4.0.2+dfsg1
    # edit debian/rules
    vim debian/rules # add -DHAVE_AOCEC_API=1 in dh_auto_configure line and save
    debuild -us -uc
    cd ~/ubuntu-packages/libcec-package
    sudo dpkg -i libcec4_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo dpkg -i cec-utils_4.0.2+dfsg1-2ubuntu1.1_arm64.deb
    sudo apt-mark hold libcec4
    sudo apt-mark hold cec-utils
    
    after that you can install kodi with:

    Code: Select all

    apt-get install kodi aml-libs
    
    Add a service file for kodi: /etc/systemd/system/kodi.service

    Code: Select all

    [Unit]
    Description=Kodi
    After=network.target
    
    [Service]
    Type=simple
    # Another Type: forking
    User=kodi
    WorkingDirectory=/home/kodi
    ExecStart=/usr/bin/kodi-standalone
    Restart=on-failure
    # Other restart options: always, on-abort, etc
    
    # The install section is needed to use
    # `systemctl enable` to start on boot
    # For a user service that you want to enable
    # and start automatically, use `default.target`
    # For system level services, use `multi-user.target`
    [Install]
    WantedBy=multi-user.target
    
    I use kodi as user, but you can use whatever you want. You must verify that the user has the required permissions.

    Code: Select all

    
    systemctl daemon-reload
    systemctl start kodi
    systemctl enable kodi
    
    
    that's all i think
    I had to create the user Kodi manually with:

    Code: Select all

    sudo adduser --disabled-password --disabled-login kodi
    And run:
    sudo usermod -a -G cdrom,audio,video,plugdev,users,dialout,dip,input,netdev kodi
    as suggested in other post.

    Post Reply

    Return to “Ubuntu”

    Who is online

    Users browsing this forum: No registered users and 5 guests