LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post Reply
User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

Welcome to my first LineageOS 21.0 editon for Odroid C4!

Non ATV OTA 2024-02-28: https://drive.google.com/file/d/1QUNl2r ... sp=sharing

20240228:
-Enabled IR remote control

20240226:
-Corrected missing devicetree entry to have gpiomem device

Non ATV Emmc image: https://drive.google.com/file/d/1zarYsv ... sp=sharing
.
.
ATV OTA 2024-04-04: https://drive.google.com/file/d/1iNFR2W ... sp=sharing
-Added one special custom edid file for 1920x1080 with audio extension
-Changed some heap memory values to not have sometimes OOM crashs
-Fixed System/Input crash and enabled CEC
.
ATV OTA 2024-02-28: https://drive.google.com/file/d/1g6ijA4 ... sp=sharing

20240228:
-Enabled IR remote control

ATV Emmc image: https://drive.google.com/file/d/11tcoKn ... sp=sharing

I have not tested much, but enabled the same as it is on my LineageOS20 build.

-Security patches: Feb-5 2024
-Kernel: Android Common 6.1.68
-Enabled devicetree overlays: spi0 pwm_ab pwm_cd pwm_ef i2c0 i2c1 gt911 uart0 uart1 uart2 uart3 uart_debug pcf8563 ds3231
-Graphics:Panfrost and Mesa3d
-Wifi dongles: 8821au 8821cu 8188eus 8192eu
.
screen.png
screen.png (194.78 KiB) Viewed 492 times
ATV:
atv_screen.png
atv_screen.png (959.59 KiB) Viewed 444 times
Last edited by joerg on Thu Apr 04, 2024 9:32 pm, edited 9 times in total.
These users thanked the author joerg for the post (total 2):
odroid (Sun Feb 25, 2024 11:33 pm) • szalinski (Tue Apr 02, 2024 3:14 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state)

Post by joerg »

HowTo Section

Install to emmc card (only!):
Be sure which device is your emmc card!

Code: Select all

#dd if=LineageOS21-20240225-odroidc4.img of=/dev/sdX bs=1M
#sync
Or use other flashing tool.

Install Magisk:
https://github.com/topjohnwu/Magisk/rel ... -v24.3.apk

Code: Select all

adb shell
#su
#dd if=/dev/block/by-name/boot of=boot.img 
//In Magisk Manager use patch file method...
#dd if=magisk_patched-24300_xxxx.img of=/dev/block/by-name/boot
#reboot
Or you can also rename the Magisk app to ending with .zip and flash it via sideload method in recovery menu.
There will be a error message Signature verification failed. Answer the question Install anyway with Yes

Devicetree overlays:
For now only 14 devicetree overlays are ready to use:
spi0 pwm_ab pwm_cd pwm_ef i2c0 i2c1 gt911 uart0 uart1 uart2 uart3 uart_debug pcf8563 ds3231
To enable or disable an overlay, command fw_setenv is used, and fw_printenv to read.

Code: Select all

odroidc4:/ $ su
odroidc4:/ # fw_printenv overlayargs                                                                                     
overlays=spi0 pwm_cd
odroidc4:/ # fw_setenv overlayargs "spi0 pwm_ab" 
After setting this, odroid c4 needs a reboot, so that u-boot applies the overlays during boot.
Don't try other than this 14 overlays, it can result in a boot loop. If so, only at interrupted u-boot command line the env variable overlayargs can be restored.

Gnss:
The driver is based on Gnss V2.1 GnssTemplate source code, but is developed further to have it bug free, to have GnssSvInfo and to have support for GPS, GLONASS, GALILEO and BEIDOU. But only tested from my side is GPS and multimode with GPS and GLONASS.
So far it can in single satellite mode only GPS with messages GPRMC, GPGGA, etc, and in multi satellite mode with messages GNRMC, GNGGA, etc. two satellite systems. My ublox m8 mouse can do that.
As serial port is configured /dev/ttyACM. The driver scans ttyACM0 ...9 to find a ublox GPS mouse.
If someone needs to define another serial port the prop debug.location.fixedlocation.devname must be set. The driver takes this port now and does not anymore scan for an ublox device.

Code: Select all

//enable ttyUSB0
$ adb shell setprop debug.location.fixedlocation.devname /dev/ttyUSB0
//disable
adb shell setprop debug.location.fixedlocation.devname \"\"
The default port is set in prop vendor.ser.gnss-uart

Code: Select all

adb shell getprop vendor.ser.gnss-uart
/dev/ttyACM
If there are problems with the driver, a lot of debug messages can be enabled with setting log.tag.android.hardware.gnss@2.1-service.usbserial

Code: Select all

//debug messages
adb shell setprop log.tag.android.hardware.gnss@2.1-service.usbserial VERBOSE
//no debug messages
adb shell setprop log.tag.android.hardware.gnss@2.1-service.usbserial WARN
Gapps:
Here can be downloaded working Gapps for Android 13, flash-able with Magisk.
https://sourceforge.net/projects/magisk ... A/24.2.23/
Copy to C4 and select Module in Magisk and install from memory...
About a hour after registering, account can be added! Registering at: https://www.google.com/android/uncertified/
Use core version, other versions are too big.

Backlight:
-Set pwm_cd in overlays. Backlight pwm will be at pin 11 of 40p header.
-To enable the lights driver, set at adb shell fw_printenv extrabootargs "backlight_pwm=yes" . Must be root, do adb root before adb shell.

4G Modem:
-On ext partition is a config file for switching modem with usb_modeswitch:
/ext/etc/usb_modeswitch.conf

Code: Select all

#Huawei 

DefaultVendor= 0x12d1
DefaultProduct= 0x1f01

TargetVendor=0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1

MessageEndPoint = "0x01"
MessageContent="55534243000000000000000000000011060000000000000000000000000000"
NoDriverLoading=1
-Ext partition is free to use and rw. Will not be updated by ota update.


Wifi dongles:
-edit init.ext.rc on ext partition with nano as su:

Code: Select all

#add init rules here
#on boot

on early-boot
#  exec -- /system/bin/insmod /vendor/lib/modules/rtl8xxxu.ko
  exec -- /system/bin/insmod /vendor/lib/modules/8821cu.ko
  exec -- /system/bin/insmod /vendor/lib/modules/8821au.ko
  exec -- /system/bin/insmod /vendor/lib/modules/8188eu.ko
  exec -- /system/bin/insmod /vendor/lib/modules/8192eu.ko
These modules are not in the modules.load list, so the system doesn't load them automatically. I made it this way, because with automatically loading, the module cfg80211 loads to early and blocks all loop devices for >60 seconds.

Mount smb share to accessible directory
-edit init.ext.rc on ext partition with nano as su:

Code: Select all

#add init rules here
# on boot

on property:sys.boot_completed=1
    wait /storage/emulated/0/Android 20
    setprop storage_done 1

on property:storage_done=1
    mkdir /storage/emulated/0/my_folder 0770 media_rw media_rw
    start mount_folder

service mount_folder /system/bin/mount -t smb3 -o username=my_user,password=my_passw,gid=1023,uid=1023,file_mode=0777,dir_mode=0777,iocharset=utf8 //my_ip/my_share /storage/emulated/0/my_folder
    class main
    disabled
    oneshot
consoleargs
-about 15s shorter boot up time when added quiet loglevel=1 to to consoleargs

Code: Select all

fw_setenv consoleargs "no_console_suspend console=ttyAML0,115200 printk.devkmsg=on quit loglevel=1"

IR remote control
There is a new env variable to select the rc mapping: rcmaparg. To change this variable in adb shell to other mapping:

Code: Select all

odroidc4:/ $ su
odroidc4:/ # fw_printenv rcmaparg                                                                                     
rcmaparg=rc-odroid
odroidc4:/ # fw_setenv rcmaparg rc-imon-pad
All the mappings that are listed in kernel under https://www.kernel.org/doc/Documentatio ... ia/rc.yaml are possible.
But after flashing the OTA, the env variable isn't activated yet. To activate, the env must reset to default at u-boot level:

Code: Select all

#env default -a
#env save
I have created a basic key layout file meson-ir.kl to find under /vendor/usr/keylayout. The keys from odroid remote and what I could find from Imon Pad are listed.
You can find keycodes by pressing the button on the remote and scanning with getevent:

Code: Select all

$getevent
/dev/input/event0: 0004 0004 28b595b7
/dev/input/event0: 0001 0201 00000001
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0201 00000000
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0004 0004 28b5d5b7
/dev/input/event0: 0000 0000 00000000
This example is key 1 that has keycode 0x201.

Custom edid setting
With some monitors are reported problems of the right automatic video resolution. In this case, video resolution can be set manual as kernel commandline parameter as follow:

Code: Select all

$ su
# fw_setenv extrabootargs drm.edid_firmware=edid/1920x1080.bin
Note, that some edid configurations are kernel built in and have only the video part! For a special case I've created an edid file for 1920x1080p with audio extension: 1920x1080ext.bin. I've tested it with two different monitors and a LG 55" TV.
Last edited by joerg on Thu Apr 04, 2024 9:44 pm, edited 3 times in total.
These users thanked the author joerg for the post (total 2):
odroid (Thu Feb 29, 2024 4:41 pm) • szalinski (Tue Apr 02, 2024 3:14 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state)

Post by joerg »

I have changed the upload link to a version from today (Feb-25) with self generated test-keys.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state)

Post by joerg »

I have added an OTA update and corrected the access link.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

There is now also an ATV edition, please see first post.
-I am not sure if remote control is working. I don't own a Hardkernel model.
-Included is a patched version of VLC. The original version brings a spinning vlc logo while playing video and it never disappears.
-As of now, I couldn't find a Gapps version for Android 14 ATV. Sure that MindTheGapps brings one in future, as there is for Android 13 ATV.

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

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by rooted »

Awesome work!
These users thanked the author rooted for the post:
joerg (Wed Feb 28, 2024 2:59 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

I have enabled IR remote control function. New OTA images uploaded. Please see first post. There is also a HowTo in second post.

User avatar
szalinski
Posts: 5
Joined: Tue Apr 02, 2024 1:12 am
languages_spoken: polish, english
ODROIDs: C4
Location: Poland
Has thanked: 6 times
Been thanked: 0
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by szalinski »

Thank you very much for delivering such simple and elegant solution for installing LinageOS on C4 board. You did a great job @joerg!

Thoughts, experiences & remarks
I want to share my thoughts and experiences related with this Android TV distro. My ATV setup is made of the following hardware:
  • Odroid C4,
  • Hardkernel's eMMC 32 GB,
  • Remote - "keyboard + gyro mouse", with radio USB dongle - C120 Fly Mouse,
  • A HDMI 2.0 cable,
Since the local eMMC vendor did not send me an microSD adapter, I had to figure out how to flash the LinageOS to the eMMC. An extra 16 GB microSD card became handy. I flashed the official "minimal" Ubuntu 22.04 and Petitboot (described here) to it. This allowed me to 1) boot Petitboot 2) install the eMMC to the board 3) boot to Ubuntu from SD 4) do anything what I need with dd command. It was quite an adventure.

I didn't figure out that there are self-install imgs for Android and I spent too much time on the official LinageOS wiki instructions. Frustrated, I eventually found builds on this sub forum. Without hesitation I grabbed the newest one (21.0) and, to my surprise, the installation (with patching OTA and Magisk) went smooth. After that I have downloaded the F-Droid for more apps. If someone wonders what can be installed for ATV there is an Awesome Android TV FOSS Apps list on GitHub.

The "return / home" button on the air mouse remote did not work very well with the ATV. However, the Key Mapper (F-Droid) app works like a charm and allowed me to configure additional hotkeys (in my scenario: a) return & home navigation buttons; b) showing power menu). Tip: to guarantee that these shortcuts will work after rebooting, the source of key presses should be set to "any device".

I have build 2 setups for 2 TVs, each from different era: A modern "smart" Samsung 4K TV from ~2017, and a budget FullHD SHARP TV from ~2012. The whole configuration was made on my LG 2K Monitor (which somehow always presented itself to the board with 1920x1080p resolution). I had a bad time with debugging HDMI issues. I have went over all tips from the wikis and forums only to discover, that my monitor have an extra "HDMI compatibility" option, which was disabled by default. It was an another lesson - always check the hardware options before start looking into the software ones.

I was able to test the following apps:
  • Fennec (F-Droid) - a drop-in replacement for Firefox, no problems (other than slow loading) so far,
  • SmartTube (GitHub) - works great with 1080p, but that's the maximal video resolution,
  • VLC (provided as patch from the OTP) - I confirm that the spinning cone has been fixed. However, I tried to stream H.265 or H.264 files via DLNA from local server, but it didn't work well. There were too many freezes and compression artifacts. Is the hardware decoding enabled in this build (i.e. LineageOS 21.0 from 2024-02-28)?
I hope that I will find more time to tinker with my local server and provide more one-liner review about other apps, like Jelllyfin or Clipious (F-Droid) with self-hosted Invidious instance.

Technical problems and questions
Even exhaustive Google Seraches couldn't help me with the main problem of my two setups: the TVs resolutions.

Starting with the "smart" Samsung TV, the debug view in SmartTube prints, that the "boot" resolution is 3840x2160 (I assume it is progressive scan (i.e. "p")) - photo bellow:
Image
The video is lagging and the audio is offset by about 1-2s. I suspect, that 4K output resolution is taking toll on the Odroid C4 performance. I know, that in the official distros provided by the Hardkernel there is a BOOT partition with boot.ini and config.ini files for setting such param as screen resolution. Here, I couldn't mount anything (in terms of a "simple" partition - I didn't bother to dig into Android filesystems and how to mount them under Linux) to inspect some low level configuration.
So I tried to tinker with adb shell and wm resolution 1920x1080 + wm density 300 commands but with no results. Indeed, the resolution has changed for the splash screen (the Hardkernel logo), but the LinageOS ignores that. What is worse - I can't enter Settings->System->Inputs (HDMI CEC settings) - the Settings app just crashes to main screen every time.
So here comes my question: Is there any way to permanently change the LinageOS resolution output?

Second one is very similar, but related to my 2nd setup, with the "old" Sharp TV. First, the HDMI connection looks like something is splitting the image into two:
Image
Image

After a close inspection of the TV options (the appliance of the learned lesson from the monitor) I found out, that this budget box is detecting Odroid C4 with 1920x1080i resolution (yes, "i" for interlaced). I speculate, that this problem is related with interlaced vs progressive scan issue. I wonder that it should be possible to somehow overcome this split by changing settings related to the HDMI. So: is there is a way to fix crashing "Settings->System->Inputs" (on my screen: "Wejścia") sub-menu in the system settings?

Or maybe someone had simillar problem with 1080i vs 1080p dylema? What can help in such case?

* * *
My greatest appreciations for reading such a long post!

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

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by rooted »

I'm not sure why you are having an issue playing 4K with SmartTube on a C4 as it supports VP9 hwdec.

Have you set the video preset to (4K) 2160p 60fps vp9 in ST?

Image
These users thanked the author rooted for the post:
szalinski (Tue Apr 02, 2024 7:39 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

Thank you very much for this post! You are the first who replied for using ATV. I hope you can stay patient with testing so much on a not so much tested alpha version? I will try out these things. I have tested it only with 1920x1080 HDMI screen, but not with bigger one.
Is there any way to permanently change the LinageOS resolution output?
There is the kernel boot parameter drm.edid_firmware. You can set a custom edid file in adb shell like this:

Code: Select all

$ su
# fw_setenv extrabootargs drm.edid_firmware=edid/1920x1080.bin
Method wm size does only a software scaling. On mainline kernel I don't know another method as custom edid file to set the hardware resolution.
Or maybe someone had simillar problem with 1080i vs 1080p dylema? What can help in such case?
I will look, if I can compile more edid files. I need to learn how I can do that for interlaced modes.
is there is a way to fix crashing "Settings->System->Inputs" (on my screen: "Wejścia") sub-menu in the system settings?
I need to debug, why it's crashing.
Is the hardware decoding enabled in this build (i.e. LineageOS 21.0 from 2024-02-28)?
Good question. I have looked some mpeg2 coded videos over network without artifacts and freezes, but not over dnla. On the other hand I had with my music app on non ATV build audio with freezes using dlna. It's maybe a question of dlna and not a question of hardware decoding. But I will look into this too.

Stay tuned!
These users thanked the author joerg for the post:
szalinski (Tue Apr 02, 2024 7:39 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

@rooted: You are using my build?
I was not aware of SmartTube! Tomorrow I will try it with my build and on my 4k LG.

User avatar
szalinski
Posts: 5
Joined: Tue Apr 02, 2024 1:12 am
languages_spoken: polish, english
ODROIDs: C4
Location: Poland
Has thanked: 6 times
Been thanked: 0
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by szalinski »

rooted wrote:
Tue Apr 02, 2024 5:11 am
I'm not sure why you are having an issue playing 4K with SmartTube on a C4 as it supports VP9 hwdec.

Have you set the video preset to (4K) 2160p 60fps vp9 in ST?
Very good question. I have double checked my version of ST (it's the newest stable), I have even downloaded the beta version. The only video presets I can see are avc-related:
Image

If it is possible to enable vp9 or other codecs it seems that C4 can do more than I thought.
joerg wrote:
Tue Apr 02, 2024 5:20 am
Thank you very much for this post! You are the first who replied for using ATV. I hope you can stay patient with testing so much on a not so much tested alpha version? I will try out these things. I have tested it only with 1920x1080 HDMI screen, but not with bigger one.
I'm glad that I can help! Yes, I can wait a while to polish all of these bugs.
joerg wrote:
Tue Apr 02, 2024 5:20 am
There is the kernel boot parameter drm.edid_firmware. You can set a custom edid file in adb shell like this:

Code: Select all

$ su
# fw_setenv extrabootargs drm.edid_firmware=edid/1920x1080.bin
Method wm size does only a software scaling. On mainline kernel I don't know another method as custom edid file to set the hardware resolution.
[...]
I will look, if I can compile more edid files. I need to learn how I can do that for interlaced modes.
Thank you very much for fast reply, it worked instantly: SmartTube on the 4K Samsung TV stopped lagging (still on avc), while the SHARP TV recognized the 1080p resolution with stable image:
Image

I noticed that the image is a bit offset. The manual says that this model should be able to work with res up to 1920x1200@60Hz. I will check that resolution tomorrow.

However, on both ATVs the audio over HDMI went missing. I suppose that the compilation of the custom edid files is needed.
joerg wrote:
Tue Apr 02, 2024 5:20 am
I need to debug, why it's crashing.
This is my first time working with development on Android. I have no foggiest idea how to work with it, I can provide logs if you tell me how to save them.
Meanwhile, I found that the logcat outputs lots of data when the menu crashes. Here is the pastebin of it.. All of these lines:

Code: Select all

04-01 23:45:15.512   295   295 I SurfaceFlinger: postComposition
are probably related to the mouse cursor movement and could be safely removed from analysis.
joerg wrote:
Tue Apr 02, 2024 5:20 am
Good question. I have looked some mpeg2 coded videos over network without artifacts and freezes, but not over dnla. On the other hand I had with my music app on non ATV build audio with freezes using dlna. It's maybe a question of dlna and not a question of hardware decoding. But I will look into this too.
Hmm, the 4K Samsung TV can play DLNA videos. It chokes with H.264 but it has no problems with H.265. Maybe codec issue.
joerg wrote:
Tue Apr 02, 2024 5:20 am
Stay tuned!
I'm looking forward it!

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

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by rooted »

@joerg I'm running the N2+ version from voodik, I'm not sure where my C4 is at the moment.

SmartTube is so very good, I've been using it for years.


User avatar
mad_ady
Posts: 11996
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 663 times
Been thanked: 1284 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by mad_ady »

@szalinski thanks for the list of apps! I learned a few new things...

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

Crashing at System/Inputs is because of misssing CEC support. I have disabled it at the very beginning of my C4 Android development. I never touched it again.... :( But lets see what happens when I enable it...
And yes, I tried with custom edid file and the HDMI audio went away,,, :?

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

With custom edid file I see that the edid files compiled with linux kernel are missing the Short Audio Descriptors (SAD). They end at byte 127, the extended data starts at 128.
I have dumped the edid data from my ThinkVision T24v-20 connected to my my Linux PC:

Code: Select all

xrandr --prop | edid-decode
edid-decode (hex):

00 ff ff ff ff ff ff 00 30 ae fc 61 00 00 00 00
2c 1f 01 03 80 35 1e 78 2a 05 65 a7 56 52 9c 27
0f 50 54 af ef 00 71 4f 81 80 81 8a 95 00 a9 c0
a9 cf b3 00 d1 cf 02 3a 80 18 71 38 2d 40 58 2c
45 00 0f 28 21 00 00 1e 00 00 00 fc 00 54 32 34
76 2d 32 30 0a 20 20 20 20 20 00 00 00 fd 00 32
4c 1e 55 12 00 0a 20 20 20 20 20 20 00 00 00 ff
00 56 39 30 39 30 57 4b 36 0a 20 20 20 20 01 c3

02 03 1e f1 4b 90 05 04 03 02 01 1f 12 13 14 11
23 09 0f 07 83 01 00 00 65 03 0c 00 10 00 02 3a   //SAD: 23 09 0f 07
80 18 71 38 2d 40 58 2c 45 00 0f 28 21 00 00 1e
01 1d 00 72 51 d0 1e 20 6e 28 55 00 0f 28 21 00
00 1e 8c 0a d0 8a 20 e0 2d 10 10 3e 96 00 0f 28
21 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: LEN
    Model: 25084
    Made in: week 44 of 2021
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 53 cm x 30 cm
    Gamma: 2.20
    DPMS levels: Off
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6523, 0.3359
    Green: 0.3212, 0.6103
    Blue : 0.1533, 0.0605
    White: 0.3134, 0.3291
  Established Timings I & II:
    IBM     :   720x400    70.082 Hz   9:5    31.467 kHz  28.320 MHz
    DMT 0x04:   640x480    59.940 Hz   4:3    31.469 kHz  25.175 MHz
    DMT 0x05:   640x480    72.809 Hz   4:3    37.861 kHz  31.500 MHz
    DMT 0x06:   640x480    75.000 Hz   4:3    37.500 kHz  31.500 MHz
    DMT 0x08:   800x600    56.250 Hz   4:3    35.156 kHz  36.000 MHz
    DMT 0x09:   800x600    60.317 Hz   4:3    37.879 kHz  40.000 MHz
    DMT 0x0a:   800x600    72.188 Hz   4:3    48.077 kHz  50.000 MHz
    DMT 0x0b:   800x600    75.000 Hz   4:3    46.875 kHz  49.500 MHz
    Apple   :   832x624    74.551 Hz   4:3    49.726 kHz  57.284 MHz
    DMT 0x10:  1024x768    60.004 Hz   4:3    48.363 kHz  65.000 MHz
    DMT 0x11:  1024x768    70.069 Hz   4:3    56.476 kHz  75.000 MHz
    DMT 0x12:  1024x768    75.029 Hz   4:3    60.023 kHz  78.750 MHz
    DMT 0x24:  1280x1024   75.025 Hz   5:4    79.976 kHz 135.000 MHz
  Standard Timings:
    DMT 0x15:  1152x864    75.000 Hz   4:3    67.500 kHz 108.000 MHz
    DMT 0x23:  1280x1024   60.020 Hz   5:4    63.981 kHz 108.000 MHz
    GTF     :  1280x1024   70.000 Hz   5:4    74.620 kHz 128.943 MHz
    DMT 0x2f:  1440x900    59.887 Hz  16:10   55.935 kHz 106.500 MHz
    DMT 0x53:  1600x900    60.000 Hz  16:9    60.000 kHz 108.000 MHz (RB)
    GTF     :  1600x904    75.000 Hz  16:9    70.800 kHz 152.928 MHz
    DMT 0x3a:  1680x1050   59.954 Hz  16:10   65.290 kHz 146.250 MHz
    GTF     :  1920x1080   75.000 Hz  16:9    84.600 kHz 220.637 MHz
  Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (527 mm x 296 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
    Display Product Name: 'T24v-20'
  Display Range Limits:
    Monitor ranges (GTF): 50-76 Hz V, 30-85 kHz H, max dotclock 180 MHz
    Display Product Serial Number: 'V9090WK6'
  Extension blocks: 1
Checksum: 0xc3

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 1
  Video Data Block:
    VIC  16:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (native)
    VIC   5:  1920x1080i  60.000 Hz  16:9    33.750 kHz  74.250 MHz
    VIC   4:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz
    VIC   3:   720x480    59.940 Hz  16:9    31.469 kHz  27.000 MHz
    VIC   2:   720x480    59.940 Hz   4:3    31.469 kHz  27.000 MHz
    VIC   1:   640x480    59.940 Hz   4:3    31.469 kHz  25.175 MHz
    VIC  31:  1920x1080   50.000 Hz  16:9    56.250 kHz 148.500 MHz
    VIC  18:   720x576    50.000 Hz  16:9    31.250 kHz  27.000 MHz
    VIC  19:  1280x720    50.000 Hz  16:9    37.500 kHz  74.250 MHz
    VIC  20:  1920x1080i  50.000 Hz  16:9    28.125 kHz  74.250 MHz
    VIC  17:   720x576    50.000 Hz   4:3    31.250 kHz  27.000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 88.2 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
  Detailed Timing Descriptors:
    DTD 2:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (527 mm x 296 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
    DTD 3:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz (527 mm x 296 mm)
                 Hfront  110 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
    DTD 4:   720x480    59.940 Hz   3:2    31.469 kHz  27.000 MHz (527 mm x 296 mm)
                 Hfront   16 Hsync  62 Hback  60 Hpol N
                 Vfront    9 Vsync   6 Vback  30 Vpol N
Checksum: 0x55

We can see the Audio Data Block and the Speaker Allocation Data Block.
It would be interesting, what your monitors give out...Then a custom edid file could be baked...

User avatar
szalinski
Posts: 5
Joined: Tue Apr 02, 2024 1:12 am
languages_spoken: polish, english
ODROIDs: C4
Location: Poland
Has thanked: 6 times
Been thanked: 0
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by szalinski »

joerg wrote:
Tue Apr 02, 2024 7:33 pm
It would be interesting, what your monitors give out...Then a custom edid file could be baked...
Here are edid dumps for my TVs:

1) Samsung 4K TV

Code: Select all

xrandr --prop | edid-decode
edid-decode (hex):

00 ff ff ff ff ff ff 00 4c 2d 83 0e 00 0e 00 01
01 1c 01 03 80 6f 3e 78 0a 23 ad a4 54 4d 99 26
0f 47 4a bd ef 80 71 4f 81 c0 81 00 81 80 95 00
a9 c0 b3 00 01 01 04 74 00 30 f2 70 5a 80 b0 58
8a 00 50 1d 74 00 00 1e 02 3a 80 18 71 38 2d 40
58 2c 45 00 50 1d 74 00 00 1e 00 00 00 fd 00 18
4b 0f 51 1e 00 0a 20 20 20 20 20 20 00 00 00 fc
00 53 41 4d 53 55 4e 47 0a 20 20 20 20 20 01 b3

02 03 4c f0 53 5f 10 1f 04 13 05 14 20 21 22 5d
5e 62 63 64 07 16 03 12 29 09 07 07 15 07 50 57
07 01 83 01 00 00 e2 00 4f e3 05 03 01 6e 03 0c
00 10 00 b8 3c 20 00 80 01 02 03 04 e3 06 0d 01
e5 0e 60 61 65 66 e5 01 8b 84 90 01 01 1d 80 d0
72 1c 16 20 10 2c 25 80 50 1d 74 00 00 9e 66 21
56 aa 51 00 1e 30 46 8f 33 00 50 1d 74 00 00 1e
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a3

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: SAM
    Model: 3715
    Serial Number: 16780800
    Made in: week 1 of 2018
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 111 cm x 62 cm
    Gamma: 2.20
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6406, 0.3300
    Green: 0.3007, 0.6005
    Blue : 0.1503, 0.0605
    White: 0.2802, 0.2900
  Established Timings I & II:
    IBM     :   720x400    70.082 Hz   9:5    31.467 kHz  28.320 MHz
    DMT 0x04:   640x480    59.940 Hz   4:3    31.469 kHz  25.175 MHz
    Apple   :   640x480    66.667 Hz   4:3    35.000 kHz  30.240 MHz
    DMT 0x05:   640x480    72.809 Hz   4:3    37.861 kHz  31.500 MHz
    DMT 0x06:   640x480    75.000 Hz   4:3    37.500 kHz  31.500 MHz
    DMT 0x09:   800x600    60.317 Hz   4:3    37.879 kHz  40.000 MHz
    DMT 0x0a:   800x600    72.188 Hz   4:3    48.077 kHz  50.000 MHz
    DMT 0x0b:   800x600    75.000 Hz   4:3    46.875 kHz  49.500 MHz
    Apple   :   832x624    74.551 Hz   4:3    49.726 kHz  57.284 MHz
    DMT 0x10:  1024x768    60.004 Hz   4:3    48.363 kHz  65.000 MHz
    DMT 0x11:  1024x768    70.069 Hz   4:3    56.476 kHz  75.000 MHz
    DMT 0x12:  1024x768    75.029 Hz   4:3    60.023 kHz  78.750 MHz
    DMT 0x24:  1280x1024   75.025 Hz   5:4    79.976 kHz 135.000 MHz
    Apple   :  1152x870    75.062 Hz 192:145  68.681 kHz 100.000 MHz
  Standard Timings:
    DMT 0x15:  1152x864    75.000 Hz   4:3    67.500 kHz 108.000 MHz
    DMT 0x55:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz
    DMT 0x1c:  1280x800    59.810 Hz  16:10   49.702 kHz  83.500 MHz
    DMT 0x23:  1280x1024   60.020 Hz   5:4    63.981 kHz 108.000 MHz
    DMT 0x2f:  1440x900    59.887 Hz  16:10   55.935 kHz 106.500 MHz
    DMT 0x53:  1600x900    60.000 Hz  16:9    60.000 kHz 108.000 MHz (RB)
    DMT 0x3a:  1680x1050   59.954 Hz  16:10   65.290 kHz 146.250 MHz
  Detailed Timing Descriptors:
    DTD 1:  3840x2160   30.000 Hz  16:9    67.500 kHz 297.000 MHz (1872 mm x 1053 mm)
                 Hfront  176 Hsync  88 Hback 296 Hpol P
                 Vfront    8 Vsync  10 Vback  72 Vpol P
    DTD 2:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (1872 mm x 1053 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
  Display Range Limits:
    Monitor ranges (GTF): 24-75 Hz V, 15-81 kHz H, max dotclock 300 MHz
    Display Product Name: 'SAMSUNG'
  Extension blocks: 1
Checksum: 0xb3

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 0
  Video Data Block:
    VIC  95:  3840x2160   30.000 Hz  16:9    67.500 kHz 297.000 MHz
    VIC  16:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz
    VIC  31:  1920x1080   50.000 Hz  16:9    56.250 kHz 148.500 MHz
    VIC   4:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz
    VIC  19:  1280x720    50.000 Hz  16:9    37.500 kHz  74.250 MHz
    VIC   5:  1920x1080i  60.000 Hz  16:9    33.750 kHz  74.250 MHz
    VIC  20:  1920x1080i  50.000 Hz  16:9    28.125 kHz  74.250 MHz
    VIC  32:  1920x1080   24.000 Hz  16:9    27.000 kHz  74.250 MHz
    VIC  33:  1920x1080   25.000 Hz  16:9    28.125 kHz  74.250 MHz
    VIC  34:  1920x1080   30.000 Hz  16:9    33.750 kHz  74.250 MHz
    VIC  93:  3840x2160   24.000 Hz  16:9    54.000 kHz 297.000 MHz
    VIC  94:  3840x2160   25.000 Hz  16:9    56.250 kHz 297.000 MHz
    VIC  98:  4096x2160   24.000 Hz 256:135  54.000 kHz 297.000 MHz
    VIC  99:  4096x2160   25.000 Hz 256:135  56.250 kHz 297.000 MHz
    VIC 100:  4096x2160   30.000 Hz 256:135  67.500 kHz 297.000 MHz
    VIC   7:  1440x480i   59.940 Hz  16:9    15.734 kHz  27.000 MHz
    VIC  22:  1440x576i   50.000 Hz  16:9    15.625 kHz  27.000 MHz
    VIC   3:   720x480    59.940 Hz  16:9    31.469 kHz  27.000 MHz
    VIC  18:   720x576    50.000 Hz  16:9    31.250 kHz  27.000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 24 20 16
    AC-3:
      Max channels: 6
      Supported sample rates (kHz): 48 44.1 32
      Maximum bit rate: 640 kb/s
    Enhanced AC-3 (DD+):
      Max channels: 8
      Supported sample rates (kHz): 48 44.1 32
      Supports Joint Object Coding
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Video Capability Data Block:
    YCbCr quantization: No Data
    RGB quantization: Selectable (via AVI Q)
    PT scan behavior: No Data
    IT scan behavior: Supports both over- and underscan
    CE scan behavior: Supports both over- and underscan
  Colorimetry Data Block:
    xvYCC601
    xvYCC709
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
    Supports_AI
    DC_36bit
    DC_30bit
    DC_Y444
    Maximum TMDS clock: 300 MHz
    Extended HDMI video details:
      HDMI VICs:
        HDMI VIC 1:  3840x2160   30.000 Hz  16:9    67.500 kHz 297.000 MHz
        HDMI VIC 2:  3840x2160   25.000 Hz  16:9    56.250 kHz 297.000 MHz
        HDMI VIC 3:  3840x2160   24.000 Hz  16:9    54.000 kHz 297.000 MHz
        HDMI VIC 4:  4096x2160   24.000 Hz 256:135  54.000 kHz 297.000 MHz
  HDR Static Metadata Data Block:
    Electro optical transfer functions:
      Traditional gamma - SDR luminance range
      SMPTE ST2084
      Hybrid Log-Gamma
    Supported static metadata descriptors:
      Static metadata type 1
  YCbCr 4:2:0 Video Data Block:
    VIC  96:  3840x2160   50.000 Hz  16:9    56.250 kHz 297.000 MHz
    VIC  97:  3840x2160   60.000 Hz  16:9    67.500 kHz 297.000 MHz
    VIC 101:  4096x2160   50.000 Hz 256:135  56.250 kHz 297.000 MHz
    VIC 102:  4096x2160   60.000 Hz 256:135  67.500 kHz 297.000 MHz
  Vendor-Specific Video Data Block (HDR10+), OUI 90-84-8B:
    Application Version: 1
  Detailed Timing Descriptors:
    DTD 3:  1920x1080i  50.000 Hz  16:9    28.125 kHz  74.250 MHz (1872 mm x 1053 mm)
                 Hfront  528 Hsync  44 Hback 148 Hpol P
                 Vfront    2 Vsync   5 Vback  15 Vpol P Vfront +0.5 Odd Field
                 Vfront    2 Vsync   5 Vback  15 Vpol P Vback  +0.5 Even Field
    DTD 4:  1366x768    59.790 Hz 683:384  47.712 kHz  85.500 MHz (1872 mm x 1053 mm)
                 Hfront   70 Hsync 143 Hback 213 Hpol P
                 Vfront    3 Vsync   3 Vback  24 Vpol P
Checksum: 0xa3
2) Sharp TV

Code: Select all

xrandr --prop | edid-decode
edid-decode (hex):

00 ff ff ff ff ff ff 00 58 b3 00 37 00 00 00 00
01 16 01 03 80 10 09 78 0a 68 37 a4 54 48 9a 25
0f 4a 4c 20 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 1d 80 18 71 1c 16 20 58 2c
25 00 10 09 00 00 00 9e 01 1d 00 72 51 d0 1e 20
6e 28 55 00 10 09 00 00 00 1e 00 00 00 fc 00 33
32 57 5f 4c 43 44 5f 54 56 0a 20 20 00 00 00 fd
00 31 3d 0f 2e 08 00 0a 20 20 20 20 20 20 01 79

02 03 2b 71 50 01 02 85 06 11 14 15 03 07 12 16
1f 10 13 04 20 26 09 07 01 15 00 50 83 01 00 00
6a 03 0c 00 10 00 80 1e 00 00 00 8c 0a d0 8a 20
e0 2d 10 10 3e 96 00 04 03 00 00 00 18 8c 0a 00
bc 52 00 1e 30 b8 28 55 40 10 09 00 00 00 18 01
1d 00 bc 52 c0 1e 30 b8 28 55 40 10 09 00 00 00
1e 01 1d 00 bc 52 d0 1e 20 b8 28 55 40 10 09 00
00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 d4

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: VES
    Model: 14080
    Made in: week 1 of 2012
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 16 cm x 9 cm
    Gamma: 2.20
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6416, 0.3300
    Green: 0.2832, 0.6015
    Blue : 0.1445, 0.0615
    White: 0.2900, 0.2998
  Established Timings I & II:
    DMT 0x04:   640x480    59.940 Hz   4:3    31.469 kHz  25.175 MHz
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1920x1080i  60.000 Hz  16:9    33.750 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    2 Vsync   5 Vback  15 Vpol P Vfront +0.5 Odd Field
                 Vfront    2 Vsync   5 Vback  15 Vpol P Vback  +0.5 Even Field
    DTD 2:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront  110 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
    Display Product Name: '32W_LCD_TV'
  Display Range Limits:
    Monitor ranges (GTF): 49-61 Hz V, 15-46 kHz H, max dotclock 80 MHz
  Extension blocks: 1
Checksum: 0x79

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 1
  Video Data Block:
    VIC   1:   640x480    59.940 Hz   4:3    31.469 kHz  25.175 MHz
    VIC   2:   720x480    59.940 Hz   4:3    31.469 kHz  27.000 MHz
    VIC   5:  1920x1080i  60.000 Hz  16:9    33.750 kHz  74.250 MHz (native)
    VIC   6:  1440x480i   59.940 Hz   4:3    15.734 kHz  27.000 MHz
    VIC  17:   720x576    50.000 Hz   4:3    31.250 kHz  27.000 MHz
    VIC  20:  1920x1080i  50.000 Hz  16:9    28.125 kHz  74.250 MHz
    VIC  21:  1440x576i   50.000 Hz   4:3    15.625 kHz  27.000 MHz
    VIC   3:   720x480    59.940 Hz  16:9    31.469 kHz  27.000 MHz
    VIC   7:  1440x480i   59.940 Hz  16:9    15.734 kHz  27.000 MHz
    VIC  18:   720x576    50.000 Hz  16:9    31.250 kHz  27.000 MHz
    VIC  22:  1440x576i   50.000 Hz  16:9    15.625 kHz  27.000 MHz
    VIC  31:  1920x1080   50.000 Hz  16:9    56.250 kHz 148.500 MHz
    VIC  16:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz
    VIC  19:  1280x720    50.000 Hz  16:9    37.500 kHz  74.250 MHz
    VIC   4:  1280x720    60.000 Hz  16:9    45.000 kHz  74.250 MHz
    VIC  32:  1920x1080   24.000 Hz  16:9    27.000 kHz  74.250 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 16
    AC-3:
      Max channels: 6
      Supported sample rates (kHz):
      Maximum bit rate: 640 kb/s
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
    Supports_AI
    Maximum TMDS clock: 150 MHz
  Detailed Timing Descriptors:
    DTD 3:   720x480    59.940 Hz   3:2    31.469 kHz  27.000 MHz (4 mm x 3 mm)
                 Hfront   16 Hsync  62 Hback  60 Hpol N
                 Vfront    9 Vsync   6 Vback  30 Vpol N
    DTD 4:  1280x768    17.088 Hz   5:3    13.636 kHz  27.000 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback 220 Hpol N
                 Vfront    5 Vsync   5 Vback  20 Vpol N
    DTD 5:  1280x960    37.879 Hz   4:3    37.500 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
    DTD 6:  1280x720    50.000 Hz  16:9    37.500 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
Checksum: 0xd4
I also checked resolutions on the Sharp TV: it looks like the image fits the screen perfectly with 1280x960.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

Thank you! BTW, I am dealing for hours now with custom edid. I was able to make one with audio information for my monitor, but kernel does not enable audio...Need to dig deeper into it!

Code: Select all

[drm] Got external EDID base block and 1 extension from "edid/1920x1080AUD.bin" for connector "HDMI-A-1"
I had to learn that the kernel has 1920x1080 edid baked in! So giving 1920x1080.bin as boot parameter results in kernel baked edid! Need to rename the custom one.
I checked with edid-decode that my custom edid is without error and shows audio extension:

Code: Select all

edid-decode 1920x1080AUD.bin
edid-decode (hex):

00 ff ff ff ff ff ff 00 31 d8 00 00 00 00 00 00
05 16 01 03 6d 32 1c 78 ea 5e c0 a4 59 4a 98 25
20 50 54 00 00 00 d1 c0 01 01 01 01 01 01 01 01
01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c
45 00 f4 19 11 00 00 1e 00 00 00 ff 00 4c 69 6e
75 78 20 23 30 0a 20 20 20 20 00 00 00 fd 00 3b
3d 42 44 0f 00 0a 20 20 20 20 20 20 00 00 00 fc
00 4c 69 6e 75 78 20 46 48 44 0a 20 20 20 01 04

02 03 0e f1 41 90 23 09 06 07 83 01 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6e

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: LNX
    Model: 0
    Made in: week 5 of 2012
  Basic Display Parameters & Features:
    Analog display
    Input voltage level: 0.7/0.7 V
    Blank level equals black level
    Sync: Separate Composite Serration
    Maximum image size: 50 cm x 28 cm
    Gamma: 2.20
    DPMS levels: Standby Suspend Off
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6416, 0.3486
    Green: 0.2919, 0.5957
    Blue : 0.1474, 0.1250
    White: 0.3125, 0.3281
  Established Timings I & II: none
  Standard Timings:
    DMT 0x52:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz
  Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (500 mm x 281 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
    Display Product Serial Number: 'Linux #0'
  Display Range Limits:
    Monitor ranges (GTF): 59-61 Hz V, 66-68 kHz H, max dotclock 150 MHz
    Display Product Name: 'Linux FHD'
  Extension blocks: 1
Checksum: 0x04

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 1
  Video Data Block:
    VIC  16:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (native)
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 48 44.1
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
Checksum: 0x6e
These users thanked the author joerg for the post:
szalinski (Wed Apr 03, 2024 4:01 am)

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

I've made a step forward. I have dumped a edid file from my 24" LCD with M.NT68676.3 interface board an used this as custom edid. Then there is sound! It means, the edid file I produce with kernel tools/edid makefile is not functional at audio part. And I tried to find in kernel source why there is no audio. :x I will try more to produce edid files with working audio.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

Now I managed to produce a working 1920x1080 edid file with audio extension. But there are some values for video and audio latency inside. It can be that it is not exact for every monitor.
Tomorrow I will upload an otapackage. The edid files are on ramdisk and on vendor partition. So it is not easy to only copy them to the C4. I have corrected also some values for managing heap. With old values I saw sudden OOM that made the launcher crash. With new values I haven't seen this.

Code: Select all

edid-decode 1920x1080ext.bin
edid-decode (hex):

00 ff ff ff ff ff ff 00 31 d8 00 00 00 00 00 00
05 16 01 03 6d 32 1c 78 ea 5e c0 a4 59 4a 98 25
20 50 54 00 00 00 d1 c0 01 01 01 01 01 01 01 01
01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c
45 00 f4 19 11 00 00 1e 00 00 00 ff 00 4c 69 6e
75 78 20 23 30 0a 20 20 20 20 00 00 00 fd 00 3b
3d 42 44 0f 00 0a 20 20 20 20 20 20 00 00 00 fc
00 4c 69 6e 75 78 20 46 48 44 0a 20 20 20 01 04

02 03 15 71 41 90 23 09 0f 07 83 01 00 00 66 03
0c 00 10 00 80 02 3a 80 18 71 38 2d 40 58 2c 45
00 f4 19 11 00 00 1e 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ea

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: LNX
    Model: 0
    Made in: week 5 of 2012
  Basic Display Parameters & Features:
    Analog display
    Input voltage level: 0.7/0.7 V
    Blank level equals black level
    Sync: Separate Composite Serration
    Maximum image size: 50 cm x 28 cm
    Gamma: 2.20
    DPMS levels: Standby Suspend Off
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6416, 0.3486
    Green: 0.2919, 0.5957
    Blue : 0.1474, 0.1250
    White: 0.3125, 0.3281
  Established Timings I & II: none
  Standard Timings:
    DMT 0x52:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz
  Detailed Timing Descriptors:
    DTD 1:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (500 mm x 281 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
    Display Product Serial Number: 'Linux #0'
  Display Range Limits:
    Monitor ranges (GTF): 59-61 Hz V, 66-68 kHz H, max dotclock 150 MHz
    Display Product Name: 'Linux FHD'
  Extension blocks: 1
Checksum: 0x04

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 1
  Video Data Block:
    VIC  16:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (native)
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 88.2 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
    Supports_AI
  Detailed Timing Descriptors:
    DTD 2:  1920x1080   60.000 Hz  16:9    67.500 kHz 148.500 MHz (500 mm x 281 mm)
                 Hfront   88 Hsync  44 Hback 148 Hpol P
                 Vfront    4 Vsync   5 Vback  36 Vpol P
Checksum: 0xea
BTW. there are this video decoders available and also installed and support build in the kernel:

Code: Select all

-rw-r--r-- 1 root root  36864 2024-02-25 09:21 g12a_h264.bin
-rw-r--r-- 1 root root  16384 2024-02-25 09:21 gxl_mpeg12.bin
-rw-r--r-- 1 root root  16384 2024-02-25 09:21 sm1_vp9_mmu.bin

Code: Select all

static const struct amvdec_format vdec_formats_sm1[] = {
	{
		.pixfmt = V4L2_PIX_FMT_VP9,
		.min_buffers = 16,
		.max_buffers = 24,
		.max_width = 3840,
		.max_height = 2160,
		.vdec_ops = &vdec_hevc_ops,
		.codec_ops = &codec_vp9_ops,
		.firmware_path = "meson/vdec/sm1_vp9_mmu.bin",
		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
		.flags = V4L2_FMT_FLAG_COMPRESSED |
			 V4L2_FMT_FLAG_DYN_RESOLUTION,
	}, {
		.pixfmt = V4L2_PIX_FMT_H264,
		.min_buffers = 2,
		.max_buffers = 24,
		.max_width = 3840,
		.max_height = 2160,
		.vdec_ops = &vdec_1_ops,
		.codec_ops = &codec_h264_ops,
		.firmware_path = "meson/vdec/g12a_h264.bin",
		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
		.flags = V4L2_FMT_FLAG_COMPRESSED |
			 V4L2_FMT_FLAG_DYN_RESOLUTION,
	}, {
		.pixfmt = V4L2_PIX_FMT_MPEG1,
		.min_buffers = 8,
		.max_buffers = 8,
		.max_width = 1920,
		.max_height = 1080,
		.vdec_ops = &vdec_1_ops,
		.codec_ops = &codec_mpeg12_ops,
		.firmware_path = "meson/vdec/gxl_mpeg12.bin",
		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
		.flags = V4L2_FMT_FLAG_COMPRESSED,
	}, {
		.pixfmt = V4L2_PIX_FMT_MPEG2,
		.min_buffers = 8,
		.max_buffers = 8,
		.max_width = 1920,
		.max_height = 1080,
		.vdec_ops = &vdec_1_ops,
		.codec_ops = &codec_mpeg12_ops,
		.firmware_path = "meson/vdec/gxl_mpeg12.bin",
		.pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 },
		.flags = V4L2_FMT_FLAG_COMPRESSED,
	},
};
So, h264 yes, vp9 yes, mpeg1+2 yes, but h265 no.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

When I review this theme hardware codec, then I think there is no hardware acceleration. This above is experimental in mainline kernel, in drivers/staging. But there is no vendor specific hardware implementation in android source, means libstagefrighthw for amlogic vdec. And this goes over my skills to create one for mainline kernel experimental solution. On the other hand I saw some videos on this image, mostly mpeg2 encoded, over dlna, fluent and no artifacts. I saw also some music videos with SmartTube also fluent at 1080/25/avc. To be honest, we can't expect high end 4k hardware accelerated video with this image, Android 14 based and mainline kernel. A lot of things remain experimental for years.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

There is a new OTA package for ATV online. Pls see first post and second for edid file setting.
These users thanked the author joerg for the post:
szalinski (Thu Apr 04, 2024 11:48 pm)

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

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by rooted »

I missed you were using mainline, hwdec will of course be an issue.

Keep up the great work, it's really encouraging to see development like this.

User avatar
szalinski
Posts: 5
Joined: Tue Apr 02, 2024 1:12 am
languages_spoken: polish, english
ODROIDs: C4
Location: Poland
Has thanked: 6 times
Been thanked: 0
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by szalinski »

Thank you very much @joerg for all of your work, it's truly inspiring.

Knowing that hw decoding will be an issue with Android 14, for my Samsung 4K I downloaded the official android 9 release with Flauncher and some adb commands (

Code: Select all

adb shell settings put global policy_control immersive.full=*
) to mimic the ATV experience. With a happy surprise, the SmartTube recognised the v9+hdr codec and the VLC played all H.265 and H.264 clips from DLNA without any hiccups. I will stick with it for now - enabling 4K and VLC is important for me for this particular TV.

In terms of the Sharp TV: I have applied the OTA update. I confirm that the Inputs menu is now working and I can manage these settings. Much appreciation!
The custom edid file is also working - everything is OK with the audio. In addition I report that the WiFi USB dongle Edimax EW-7811UTC works fine without any additional work. The SmartTube stil doesn't detect any codes other than avc.

It satisfies my needs for that particular setup. If I can ask for something more it would be an edid file for QuadVGA resolution (i.e. 1280x960p) for the latter TV - after tests with my laptop it seem that it's the only resolution which properly shows all of the image.

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

That's fine! Yes I can produce an additional edid file for that resolution. I guess it is:

Code: Select all

    DTD 5:  1280x960    37.879 Hz   4:3    37.500 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
right?

User avatar
szalinski
Posts: 5
Joined: Tue Apr 02, 2024 1:12 am
languages_spoken: polish, english
ODROIDs: C4
Location: Poland
Has thanked: 6 times
Been thanked: 0
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by szalinski »

joerg wrote:
Mon Apr 08, 2024 6:40 am
That's fine! Yes I can produce an additional edid file for that resolution. I guess it is:

Code: Select all

    DTD 5:  1280x960    37.879 Hz   4:3    37.500 kHz  74.250 MHz (16 mm x 9 mm)
                 Hfront  440 Hsync  40 Hback 220 Hpol P
                 Vfront    5 Vsync   5 Vback  20 Vpol P
right?
Yep, that's the resolution

User avatar
joerg
Posts: 2058
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 212 times
Been thanked: 475 times
Contact:

Re: LineageOS 21.0 (Android 14) for C4 (alpha state) + ATV

Post by joerg »

@szalinski, I have created one edid file that wxEdid app accepts without error. But I can't test it with any of my monitors. Would you be able to store the edid file on /vendor/firmware/edid ? Then, if you edit extrabootargs and restart, it takes a up to 3-4 minutes. The reason is, that the kernel searches this edid file first on ramdisk, when it is not there it takes this minutes that boot continues, after that it takes edid file also from vendor image. After this 3-4 minutes it should show boot animation on your screen, if not, the edid file is not working.
1280x960ext.zip
(283 Bytes) Downloaded 3 times

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest