From ce7e57ef24e4c4d8929ea000ceafa8e83fbcaa9a Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Sat, 19 Mar 2016 23:43:37 +0200 Subject: [PATCH] WeTek_Core/WeTek_Play: set video state to disabled on boot right after boot, if a hardware decoded video is not yet played, asking /dev/amvideocap0 for a frame results in -EAGAIN after a short delay. hyperion is doing AMSTREAM_IOC_GET_VIDEO_DISABLE ioctl on /dev/amvideo to check if video is playing. if initial state is not set, hyperion gets confused, resulting in leds lagging until a hw decoded video is started. this allows hyperion's regular framegrabber and amlgrabber to co-exist nicely --- projects/WeTek_Core/initramfs/platform_init | 3 +++ projects/WeTek_Play/initramfs/platform_init | 3 +++ 2 files changed, 6 insertions(+) diff --git a/projects/WeTek_Core/initramfs/platform_init b/projects/WeTek_Core/initramfs/platform_init index 13a2303373..c83a0f5b76 100755 --- a/projects/WeTek_Core/initramfs/platform_init +++ b/projects/WeTek_Core/initramfs/platform_init @@ -48,6 +48,9 @@ echo 1 > /sys/class/graphics/fb1/blank # Disable framebuffer scaling echo 0 > /sys/class/graphics/fb0/free_scale +# set initial video state +echo 1 > /sys/class/video/disable_video + # Set framebuffer geometry to match the resolution case "$hdmimode" in 720*) diff --git a/projects/WeTek_Play/initramfs/platform_init b/projects/WeTek_Play/initramfs/platform_init index 5e32a6847f..f1adf38fe3 100755 --- a/projects/WeTek_Play/initramfs/platform_init +++ b/projects/WeTek_Play/initramfs/platform_init @@ -46,6 +46,9 @@ echo 0 > /sys/class/graphics/fb0/blank # Disable framebuffer scaling echo 0 > /sys/class/graphics/fb0/free_scale +# set initial video state +echo 1 > /sys/class/video/disable_video + # Set framebuffer geometry to match the resolution case "$hdmimode" in 720*)