Odroid C2 mainline kernel support

Post Reply
Flole
Posts: 34
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by Flole »

I finally wanted to try to upgrade my NFS-Based system's kernel again. Unfortunately it's still the same issue as before, even with the dts patched and a new dtb generated from that. Could you please share your meson-gxbb-odroidc2.dtb so I can rule out any mistake there? Also what kernel are you using?

moon.linux
Posts: 1205
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 3 times
Been thanked: 13 times
Contact:

Re: Odroid C2 mainline kernel support

Post by moon.linux »

If you are facing Ethernet issue not working out could you please try attach patches on C2/C4/N2.
ethreset.tar.gz
(1.27 KiB) Downloaded 75 times
On USB device we also need to some similar fix, I will try to find a solution to on that as well.

Edited:
Can you guys check the following changes to fix the USB reset issue.

Code: Select all

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 234490d3ee68..d9d2a1ffe1dc 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -19,6 +19,7 @@ usb0_phy: phy@c0000000 {
                        #phy-cells = <0>;
                        reg = <0x0 0xc0000000 0x0 0x20>;
                        resets = <&reset RESET_USB_OTG>;
+                       reset-names = "phy-reset";
                        clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
                        clock-names = "usb_general", "usb";
                        status = "disabled";
@@ -29,6 +30,7 @@ usb1_phy: phy@c0000020 {
                        #phy-cells = <0>;
                        reg = <0x0 0xc0000020 0x0 0x20>;
                        resets = <&reset RESET_USB_OTG>;
+                       reset-names = "phy-reset";
                        clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
                        clock-names = "usb_general", "usb";
                        status = "disabled";
@@ -43,6 +45,9 @@ usb0: usb@c9000000 {
                        phys = <&usb0_phy>;
                        phy-names = "usb2-phy";
                        dr_mode = "host";
+                       snps,reset-phy-on-wake;
+                       resets = <&reset RESET_USB_DDR_0>, <&reset RESET_USB_DDR_1>,
+                               <&reset RESET_USB_DDR_2>, <&reset RESET_USB_DDR_3>;
                        status = "disabled";
                };

@@ -55,6 +60,7 @@ usb1: usb@c9100000 {
                        phys = <&usb1_phy>;
                        phy-names = "usb2-phy";
                        dr_mode = "host";
+                       resets = <&reset RESET_USB_DDR_0>;
                        status = "disabled";
                };
        };

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

I run a diskless C2 cluster, with only one file, the Uboot script, on microSD first partition.
Uboot loads kernel Image+dtb via TFTP, no initramfs, rootfs mounted by kernel via NFS.

U-Boot 2020.04 (May 05 2020 - 22:32:05 +0200) odroid-c2
...that I self-compiled for why I cant remember.

Linux c2 5.7.10tb+ #2 Mon Jul 27 09:15:03 CEST 2020 aarch64 GNU/Linux
...a kernel built from tobetter's source tree (https://github.com/tobetter/linux/commits/odroid-5.7.y)

I have not retested USB for a while...

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

As an update, upgrading to tobetter's 5.10.2+ kernel, everything seems to work fine so far,
except plugging in USB devices after boot is still broken, even a simple keyboard is not working anymore :-/
These users thanked the author fvolk for the post:
odroid (Thu Dec 24, 2020 10:35 am)

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

Note that I tried only some headless server things, not Ubuntu desktop things, so I don't know about them.

campbell
Posts: 447
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 12 times
Contact:

Re: Odroid C2 mainline kernel support

Post by campbell »

fvolk wrote:
Thu Dec 24, 2020 1:55 am
As an update, upgrading to tobetter's 5.10.2+ kernel, everything seems to work fine so far,
except plugging in USB devices after boot is still broken, even a simple keyboard is not working anymore :-/
Apologies if this has already been tried, but on the C4 you can comment out the gpio reset toggle in the usb section of the dts, and then exert manual control over that gpio in userspace to toggle the usb hub on and off. Might be worth a try on the C2 to see if you can bring up USB after boot that way.

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

In some previous release of upstream kernel it worked when I first plugged in a USB keyboard and then a USB harddisk.
Now even that workaround no longer seems to work... and I'm not very motivated to do something manually every time :-/

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

It seems the C2 USB not working issue in upstream is also discussed on the linux-meson mailing list recently, maybe there is also an interaction which requires a newer UBoot, and the developers have no C2 available to test themselves, see this thread: http://lists.infradead.org/pipermail/li ... 09254.html

campbell
Posts: 447
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 12 times
Contact:

Re: Odroid C2 mainline kernel support

Post by campbell »

I haven't been tracking this thread for a couple years, but it's time to move on from Arch Linux, and I've still got a C2 that needs a mainline kernel to be useful. Is there a concise procedure for getting the mainline kernel into the official Ubuntu 20.04+ image in such a way that it will be kept up to date via apt from then on?

igorpec
Posts: 1028
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, HC4, C4, C2, C1+
Has thanked: 66 times
Been thanked: 153 times
Contact:

Re: Odroid C2 mainline kernel support

Post by igorpec »

campbell wrote:
Wed Mar 10, 2021 5:47 am
I haven't been tracking this thread for a couple years, but it's time to move on from Arch Linux, and I've still got a C2 that needs a mainline kernel to be useful. Is there a concise procedure for getting the mainline kernel into the official Ubuntu 20.04+ image in such a way that it will be kept up to date via apt from then on?
Armbian (Ubuntu / Debian) is on stable mainline based kernel for several years now. We record no major problems and our work is trusted by some critical projects as such https://forum.armbian.com/topic/14750-o ... r-part-ii/
These users thanked the author igorpec for the post:
pipodroid (Tue Dec 14, 2021 6:49 am)
ARMBIAN
Linux for ARM development boards
What is Armbian?

campbell
Posts: 447
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 12 times
Contact:

Re: Odroid C2 mainline kernel support

Post by campbell »

igorpec wrote:
Fri Mar 12, 2021 10:16 pm
campbell wrote:
Wed Mar 10, 2021 5:47 am
I haven't been tracking this thread for a couple years, but it's time to move on from Arch Linux, and I've still got a C2 that needs a mainline kernel to be useful. Is there a concise procedure for getting the mainline kernel into the official Ubuntu 20.04+ image in such a way that it will be kept up to date via apt from then on?
Armbian (Ubuntu / Debian) is on stable mainline based kernel for several years now. We record no major problems and our work is trusted by some critical projects as such https://forum.armbian.com/topic/14750-o ... r-part-ii/
Unfortunately I need to be able to recompile the kernel on the board, with minor changes to the existing .config, and I understood this to be a nontrivial undertaking with Armbian (compared to Arch or the Hardkernel 3.16 sources) due to the special build environment that Armbian expects. If there is a procedure for this, then I am willing to give Armbian another shot.

But in this thread I'm just looking for whatever the up-to-date procedure is to switch to the mainline kernel and u-boot, starting from the Hardkernel Ubuntu image.

igorpec
Posts: 1028
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, HC4, C4, C2, C1+
Has thanked: 66 times
Been thanked: 153 times
Contact:

Re: Odroid C2 mainline kernel support

Post by igorpec »

campbell wrote:
Fri Mar 26, 2021 4:54 am
Unfortunately I need to be able to recompile the kernel on the board, with minor changes to the existing .config, and I understood this to be a nontrivial undertaking with Armbian
Compilation part is trivial:

armbian-config -> software -> get kernel source
cd /usr/src/linux-*
make menuconfig
make -j6

Just artefacts copy is your manual task ... automated packing and installation is planned, but no time for realisation so far.
ARMBIAN
Linux for ARM development boards
What is Armbian?

campbell
Posts: 447
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 12 times
Contact:

Re: Odroid C2 mainline kernel support

Post by campbell »

igorpec wrote:
Fri Mar 26, 2021 6:02 am
Compilation part is trivial:

armbian-config -> software -> get kernel source
cd /usr/src/linux-*
make menuconfig
make -j6

Just artefacts copy is your manual task ... automated packing and installation is planned, but no time for realisation so far.
This seems to only gives the option to download kernel sources for several older 5.8 and 5.9 kernels, not the 5.10.21 kernel that the OS image comes with. Is there some other step I need to do first, to update armbian-config?

igorpec
Posts: 1028
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, HC4, C4, C2, C1+
Has thanked: 66 times
Been thanked: 153 times
Contact:

Re: Odroid C2 mainline kernel support

Post by igorpec »

campbell wrote:
Fri Mar 26, 2021 6:49 am
igorpec wrote:
Fri Mar 26, 2021 6:02 am
Compilation part is trivial:

armbian-config -> software -> get kernel source
cd /usr/src/linux-*
make menuconfig
make -j6

Just artefacts copy is your manual task ... automated packing and installation is planned, but no time for realisation so far.
This seems to only gives the option to download kernel sources for several older 5.8 and 5.9 kernels, not the 5.10.21 kernel that the OS image comes with. Is there some other step I need to do first, to update armbian-config?
This means it doesn't work as designed. Here is the file:
https://mirrors.dotsrc.org/armbian-apt/ ... t-meson64/

If you have a desire that this work better, you are welcome to join armbian-config refectoring initiative. We don't need this to work better. "You" do.
ARMBIAN
Linux for ARM development boards
What is Armbian?

campbell
Posts: 447
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: C4, N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 9 times
Been thanked: 12 times
Contact:

Re: Odroid C2 mainline kernel support

Post by campbell »

igorpec wrote:
Fri Mar 26, 2021 6:25 pm
campbell wrote:
Fri Mar 26, 2021 6:49 am
igorpec wrote:
Fri Mar 26, 2021 6:02 am
Compilation part is trivial:

armbian-config -> software -> get kernel source
cd /usr/src/linux-*
make menuconfig
make -j6

Just artefacts copy is your manual task ... automated packing and installation is planned, but no time for realisation so far.
This seems to only gives the option to download kernel sources for several older 5.8 and 5.9 kernels, not the 5.10.21 kernel that the OS image comes with. Is there some other step I need to do first, to update armbian-config?
This means it doesn't work as designed. Here is the file:
https://mirrors.dotsrc.org/armbian-apt/ ... t-meson64/

If you have a desire that this work better, you are welcome to join armbian-config refectoring initiative. We don't need this to work better. "You" do.
For anyone that comes looking for this, what I did that worked, starting from Armbian_21.02.3_Odroidc2_buster_current_5.10.21.img.xz, was:

Code: Select all

apt install linux-source-5.10.21-current-meson64
cd /usr/src
mkdir linux
cd linux
tar Jxf ../linux-source-5.10.21-meson64.tar.xz 
gunzip -c /proc/config.gz > .config
# edit .config as desired
make -j4
make modules_install
make install
make dtbs_install
# then I had to delete some -meson64 files and recreate some symlinks in /boot, this is probably avoidable by setting CONFIG_LOCALVERSION or some such

bolemo
Posts: 1
Joined: Sun Jun 06, 2021 10:55 pm
languages_spoken: english, french
ODROIDs: Odroid C2, Odroid C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by bolemo »

Hello to all,

This might be a very dumb question, so my apology if it is the case.

When I had my C2, I used it at first with the Linux provided by Hard Kernel. I was able to overclock it to 1.75 MHz, and it made a difference compared to standard 1.54 MHz.

Then I needed to upgrade my system and switched to Armbian with 5.x kernels. All is great, except that overclocking is not possible anymore with the mainline kernel.
In the Armbian forums, they told me that I needed to patch the blob in the kernel and the “DT”. I don’t know how to do that.

Is there any current kernel compatible with Armbian that allows to overclock beyond 1.54 MHz like it used to be with HK 3.x kernels? Is there any explaination on how the kernel can be patched to reach that?

It is frustrating to have lost a feature when upgrading to a more modern kernel...

Thank you

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by rockla »

Can someone lay down the steps required for updating the kernel to 5.10 . Couldn't find one single source where all steps are laid out.

User avatar
tobetter
Posts: 8938
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1433 times
Contact:

Re: Odroid C2 mainline kernel support

Post by tobetter »

rockla wrote:
Fri Dec 03, 2021 8:05 pm
Can someone lay down the steps required for updating the kernel to 5.10 . Couldn't find one single source where all steps are laid out.
Which OS distro are you looking for?

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by rockla »

I mostly use it as headless Ubuntu as i don't need a display.

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by rockla »

tobetter wrote:
Fri Dec 03, 2021 8:16 pm
rockla wrote:
Fri Dec 03, 2021 8:05 pm
Can someone lay down the steps required for updating the kernel to 5.10 . Couldn't find one single source where all steps are laid out.
Which OS distro are you looking for?
I mostly use it as headless Ubuntu as i don't need a display.

rockla
Posts: 313
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: English
ODROIDs: C1,C2,N2+
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by rockla »

@obetter - which distros are offering more recent kernel apart from armbian. Been stucked on 3.6 for quite some time

User avatar
tobetter
Posts: 8938
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1433 times
Contact:

Re: Odroid C2 mainline kernel support

Post by tobetter »

rockla wrote:
Fri Dec 03, 2021 9:00 pm
@obetter - which distros are offering more recent kernel apart from armbian. Been stucked on 3.6 for quite some time
Sorry, I've tested Ubuntu 20.04 with 5.x kernel but no good. USB and ethernet does not work... not sure if my C2 is a problem or upstream kernel. :(

MimCom
Posts: 51
Joined: Sun Mar 12, 2017 3:24 am
languages_spoken: english
ODROIDs: C2, XU4Q
Has thanked: 5 times
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MimCom »

rockla wrote:
Fri Dec 03, 2021 8:17 pm
I mostly use it as headless Ubuntu as i don't need a display.
Similar situation here -- we use them for iPerf testing at tower sites. Would love to put them on a current mainline distro.

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

tobetter wrote:
Fri Dec 03, 2021 11:43 pm
Sorry, I've tested Ubuntu 20.04 with 5.x kernel but no good. USB and ethernet does not work... not sure if my C2 is a problem or upstream kernel. :(
The 5.10.56+ kernel from your tree boots fine here. I'll try upgrade to 5.15 LTS over year end vacation days...

A discussion to finally fix the USB problems in upstream has happened again in July http://lists.infradead.org/pipermail/li ... hread.html and August - but I don't know whether this has landed in some patches.... does someone know?

User avatar
tobetter
Posts: 8938
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 521 times
Been thanked: 1433 times
Contact:

Re: Odroid C2 mainline kernel support

Post by tobetter »

fvolk wrote:
Mon Dec 06, 2021 3:58 am
tobetter wrote:
Fri Dec 03, 2021 11:43 pm
Sorry, I've tested Ubuntu 20.04 with 5.x kernel but no good. USB and ethernet does not work... not sure if my C2 is a problem or upstream kernel. :(
The 5.10.56+ kernel from your tree boots fine here. I'll try upgrade to 5.15 LTS over year end vacation days...

A discussion to finally fix the USB problems in upstream has happened again in July http://lists.infradead.org/pipermail/li ... hread.html and August - but I don't know whether this has landed in some patches.... does someone know?
Oh, good to know. My C2 boots fine with my kernel branch, but USB does not work. Let me try C2 sometime later for USB issue.

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

https://patchwork.kernel.org/project/li ... ies=591129 <= This is an important audio fix for C2 users.
These users thanked the author chewitt for the post:
nl.smart (Sat Jan 08, 2022 2:48 pm)

fvolk
Posts: 655
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, C4, H2
Has thanked: 0
Been thanked: 79 times
Contact:

Re: Odroid C2 mainline kernel support

Post by fvolk »

fvolk wrote:
Mon Dec 06, 2021 3:58 am

A discussion to finally fix the USB problems in upstream has happened again in July [...] but I don't know whether this has landed in some patches.... does someone know?
Update:
http://lists.infradead.org/pipermail/li ... 11098.html
Linux 5.16-rc4 is still affected by this issue, meaning that it hasn't been fixed in the meantime.
I am happy about any feedback which can help resolve this issue.
:-/

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

I ran into the USB bug again while testing over the weekend and asked Martin to revive the thread :)

In other news, I have H264 and HEVC hardware decode working well on GXBB/GXL/GXM devices now thanks to changes and assistance with ffmpeg from Raspberry Pi Foundation devs. We still need to figure out how to make seeking work, but progress has been made. Now the multi-channel audio bug in the AIU driver is also resolved C2 is quite usable with LE again. There is just an issue with speaker placement in alsa and the USB issue to solve.

User avatar
rooted
Posts: 9004
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 745 times
Been thanked: 422 times
Contact:

Re: Odroid C2 mainline kernel support

Post by rooted »

That's awesome news.

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

As a general follow-up and intro to 2022: After some further work with the Raspberry Pi devs at the end of last year we have seeking working quite well now, better on H264 than HEVC but then the HEVC decoder is not upstream and still a bit experimental (and still not working on newer hardware like N2/C4). The discussion on dwc2 and USB ports is still ongoing, see http://lists.infradead.org/pipermail/li ... 11098.html - I've asked Martin to follow-up with Minhas again. I'm also trying to encourage some engagement on the issue with alsa speaker placement, see http://lists.infradead.org/pipermail/li ... 11266.html.

I have some Kodi Nexus test images here for people who want to experiment: https://chewitt.libreelec.tv/testing/Li ... -c2.img.gz
These users thanked the author chewitt for the post:
odroid (Mon Jan 10, 2022 5:12 pm)

User avatar
rooted
Posts: 9004
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 745 times
Been thanked: 422 times
Contact:

Re: Odroid C2 mainline kernel support

Post by rooted »

That's great @chewitt and thanks for the test build, I will give it a try soon.

Is it using mainline plus patches?

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

Lots of kernel patches but ultimately not a huge amount touching things that would concern C2 users. FFMpeg needs the RPi sources as we're still some way off a serious effort to upstream everything. The stateful parts also need a stable kernel ABI first. Also upstream u-boot:

https://github.com/chewitt/u-boot/commi ... ic-2021.10
https://github.com/chewitt/linux/commits/amlogic-5.16.y
https://github.com/jc-kynesim/rpi-ffmpe ... i_import_1

User avatar
rooted
Posts: 9004
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 745 times
Been thanked: 422 times
Contact:

Re: Odroid C2 mainline kernel support

Post by rooted »

Can the C2 tonemap HDR to SDR? I think not but could be wrong as it's been some time since I've used one for media.

I don't see how you guys are able to wrangle all those patches and still have a working product at the end, the amount of troubleshooting must be immense. Thank you for the links and information.

Last edited by rooted on Tue Jan 11, 2022 12:36 am, edited 1 time in total.

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

Kernel and u-boot are simple since I'm the creator of the patchset and I know what everything does, and FFMpeg is simple because I just point to the HEAD githash as an alternate source when building (so no patching). HDR will play back washed out as the S905 in the C2 doesn't natively support it and there is no HDR to SDR conversion driver at the moment .. ge2d exists for AXG devices but needs to be ported and extended.
These users thanked the author chewitt for the post:
moon.linux (Thu Jan 13, 2022 1:40 pm)

SimonH78
Posts: 20
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by SimonH78 »

Hi chewitt,

your audio related patches are contained in 5.15.15 correct ? i built armbian for odroid c2 with that kernel but cant get SPDIF sound out of the related pins ( got a TOSlink adapter wired to that , see here )
viewtopic.php?t=21477

is anything missing on audio support in mainline ? i want to get away from the old odroidwiki based kernel

thx

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

The three patches I have for 5.15.y are:

https://github.com/chewitt/linux/commit ... 1719b82245 (should be in stable by now)
https://github.com/chewitt/linux/commit ... 91f4705ce4
https://github.com/chewitt/linux/commit ... 9459ecd62a (merged in 5.16.y)

I know S/PDIF via HDMI doesn't work (dw-hdmi driver needs extending) but I believe via GPIO should work? - I believe you'd need to use a device-tree overlay to add the routing? - that won't be in the upstream kernel as it's an optional thing.
These users thanked the author chewitt for the post:
odroid (Wed Jan 19, 2022 6:40 pm)

SimonH78
Posts: 20
Joined: Tue May 23, 2017 2:15 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Odroid C2 mainline kernel support

Post by SimonH78 »

Hi,


i built armbian for odroid c2 with 5.15.16 and your patches and the thing boots and runs. HDMI audio doesnt work and i havent connected anything else.

Are there dw-hdmi patches that are available somewhere ? Im not able to modify the .dts , but i could use GPIO pins to attach my spdif IF to.

regards,
Simon

chewitt
Posts: 158
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 122 times
Contact:

Re: Odroid C2 mainline kernel support

Post by chewitt »

Audio things in the kernel always need to be partnered with an alsa-conf and mixer settings in userspace, see:

https://github.com/chewitt/alsa-lib/com ... 035918af66 <= gx-sound-card, needs the driver_name patch in the kernel
https://github.com/LibreELEC/LibreELEC. ... #L168-L169

I'm not aware of any dw-hdmi patches, but I don't think that would be required anyway. I think you just need to modify the dts with your audio bits. HK probably has some examples of that for their HiFi shield things that you can crib from.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests