Add GM8136 OSDRV

pull/172/head
Dmitry Ermakov 2022-02-10 09:05:14 +03:00
parent 1ddc13a492
commit fe0b881f0a
48 changed files with 1022 additions and 0 deletions

View File

@ -1,4 +1,5 @@
source "$BR2_EXTERNAL_GRAINMEDIA_PATH/linux/Config.ext.in"
source "$BR2_EXTERNAL_GRAINMEDIA_PATH/package/grainmedia-osdrv-gm8136/Config.in"
source "$BR2_EXTERNAL_GRAINMEDIA_PATH/package/grainmedia_patcher/Config.in"
source "$BR2_EXTERNAL_GRAINMEDIA_PATH/package/aura-httpd/Config.in"
source "$BR2_EXTERNAL_GRAINMEDIA_PATH/package/fdk-aac-openipc/Config.in"

View File

@ -0,0 +1,62 @@
--- linux-3.0.101/arch/arm/boot/Makefile 2013-10-22 11:58:59.000000000 +0400
+++ linux-3.0.101/arch/arm/boot/Makefile 2021-12-15 10:51:15.956535987 +0300
@@ -59,15 +59,19 @@
endif
-quiet_cmd_uimage = UIMAGE $@
- cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
- -C none -a $(LOADADDR) -e $(STARTADDR) \
- -n 'Linux-$(KERNELRELEASE)' -d $< $@
+#quiet_cmd_uimage = UIMAGE $@
+# cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
+# -C none -a $(LOADADDR) -e $(STARTADDR) \
+# -n 'Linux-$(KERNELRELEASE)' -d $< $@
-ifeq ($(CONFIG_ZBOOT_ROM),y)
-$(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
+ifneq ($(LOADADDR),)
+ UIMAGE_LOADADDR=$(LOADADDR)
else
-$(obj)/uImage: LOADADDR=$(ZRELADDR)
+ ifeq ($(CONFIG_ZBOOT_ROM),y)
+ UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
+ else
+ UIMAGE_LOADADDR=$(ZRELADDR)
+ endif
endif
$(obj)/uImage: STARTADDR=$(LOADADDR)
--- linux-3.0.101/scripts/Makefile.lib 2013-10-22 11:58:59.000000000 +0400
+++ linux-3.0.101/scripts/Makefile.lib 2021-12-15 10:53:24.551357718 +0300
@@ -262,6 +262,30 @@
lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
+# U-Boot mkimage
+# ---------------------------------------------------------------------------
+
+MKIMAGE := $(srctree)/scripts/mkuboot.sh
+
+# SRCARCH just happens to match slightly more than ARCH (on sparc), so reduces
+# the number of overrides in arch makefiles
+UIMAGE_ARCH ?= $(SRCARCH)
+UIMAGE_COMPRESSION ?= $(if $(2),$(2),none)
+UIMAGE_OPTS-y ?=
+UIMAGE_TYPE ?= kernel
+UIMAGE_LOADADDR ?= arch_must_set_this
+UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR)
+UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)'
+UIMAGE_IN ?= $<
+UIMAGE_OUT ?= $@
+
+quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT)
+ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \
+ -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \
+ -T $(UIMAGE_TYPE) \
+ -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
+ -n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT)
+
# XZ
# ---------------------------------------------------------------------------
# Use xzkern to compress the kernel image and xzmisc to compress other things.

View File

@ -1,4 +1,5 @@
include $(BR2_EXTERNAL_GRAINMEDIA_PATH)/linux/linux-ext-grainmedia_patcher.mk
include $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/grainmedia-osdrv-gm8136.mk
include $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia_patcher/grainmedia_patcher.mk
include $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/aura-httpd/aura-httpd.mk
include $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/fdk-aac-openipc/fdk-aac-openipc.mk

View File

@ -0,0 +1 @@
../../general/package/grainmedia-osdrv-gm8136

View File

@ -0,0 +1,6 @@
config BR2_PACKAGE_GRAINMEDIA_OSDRV_GM8136
bool "grainmedia-osdrv-gm8136"
help
grainmedia-osdrv-gm8136 - Grainmedia kernel modules and libs
https://openipc.org

View File

@ -0,0 +1,75 @@
#!/bin/sh
DAEMON="majestic"
PIDFILE="/var/run/$DAEMON.pid"
DAEMON_ARGS="-s"
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
load_majestic() {
printf 'Starting %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
# shellcheck disable=SC2086 # we need the word splitting
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" \
-- $DAEMON_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
# The daemon does not create a pidfile, and use "-m" to instruct start-stop-daemon to create one.
start() {
logger -s -p daemon.info -t grainmedia "Check MAC for Xiongmai devices"
if [ "$(fw_printenv -n ethaddr)" = "00:00:23:34:45:66" ]; then
logger -s -p daemon.info -t grainmedia "The eth0 interface has a lousy MAC, let's try to change it.."
XMMAC="$(ipcinfo --xm_mac)" && [ -n "${XMMAC}" ] && fw_setenv ethaddr ${XMMAC} && reboot -f || logger -s -p daemon.info -t grainmedia "It is not possible to install a new MAC on the eth0 interface.."
else
logger -s -p daemon.info -t grainmedia "The eth0 interface has a correct MAC - $(fw_printenv -n ethaddr)"
fi
#
logger -s -p daemon.info -t grainmedia "Loading of kernel modules and initialization of the video system has started"
export TZ=$(cat /etc/TZ)
load_grainmedia -i
#
#
load_majestic
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
[ -f /usr/bin/$DAEMON ] || echo -en "DISABLED, "
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
reload
}
reload() {
load_majestic
}
case "$1" in
start|stop|restart|reload)
"$1";;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

View File

@ -0,0 +1,110 @@
; GM8136_1M(Tiny Memory) Product Configuration (Without LCD, MPEG4, Encode Switching)
[VERSION]
VERSION = 0.1
[GRAPH_TYPE]
; graph type: 1(DVR with display 3DI), 2(IPCAM)
graph_type = 2
[DISPLAY_GROUP]
; GROUP0 = lcd_vch0, lcd_vch1
; Display group method:
; 0(FRAME), 2(2FRAME), 3(2FRAME_2FRAME), 4(FRAME_FRAME)
GROUP0 = 0
METHOD0 = 0
[BITRATE]
min_compressed_ratio = 35
max_bitrate = 8M/10240K, 3M/8192K, 2M/4096K,720P/4096K, VGA/1024K, D1/1024K, CIF/512K
[PLAYBACK]
; CONFIG1 = resolution_keywords/channels/total_fps/ddr_channel, ...
; default resolution keywords: 8M, 5M, 4M, 3M, 2M, 1.3M, 1M, nHD, 1080P, 720P, D1, VGA, CIF, QCIF
[PLAYBACK_3DI]
; CONFIG1 = resolution_keywords/channels/total_fps/ddr_channel, ...
[ENCODE_STREAMS]
; CONFIG1 = resolution_keywords/channels/total_fps/ddr_channel, ...
CONFIG1 = 720P/1/30/0, D1/1/30/0
[ENCODE_CAPTURE]
; CONFIG1 = resolution_keywords/channels/total_fps/ddr_channel, ...
CONFIG1 = 720P/1/30/0, D1/1/30/0
[ENCODE_SCALER]
; CONFIG1 = resolution keywords = channels/total_fps/ddr_channel, ...
;CONFIG1 = D1/1/30/0
[ENCODE_DIDN]
; CONFIG1 = resolution_keywords/channels/total_fps/ddr_channel, ...
CONFIG1 = 720P/1/30/0, D1/1/30/0
[RAW_OUT]
; CONFIG1 = channels/total_fps/ddr_channel, ...
[LDC_OUT]
; CONFIG1 = channels/total_fps/ddr_channel, ...
[AUDIO]
; CONFIG1 = audio_keyword/channels/sample_rate/stereo/bits/ddr_vch
CONFIG1 = au_grab/4/16K/mono/16/0, au_render/4/16K/mono/16/0
max_frame_samples = 2048
grab_buffer_time = 768
render_buffer_time = 768
[BUFFER_DISPLAY]
; Display count lcd_vch/count/ddr_channel, lcd_vch/count/ddr_channel, ...
display_count = 0/0/0
; Playback 3DI input buffer count per channel
playback_3di_input_count = 0
; Playback scaler input buffer count per channel
playback_scaler_input_count = 0
[BUFFER_BITSTREAM]
; Playback bitstream data buffer: time/ddr_vch
datain_buffer_time = 0/0
; Record bitstream data buffer: time/ddr_vch
; dataout_buffer_time = 264/0
dataout_buffer_time = 231/0
[BUFFER_CAPTURE]
; Encode capture buffer three slop: fps/count, fps/count, fps/count
CONFIG1 = 720P/30/3, 720P/25/3, 720P/5/2
CONFIG2 = D1/30/3, D1/25/3, D1/5/2
capture_max_fps = 30
[BUFFER_ENCODE_DIDN]
; Encode substream scaler out buffer time
encode_didn_out_buffer_count = 2
[BUFFER_SUBSTREAM]
; Encode substream scaler out buffer time
encode_scaler_out_buffer_count = 2
[BUFFER_RAW]
raw_out_buffer_count = 0
[BUFFER_LDC]
ldc_out_buffer_count = 0
[ENCODE_MOTION]
; Enable motion data under specified resolution by "motion_resolution = D1, CIF..."
; motion_resolution = CIF
[SNAPSHOT]
;yuv_max_width = 320
;yuv_max_height = 240
yuv_max_width = 704
yuv_max_height = 576
max_bitstream_size = 65536
[RESERVED_BUFFER]
; Reserved buffer ratio for seamless switching usage, such as 4CH 720P->4CH 1080P without any stop
; To reduce memory usage, set reserved_ratio = 0
reserved_ratio = 0

View File

@ -0,0 +1,343 @@
video_frontend=ov2715
video_system=PAL
# Support video_front_end: ov2710, ov2715, ov9712, ov9715, ov9714, ov5653
# Support video_front_end: mt9m034, ar0130, ar0140, ar0330, ar0331
# Support video_front_end: imx222, imx238, imx236, imx238
chipver=`head -1 /proc/pmu/chipver`
chipid=`echo $chipver | cut -c 1-4`
if [ "$chipid" != "8136" ] && [ "$chipid" != "8135" ]; then
echo "Error! Not support chip version $chipver."
exit
fi
if [ "$video_system" != "NTSC" ] && [ "$video_system" != "PAL" ]; then
echo "Invalid argument for NTSC/PAL."
exit
fi
if [ "$1" != "" ] ; then
video_frontend=$1
fi
#cp /usr/etc/gm/isp328_*.cfg /mnt/mtd/
#if [ "$video_frontend" != "ov2715" ] && [ "$video_frontend" != "ov2710" ] &&
# [ "$video_frontend" != "ov9710" ] && [ "$video_frontend" != "ov9712" ] &&
# [ "$video_frontend" != "ov9715" ] && [ "$video_frontend" != "ov9714" ] &&
# [ "$video_frontend" != "ar0130" ] && [ "$video_frontend" != "mt9m034" ] &&
# [ "$video_frontend" != "ar0140" ] && [ "$video_frontend" != "ar0141" ] &&
# [ "$video_frontend" != "ar0330" ] && [ "$video_frontend" != "ar0331" ] &&
# [ "$video_frontend" != "imx222" ] && [ "$video_frontend" != "imx124" ] &&
# [ "$video_frontend" != "imx238" ] && [ "$video_frontend" != "imx236" ]; then
# echo "Invalid argument for video frontend: $video_frontend"
# exit
#fi
insmod /lib/modules/3.3.0/grainmedia/frammap.ko
cat /proc/frammap/ddr_info
if [ "$chipid" == "8136" ];then
insmod /lib/modules/3.3.0/grainmedia/log.ko mode=0 log_ksize=256
else
insmod /lib/modules/3.3.0/grainmedia/log.ko mode=0 log_ksize=64
fi
insmod /lib/modules/3.3.0/grainmedia/ms.ko
insmod /lib/modules/3.3.0/grainmedia/em.ko
if [ "$chipid" == "8136" ];then
insmod /lib/modules/3.3.0/grainmedia/flcd200-common.ko
insmod /lib/modules/3.3.0/grainmedia/flcd200-pip.ko output_type=0 fb0_fb1_share=1 # CVBS display
fi
insmod /lib/modules/3.3.0/grainmedia/sar_adc.ko
insmod /lib/modules/3.3.0/grainmedia/think2d.ko
insmod /lib/modules/3.3.0/grainmedia/ftpwmtmr010.ko
insmod /lib/modules/3.3.0/grainmedia/fe_common.ko
insmod /lib/modules/3.3.0/grainmedia/adda308.ko input_mode=0 single_end=1
insmod /lib/modules/3.3.0/grainmedia/ft3dnr200.ko src_yc_swap=1 dst_yc_swap=1 ref_yc_swap=1
case "$video_frontend" in
"ov2715"|"ov2710")
codec_max_width=1920
codec_max_height=1080
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ov2715.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_ov2715.ko sensor_w=1920 sensor_h=1080 fps=30 mirror=0 flip=0
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ov2715.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_ov2715.ko sensor_w=1920 sensor_h=1080 fps=25 mirror=0 flip=0
fi
;;
"soih42")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_soih42.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
[ -z "$FISH_SOIH42_CFG" ] && insmod /lib/modules/3.3.0/grainmedia/fisp_soih42.ko sensor_w=1280 sensor_h=720 fps=30 mirror=0 flip=0
[ -n "$FISH_SOIH42_CFG" ] && insmod /lib/modules/3.3.0/grainmedia/fisp_soih42.ko $FISH_SOIH42_CFG
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_soih42.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
[ -z "$FISH_SOIH42_CFG" ] && insmod /lib/modules/3.3.0/grainmedia/fisp_soih42.ko sensor_w=1280 sensor_h=720 fps=25 mirror=0 flip=0
[ -n "$FISH_SOIH42_CFG" ] && insmod /lib/modules/3.3.0/grainmedia/fisp_soih42.ko $FISH_SOIH42_CFG
fi
;;
"soih81")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_soih81.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_soih81.ko sensor_w=1280 sensor_h=720 fps=30 mirror=0 flip=0
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_soih81.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_soih81.ko sensor_w=1280 sensor_h=720 fps=25 mirror=0 flip=0
fi
;;
"53V13")
if [ -z "$codec_max_width" ];then
codec_max_width=1280
codec_max_height=720
fi
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_sc1035.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_53V13.ko sensor_w=$codec_max_width sensor_h=$codec_max_height fps=30 mirror=0 flip=0
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_sc1035.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
devmem 0x90c00054 32 0x10028000
devmem 0x90c000ac 32 0xFFFFFDC2
insmod /lib/modules/3.3.0/grainmedia/fisp_53V13.ko sensor_w=$codec_max_width sensor_h=$codec_max_height fps=25 mirror=0 flip=0
fi
;;
"ov9715"|"ov9712"|"ov9710")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ov9715.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_ov9715.ko sensor_w=1280 sensor_h=720 fps=30 mirror=0 flip=0
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ov9715.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_ov9715.ko sensor_w=1280 sensor_h=720 fps=25 mirror=0 flip=0
fi
;;
"ar0330")
codec_max_width=1920
codec_max_height=1080
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0330.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0330.ko sensor_w=1920 sensor_h=1080 mirror=0 flip=0 interface=1 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0330.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0330.ko sensor_w=1920 sensor_h=1080 mirror=0 flip=0 interface=1 fps=25
fi
;;
"ar0331")
codec_max_width=1920
codec_max_height=1080
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0331.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0331.ko sensor_w=1920 sensor_h=1080 interface=0 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0331.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0331.ko sensor_w=1920 sensor_h=1080 interface=0 fps=25
fi
;;
"mt9m034")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_mt9m034.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_mt9m034.ko sensor_w=1280 sensor_h=720 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_mt9m034.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_mt9m034.ko sensor_w=1280 sensor_h=720 fps=25
fi
;;
"ar0140"|"ar0141")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0140.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0140.ko sensor_w=1280 sensor_h=720 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_ar0140.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_ar0140.ko sensor_w=1280 sensor_h=720 fps=25
fi
;;
"imx238")
codec_max_width=1280
codec_max_height=720
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx238.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_imx138.ko sensor_w=1280 sensor_h=720 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx238.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_imx138.ko sensor_w=1280 sensor_h=720 fps=25
fi
;;
"imx222")
codec_max_width=1920
codec_max_height=1080
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx222.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_imx122.ko sensor_w=1920 sensor_h=1080 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx222.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_imx122.ko sensor_w=1920 sensor_h=1080 fps=25
fi
;;
"imx236")
codec_max_width=1920
codec_max_height=1080
if [ "$video_system" == "NTSC" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx236.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=0
insmod /lib/modules/3.3.0/grainmedia/fisp_imx136.ko sensor_w=1920 sensor_h=1080 fps=30
elif [ "$video_system" == "PAL" ] ; then
insmod /lib/modules/3.3.0/grainmedia/fisp328.ko cfg_path=/mnt/mtd/isp328_imx236.cfg
insmod /lib/modules/3.3.0/grainmedia/fisp_algorithm.ko pwr_freq=1
insmod /lib/modules/3.3.0/grainmedia/fisp_imx136.ko sensor_w=1920 sensor_h=1080 fps=25
fi
;;
*)
echo "Invalid argument for video frontend: $video_frontend"
exit
;;
esac
insmod /lib/modules/3.3.0/grainmedia/vcap300_common.ko
insmod /lib/modules/3.3.0/grainmedia/vcap0.ko vi_mode=0,1 ext_irq_src=1
insmod /lib/modules/3.3.0/grainmedia/vcap300_isp.ko ch_id=0 range=1
insmod /lib/modules/3.3.0/grainmedia/fmcp_drv.ko mp4_tight_buf=1
insmod /lib/modules/3.3.0/grainmedia/favc_enc.ko h264e_max_b_frame=0 h264e_one_ref_buf=1 h264e_tight_buf=1 h264e_max_width=$codec_max_width h264e_max_height=$codec_max_height h264e_slice_offset=1
insmod /lib/modules/3.3.0/grainmedia/favc_rc.ko
insmod /lib/modules/3.3.0/grainmedia/decoder.ko
insmod /lib/modules/3.3.0/grainmedia/fmjpeg_drv.ko jpg_enc_max_chn=2
if [ "$chipid" == 8136 ];then
insmod /lib/modules/3.3.0/grainmedia/fmpeg4_drv.ko mp4_max_width=$codec_max_width mp4_max_height=$codec_max_height
insmod /lib/modules/3.3.0/grainmedia/mp4e_rc.ko
fi
# Encode 4CH + Cascade YUV 1CH
insmod /lib/modules/3.3.0/grainmedia/sw_osg.ko
if [ "$chipid" == 8136 ];then
insmod /lib/modules/3.3.0/grainmedia/fscaler300.ko max_vch_num=5 max_minors=5 temp_width=0 temp_height=0
else
insmod /lib/modules/3.3.0/grainmedia/fscaler300.ko max_vch_num=3 max_minors=3 temp_width=0 temp_height=0
fi
#insmod /lib/modules/3.3.0/grainmedia/ftdi220.ko
insmod /lib/modules/3.3.0/grainmedia/osd_dispatch.ko
insmod /lib/modules/3.3.0/grainmedia/codec.ko
insmod /lib/modules/3.3.0/grainmedia/audio_drv.ko audio_ssp_num=0,1 audio_ssp_chan=1,1 bit_clock=400000,400000 sample_rate=8000,8000 audio_out_enable=1,0
if [ "$chipid" == "8136" ];then
insmod /lib/modules/3.3.0/grainmedia/gs.ko reserved_ch_cnt=2 alloc_unit_size=262144 flow_mode=1
else
insmod /lib/modules/3.3.0/grainmedia/gs.ko reserved_ch_cnt=1 alloc_unit_size=65536 flow_mode=1
fi
if [ -f /lib/loop_comm.ko ];then
insmod /lib/loop_comm.ko
else
insmod /lib/modules/3.3.0/grainmedia/loop_comm.ko
fi
if [ -f /lib/vpd_slave.ko ];then
insmod /lib/vpd_slave.ko vpslv_dbglevel=0 ddr0_sz=0 ddr1_sz=0 config_path="/mnt/mtd/" usr_func=0 usr_param=0 datain_minors=4 dataout_minors=8
else
insmod /lib/modules/3.3.0/grainmedia/vpd_slave.ko vpslv_dbglevel=0 ddr0_sz=0 ddr1_sz=0 config_path="/mnt/mtd/" usr_func=0 usr_param=0 datain_minors=4 dataout_minors=8
fi
if [ -f /lib/vpd_master.ko ];then
insmod /lib/vpd_master.ko vpd_dbglevel=0 gmlib_dbglevel=0
else
insmod /lib/modules/3.3.0/grainmedia/vpd_master.ko vpd_dbglevel=0 gmlib_dbglevel=0
fi
echo /root > /proc/videograph/dumplog #configure log path
mdev -s
cat /proc/modules
echo 0 > /proc/frammap/free_pages #should not free DDR1 for performance issue
echo 1 > /proc/vcap300/vcap0/dbg_mode #need debug mode to detect capture overflow
echo 0 > /proc/videograph/em/dbglevel
echo 0 > /proc/videograph/gs/dbglevel
echo 0 > /proc/videograph/ms/dbglevel
echo 0 > /proc/videograph/datain/dbglevel
echo 0 > /proc/videograph/dataout/dbglevel
echo 0 > /proc/videograph/vpd/dbglevel
echo 0 > /proc/videograph/gmlib/dbglevel
echo =========================================================================
if [ -e /mnt/mtd/gmlib.cfg ] ; then
grep ";" /mnt/mtd/gmlib.cfg |sed -n '1,1p'
else
grep ";" /mnt/mtd/spec.cfg |sed -n '2,6p'
fi
#rootfs_date=`ls /|grep 00_2`
#mtd_date=`ls /mnt/mtd|grep 00_2`
echo =========================================================================
echo " Video Front End: $video_frontend"
echo " Chip Version: $chipver"
echo =========================================================================
devmem 0x9a1000a0 32 0x87878587
devmem 0x9a100034 32 0x061f0606
devmem 0x9a1000c4 32 0x08000f08
devmem 0x9a1000c8 32 0x061f0606
devmem 0x9a100030 32 0xDF000f04
#devmem 0x96105440 32 0x01500000
#devmem 0x96105438 32 0x01500000
#echo 1 0x50 > /proc/3dnr/dma/param
#echo w ae_en 0 > /proc/isp320/command
#echo w sen_exp 133 > /proc/isp320/command
#echo w fps 15 > /proc/isp320/command
# force max CPU performance
#echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

View File

@ -0,0 +1,61 @@
#!/bin/sh
# Grain Media Video Graph Cleanup Script
video_frontend=soih42
# GM8210, GM828x: nvp1918, nvp1118, cx26848, cx26848_960h, tw2968, mv4101
# GM8139, GM8136: soih42, ov9715, ov5653, ar0331, mt9m034, ov9714
# GM8139, GM8136: imx122, imx222, imx138, imx236, ar0835, ar0330, mt9p031, imx238, mn34220
chipver=`head -1 /proc/pmu/chipver`
chipid=`echo $chipver | cut -c 1-4`
cpu_enum=`grep -A 3 'cpu_enum' /proc/pmu/attribute | grep 'Attribute value' | cut -c 18`
# cpu_enum = 0(host_fa726), 1(host_fa626), 2(host_7500), 3(dev_fa726), 4(dev_fa626)
/sbin/rmmod vpd_master.ko
/sbin/rmmod vpd_slave.ko
/sbin/rmmod loop_comm.ko
/sbin/rmmod gs.ko
/sbin/rmmod audio_drv.ko
/sbin/rmmod codec.ko
/sbin/rmmod osd_dispatch.ko
/sbin/rmmod fscaler300.ko
/sbin/rmmod sw_osg.ko
if [ "$chipid" != 8135 ];then
/sbin/rmmod mp4e_rc.ko
/sbin/rmmod fmpeg4_drv.ko
fi
/sbin/rmmod fmjpeg_drv.ko
/sbin/rmmod decoder.ko
/sbin/rmmod favc_rc.ko
/sbin/rmmod favc_enc.ko
/sbin/rmmod fmcp_drv.ko
if [ "$chipid" == "8139" ] || [ "$chipid" == "8138" ] || [ "$chipid" == "8137" ]; then
/sbin/rmmod /lib/modules/vcap300_isp.ko
/sbin/rmmod /lib/modules/vcap0.ko
/sbin/rmmod /lib/modules/vcap300_common.ko
/sbin/rmmod /lib/modules/fisp_$video_frontend.ko
/sbin/rmmod /lib/modules/fisp_algorithm.ko
/sbin/rmmod /lib/modules/fisp320.ko
/sbin/rmmod /lib/modules/ft3dnr.ko
/sbin/rmmod /lib/modules/adda302.ko
/sbin/rmmod /lib/modules/fe_common.ko
/sbin/rmmod /lib/modules/ftpwmtmr010.ko
/sbin/rmmod /lib/modules/think2d.ko
/sbin/rmmod /lib/modules/sar_adc.ko
elif [ "$chipid" == "8136" ] || [ "$chipid" == "8135" ]; then
/sbin/rmmod vcap300_isp.ko
/sbin/rmmod vcap0.ko
/sbin/rmmod vcap300_common.ko
/sbin/rmmod fisp_$video_frontend.ko
/sbin/rmmod fisp_algorithm.ko
/sbin/rmmod fisp328.ko
/sbin/rmmod ft3dnr200.ko
/sbin/rmmod adda308.ko
/sbin/rmmod fe_common.ko
/sbin/rmmod ftpwmtmr010.ko
/sbin/rmmod think2d.ko
/sbin/rmmod sar_adc.ko
fi

View File

@ -0,0 +1,323 @@
[INFO]
ISP=ISP328
version = 1.0.0.0
sensor = OV9715
lens =
[USER]
brightness =128
contrast =128
sharpness =128
hue=128
saturation =128
denoise =128
adjust_blc =1
adjust_nr =1
adjust_gamma =1
adjust_sat =1
adjust_ce = 1
adjust_cc = 1
[ADJ]
gain_th =96,128,256,512,1024,2048,4096,8192,8192
gamma_idx =4,4,4,4,4,5,5,5,5
nl_dpc =2,5,27,70,90,115,122,240,240
nl_raw =8,16,28,42,77,120,188,245,245
nl_ctk =8,16,28,42,77,120,188,245,245
nl_ci =8,16,40,64,87,120,188,245,240
ce_lvl =20,20,10,10,10,10,10,10,10
sp_lvl =120,120,110,110,100,95,95,70,60 # qiang
#sp_lvl =100,100,90,90,80,60,60,60,60 # zhong
#sp_lvl =80,80,80,70,70,60,60,60,60 # Ruo
#sp_lvl =60,60,60,60,60,50,50,50,50 # Ruo 1
sp_nr_lvl=0,0,3,3,3,3,3,3,3
sp_clip_lvl=0,0,0,0,0,0,0,0,0
saturation_lvl =128,120,100,70,45,30,20,20,20
tmnr_lvl =20,32,32,48,48,48,48,48,48
blc_r=-64,-64,-58,-48,-40,-31,-22,-16,-8
blc_g=-40,-40,-40,-40,-35,-31,-22,-16,-8
blc_b=-64,-64,-64,-64,-55,-55,-55,-80,-80
#blc_r=-64,-64,-58,-48,-36,-32,-30,-16,-8
#blc_g=-64,-64,-58,-48,-32,-32,-30,-16,-8
##blc_b=-64,-64,-58,-48,-36,-32,-30,-16,-8
#blc_b=-64,-64,-64,-64,-75,-80,-80,-80,-80
[DC]
wdr_kn_x = 1024, 2048, 3040, 4000
wdr_kn_y = 64, 128, 4096, 65535
wdr_sl = 1, 1, 64, 1024
[CO]
## order: R, Gr, Gb, B
ob =-64, -64, -64, -64
#ob =-48, -24, -24, -44
[LS]
lsc_segrds =14
lsc_ctr_r =482, 589
lsc_ctr_gr =482, 589
lsc_ctr_gb =482, 589
lsc_ctr_b =482, 589
lsc_mxtn_r=175,372,418,156,115,566,504,129
lsc_mxtn_gr=175,372,418,156,115,566,504,129
lsc_mxtn_gb=175,372,418,156,115,566,504,129
lsc_mxtn_b=175,372,418,156,115,566,504,129
lsc_rdsparam_r=256,256,268,259,274,263,281,267,288,271,293,276,298,279,303,284,307,288,311,293,316,296,322,299,323,303,324,307,324,308,325,309,264,258,271,261,277,265,285,269,289,273,296,278,300,282,306,286,309,291,313,294,320,298,322,301,324,305,324,308,325,308,326,310,256,256,267,260,272,263,278,268,284,272,289,275,294,279,299,285,302,288,306,291,310,293,315,297,319,299,323,302,326,305,329,307,263,258,270,261,275,265,282,271,286,274,292,277,297,282,301,287,304,290,309,292,313,296,317,298,321,301,325,303,327,306,330,310,256,256,262,264,266,271,272,274,278,275,281,276,282,276,283,278,283,278,284,279,285,280,286,281,286,281,287,282,288,283,288,283,259,261,265,268,269,273,276,274,280,275,281,276,282,277,283,278,284,279,285,279,285,280,286,281,287,282,287,282,288,283,290,284,256,256,259,268,263,274,267,281,272,286,277,292,279,295,283,300,287,304,292,307,294,311,297,317,300,322,303,326,306,327,309,327,258,263,261,271,265,277,270,283,274,289,279,294,280,298,284,302,290,306,293,308,295,315,299,319,302,325,304,327,307,327,312,328,
lsc_rdsparam_gr=256,256,263,259,267,262,271,265,275,268,279,272,281,276,284,280,286,283,291,286,294,289,295,293,296,295,297,297,297,299,297,299,261,258,265,260,269,263,273,266,277,270,280,274,283,278,285,281,289,285,293,288,295,291,296,294,296,296,297,298,297,299,298,300,256,256,262,260,265,263,270,266,274,269,278,273,280,276,281,280,285,284,289,285,293,288,296,290,298,292,301,295,302,297,303,300,260,259,263,261,267,265,272,267,276,271,279,275,280,278,283,282,287,285,291,287,294,289,298,291,300,293,302,296,302,298,304,301,256,256,260,263,263,267,268,269,272,269,275,270,276,271,276,271,277,272,278,273,278,273,279,274,280,274,280,275,281,275,281,275,259,260,261,265,265,268,270,269,274,270,276,270,276,271,277,272,277,272,278,273,279,274,280,274,280,274,280,275,281,275,282,276,256,256,259,263,261,268,265,272,269,275,273,278,276,280,278,283,281,286,285,290,287,294,291,296,294,298,296,302,298,302,301,302,258,260,260,266,263,270,267,274,271,276,275,279,277,282,279,284,283,288,286,292,289,296,292,297,295,300,297,302,301,302,302,303,
lsc_rdsparam_gb=256,256,263,259,267,261,272,265,275,268,279,272,281,276,284,280,287,283,292,287,294,289,297,293,298,295,298,297,298,299,299,299,260,258,265,260,269,263,274,266,277,270,280,274,283,278,285,281,289,286,293,288,296,291,297,294,298,296,298,298,298,299,300,300,256,256,262,260,265,263,270,266,274,269,278,273,280,276,282,280,285,284,289,286,293,288,298,290,300,292,301,295,302,297,304,300,259,259,263,261,267,265,272,267,276,271,279,275,281,278,283,282,287,285,291,287,295,289,298,291,300,293,302,296,303,298,306,302,256,256,260,263,263,267,267,269,272,269,275,270,276,271,276,271,277,272,278,273,279,273,279,274,280,274,280,275,281,275,281,275,258,260,261,265,265,268,270,269,274,270,276,270,276,271,277,272,277,272,278,273,279,274,280,274,280,274,280,275,281,275,282,276,256,256,259,263,261,268,265,272,269,276,273,278,276,280,278,283,281,286,285,290,288,294,290,297,294,298,296,301,298,302,301,302,258,260,260,266,263,270,267,274,271,277,275,279,277,282,279,284,283,288,287,292,289,296,292,297,295,300,297,302,299,302,302,303,
lsc_rdsparam_b=256,256,263,257,264,258,269,261,274,264,277,264,278,267,279,268,280,267,282,269,287,272,290,274,291,276,292,278,292,280,293,280,261,256,263,257,267,259,272,263,276,264,278,265,278,268,280,267,281,268,285,270,288,273,291,275,292,277,292,280,293,280,294,282,256,256,261,256,262,258,268,262,272,264,276,265,278,267,279,267,280,267,283,268,284,271,284,273,287,275,291,277,294,280,297,282,260,256,261,257,265,260,270,263,274,264,277,266,277,267,280,267,280,268,283,269,284,272,285,274,289,276,292,279,297,280,301,284,256,256,259,260,260,263,264,264,268,265,269,265,270,265,270,265,270,265,270,265,271,266,271,267,271,267,272,268,272,268,273,268,258,258,259,262,262,264,266,264,269,265,270,265,270,265,270,265,270,266,271,266,271,266,271,267,271,268,272,268,273,268,274,269,256,256,258,262,259,265,262,269,265,273,268,276,271,276,272,278,272,277,273,277,274,280,274,285,276,288,278,291,280,290,283,290,257,260,258,263,260,267,263,272,267,275,270,276,272,277,271,277,271,278,274,279,274,281,275,287,277,291,279,290,281,290,285,290,
[DRC]
Virtual_Size=1280x1024
Virtual_F=1.000000
Virtual_A=0.200000
Virtual_A_Min=0.200000
Virtual_PreGamma=100
Virtual_PG_Black=0
Virtual_PG_Contrast=100
wdr_bghno=5
wdr_bgvno=5
wdr_bgw2=8
wdr_bgh2=8
wdr_bgho=256
wdr_bgvo=192
wdr_bghskip=0
wdr_bgvskip=0
wdr_F_index=0,1,2,3,1028,0,0,0,0,0,0,0,0,0,0,0
wdr_F_value=256,512,1024,2048,2176,2304,2432,2560,2688,2816,2944,3072,3200,3328,3456,3584,3712,3840,3968,4096,0,0,0,0,0,0,0,0,0,0,0,0
wdr_A_index=768,520,524,272,274,20,21,22,23,24,25,26,27,28,29,286
wdr_A_value=4032,3848,3579,3269,2958,2667,2410,2189,1844,1601,1429,1305,1213,1144,1092,1050,991,951,924,904,878,862,852,845,840,836,833,831,829,828,827,826
wdr_PG_index=0,769,9,10,1035,0,0,0,0,0,0,0,0,0,0,0
wdr_PG_value=256,288,319,351,383,415,447,479,511,1023,2047,2176,2304,2432,2560,2688,2816,2944,3072,3200,3328,3456,3584,3712,3839,3967,4095,0,0,0,0,0
wdr_intensity_blend=5
wdr_intensity_localmax=0
wdr_intensity_varth=255
wdr_max_gain_ratio = 48
wdr_strength=0
[DRC_WDR]
wdr_bghno=5
wdr_bgvno=4
wdr_bgw2=8
wdr_bgh2=8
wdr_bgho=256
wdr_bgvo=155
wdr_bghskip=0
wdr_bgvskip=1
wdr_PG_index = 0,769,9,10,1035,28,29,30,31,18,19,20,21,22,23,792
wdr_PG_value = 256,288,319,351,383,415,447,479,511,1023,2047,2176,2304,2432,2560,2688,2816,2944,3072,3200,3328,3456,3584,3712,3839,3967,4095,4210,8362,16609,32993,65534
wdr_F_index = 0,1025,785,537,285,28,29,30,31,28,29,30,31,0,0,0
wdr_F_value = 2233,2273,2310,2346,2380,2412,2443,2472,2500,2527,2553,2579,2603,2626,2649,2671,2692,2770,2841,2905,2963,3017,3067,3113,3157,3307,3431,3535,3625,3900,4096,65535
wdr_A_index = 768,520,524,272,274,20,21,22,23,24,25,26,27,28,29,30
wdr_A_value = 3752,3142,2541,2042,1652,1352,1122,944,693,530,418,339,281,237,202,175,136,108,89,74,54,41,33,27,22,19,16,14,12,11,10,127
wdr_qcoef1 = 2364
wdr_qcoef2 = 1831
wdr_qcoef3 = 1548
wdr_intensity_blend = 5
wdr_intensity_localmax=0
wdr_intensity_varth = 255
wdr_max_gain_ratio = 64
wdr_strength = 128
[GM]
#index =0x300,0x108,0x10a,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x116,0x218,0x21c
#value = 6,12,18,25,31,37,43,49,71,92,106,117,135,150,163,174,185,195,205,215,224,232,236,240,242,244,246,248,249,251,253,255
#VirtualType=2
#VirtualGamma=23
#VirtualBlack=0
#VirtualContrast=100
#VirtualControlNum=9
#VirtualControls=0,0,191,38,315,61,516,93,840,122,1404,157,2330,196,3265,231,4096,255,
VirtualType=2
VirtualGamma=23
VirtualBlack=0
VirtualContrast=100
VirtualControlNum=11
VirtualControls=0,0,158,39,307,63,564,93,881,120,1415,152,2345,193,2889,210,3443,228,3720,236,4096,246,
index=0x200,0x104,0x206,0xa,0xb,0xc,0xd,0xe,0x10f,0x111,0x13,0x14,0x15,0x16,0x17,0x318
value=22,36,47,57,74,89,95,101,107,112,130,145,158,170,181,186,192,196,200,208,216,224,232,240,241,241,242,243,244,245,245,246
[GM_WDR]
index =0x300,0x108,0x10a,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x116,0x218,0x21c
value =1,4,6,8,11,14,17,20,35,52,68,82,109,128,145,161,176,190,202,213,223,232,236,240,242,244,246,248,250,251,253,255
VirtualType=2
VirtualGamma=18
VirtualBlack=0
VirtualContrast=100
VirtualControlNum=8
VirtualControls=0,0,277,24,516,51,792,85,1136,118,2139,181,3351,234,4096,255,
[CE]
ce_bghno_0 = 16
ce_bgvno_0 = 9
ce_bghno_1 = 5
ce_bgvno_1 = 3
ce_blend = 128
ce_th = 3
ce_strength = 20
[CI]
edge_dth = 20
freq_th = 320
freq_blend = 16
[CV]
## order: D65 CWF A
cv_0=77,151,29,-56,-296,352,280,-288,7
cv_1=77,151,29,-56,-316,372,291,-235,-56
cv_2=77,151,29,-74,-448,522,321,-228,-93
## default value
#cv_0 = 76,150,30,-44,-84,128,128,-108,-20
#cv_1 = 76,150,30,-44,-84,128,128,-108,-20
#cv_2 = 76,150,30,-44,-84,128,128,-108,-20
[IA]
ia_contrast_mode =0
ia_colorize_u =12
ia_colorize_v =6
ia_offset_u =0
ia_offset_v =0
ia_hue =0,0,0,0,0,0,0,0
ia_saturation =128,128,128,128,128,128,128,128
ia_poster_th =160,208,104,180
ia_poster_y =90,173,214,107
[CS]
cs_i1 =12
cs_i2 =64
cs_i3 =90
cs_i4 =135
cs_o0 =36
cs_o1 =55
cs_o4 =54
cs_slope0 =403
cs_slope1 =980
cs_slope3 =1139
cs_slope4 =114
cs_cb_th =36
cs_cr_th =18
[AE]
## f_number table:
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#-------------------------------------------------------------------------------------
# 1.0 1.1 1.2 1.3 1.4 1.5 1.7 1.8 2.0 2.2 2.5 2.8 3.2 3.5 4.0 4.5 5.0 5.6 6.3 7.1 8.0
f_number = 11
const_k = 25205901
target_y = 100
#speed 0 ~ 128
speed=128
#converge_th 5~20
converge_th=10
#delay 0 ~ 5
delay = 2
#auto_drc 0 ~ 10 (strength)
auto_drc=0
auto_contrast=0
#max ISP gain (125 ~ 65536)
max_isp_gain=1024
[IRIS]
[AWB]
awb_th0=15
awb_th1=245
#awb_th2=76
awb_th2=120
awb_th3=304
awb_th4=-82
awb_th5=136
awb_th6=36
awb_th7=182
awb_th8=36
awb_th9=182
awb_th10=32
awb_th11=55
awb_th12=255
rb_ratio=80,198,271
#outdoor
#target_rg_ratio=1000,1000,1000
#target_bg_ratio=980,980,980
#indoor
target_rg_ratio=1024,1024,1024
target_bg_ratio=1024,1024,1024
VirtualMode=0
VirtualPoints=73,80,62,96,57,122,52,142,47,161,96,69,76,82,68,99,57,118,51,135,137,42,112,50,99,64,85,78,72,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
VirtualThs=15,245,76,304,-82,136,36,182,36,125,32,77,255,10,245,120,220,-79,139,51,178,26,146,18,77,255,
VirutalGainRatio=170,139,195,208,243,251,240,293,209,196,168,163,83,186,274,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
OffsetThs=20,0,-24,107,46,24,4,39,31,-36,17,14,0,
#scene mode:=AUTO, INCANDESCENT_LIGHT, SUN_LIGHT, CLOUDY, COOL_LIGHT, SUN_SHADE
R_gain=170,139,195,208,243,251
B_gain=240,293,209,196,168,163
outdoor_ev_th=32768
#grass region
awb_roi1_enable=0
awb_roi1_mode=1
awb_roi1_th0=10
awb_roi1_th1=200
awb_roi1_th2=121
awb_roi1_th3=204
awb_roi1_th4=-13
awb_roi1_th5=64
awb_roi1_th6=62
awb_roi1_th7=125
awb_roi1_th8=48
awb_roi1_th9=87
awb_roi1_th10=0
awb_roi1_th11=1023
[AF]
[MRNR]
G1_Y_Freq=30,22,19,16
G1_Y_Tone=13,19,19,13
G1_C=26,26,26,26
G2_Y=144
G2_C=144
Y_Nr_Str=8,8,8,8
C_Nr_Str=5,5,5,5
Y_NoiseLevel_0 =1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Cb_NoiseLevel_0=1,1,1,1
Cr_NoiseLevel_0=1,1,1,1
Y_NoiseLevel_1 =46,61,63,48,30,25,20,18,34,45,47,36,22,18,15,13,23,30,31,24,15,12,10,9,11,15,15,12,7,6,5,4
Cb_NoiseLevel_1=1,1,1,1
Cr_NoiseLevel_1=1,1,1,1
Y_NoiseLevel_2 =36,56,53,41,36,28,20,11,27,42,39,30,27,21,15,8,18,28,26,20,18,14,10,5,9,14,13,10,9,7,5,2
Cb_NoiseLevel_2=1,1,1,1
Cr_NoiseLevel_2=1,1,1,1
Y_NoiseLevel_3 =57,88,95,75,61,44,30,20,42,66,71,56,45,33,22,15,28,44,47,37,30,22,15,10,14,22,23,18,15,11,7,5
Cb_NoiseLevel_3=96,72,48,24
Cr_NoiseLevel_3=96,72,48,24
Y_NoiseLevel_4 =111,169,183,139,106,91,76,48,83,126,137,104,79,68,57,36,55,84,91,69,53,45,38,24,27,42,45,34,26,22,19,12
Cb_NoiseLevel_4=242,181,121,60
Cr_NoiseLevel_4=242,181,121,60
Y_NoiseLevel_5 =258,269,268,253,224,215,193,182,193,201,201,189,168,161,144,136,129,134,134,126,112,107,96,91,64,67,67,63,56,53,48,45
Cb_NoiseLevel_5=276,207,138,69
Cr_NoiseLevel_5=287,215,143,71
Y_NoiseLevel_6 =258,269,268,253,224,215,193,182,193,201,201,189,168,161,144,136,129,134,134,126,112,107,96,91,64,67,67,63,56,53,48,45
Cb_NoiseLevel_6=276,207,138,69
Cr_NoiseLevel_6=287,215,143,71
Y_NoiseLevel_7 =258,269,268,253,224,215,193,182,193,201,201,189,168,161,144,136,129,134,134,126,112,107,96,91,64,67,67,63,56,53,48,45
Cb_NoiseLevel_7=276,207,138,69
Cr_NoiseLevel_7=287,215,143,71
Y_NoiseLevel_8 =258,269,268,253,224,215,193,182,193,201,201,189,168,161,144,136,129,134,134,126,112,107,96,91,64,67,67,63,56,53,48,45
Cb_NoiseLevel_8=276,207,138,69
Cr_NoiseLevel_8=287,215,143,71
[SHARPEN]
BrightHaloClip=128
DarkHaloClip=128
PeakingGain=16
[CC]
cc_0=256,0,0,0,256,0,0,0,256
cc_1=256,0,0,0,256,0,0,0,256
cc_2=256,0,0,0,256,0,0,0,256
enable=0

View File

@ -0,0 +1,39 @@
################################################################################
#
# grainmedia-osdrv-gm8136
#
################################################################################
GRAINMEDIA_OSDRV_GM8136_VERSION =
GRAINMEDIA_OSDRV_GM8136_SITE =
GRAINMEDIA_OSDRV_GM8136_LICENSE = MIT
GRAINMEDIA_OSDRV_GM8136_LICENSE_FILES = LICENSE
define GRAINMEDIA_OSDRV_GM8136_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d
$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/script/S95grainmedia
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/sensor/config/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.3.0/grainmedia
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.3.0/grainmedia $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/kmod/*.ko
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/script/load*
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/sensors
#$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/sensors $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/sensor/*.so
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
#$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(BR2_EXTERNAL_GRAINMEDIA_PATH)/package/grainmedia-osdrv-gm8136/files/lib/*.so
endef
$(eval $(generic-package))