add package: ingenic-libimp-control (#1148)

pull/1153/head
gtxaspec 2023-11-19 12:16:37 -08:00 committed by GitHub
parent 4ea34ba994
commit 666d813e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 0 deletions

View File

@ -93,6 +93,7 @@ BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
BR2_PACKAGE_QUIRC_OPENIPC=y
# BR2_PACKAGE_AUTONIGHT is not set
BR2_PACKAGE_INGENIC_LIBIMP_CONTROL=y
# WiFi
BR2_PACKAGE_WIRELESS_TOOLS=y

View File

@ -95,6 +95,7 @@ BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
BR2_PACKAGE_QUIRC_OPENIPC=y
# BR2_PACKAGE_AUTONIGHT is not set
BR2_PACKAGE_INGENIC_LIBIMP_CONTROL=y
# WiFi
BR2_PACKAGE_WIRELESS_TOOLS=y

View File

@ -108,3 +108,4 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/yaml-cli/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/zerotier-one/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/logcat-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-pwm/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-libimp-control/Config.in"

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_INGENIC_LIBIMP_CONTROL
bool "libimp_control"
help
Library for on the fly adjustments to the IMP Library

View File

@ -0,0 +1,22 @@
################################################################################
#
# ingenic-libimp-control
#
################################################################################
INGENIC_LIBIMP_CONTROL_VERSION = master
INGENIC_LIBIMP_CONTROL_SITE = $(call github,gtxaspec,libimp_control,$(INGENIC_LIBIMP_CONTROL_VERSION))
INGENIC_LIBIMP_CONTROL_LICENSE = GPL-2.0
INGENIC_LIBIMP_CONTROL_LICENSE_FILES = COPYING
define INGENIC_LIBIMP_CONTROL_BUILD_CMDS
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) -C $(@D)
endef
define INGENIC_LIBIMP_CONTROL_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/libimp_control.so $(TARGET_DIR)/usr/lib
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/sbin $(INGENIC_LIBIMP_CONTROL_PKGDIR)/src/imp-control.sh
endef
$(eval $(generic-package))

View File

@ -0,0 +1,57 @@
#!/bin/sh
# This script provides a control interface for the libimp_control library.
# It sends commands to the server listening on localhost port 4000.
# Function to display the usage of the script
show_help() {
echo "Usage: imp-control.sh [command] [parameters]"
echo " Use without parameters to retrieve current values."
echo "Available commands:"
echo "Command Parameters Description"
echo "------- ---------- -----------"
echo "aihpf [on/off] High Pass Filter"
echo "aiagc [off/gainLevel compGaindB] Auto Gain Control"
echo "ains [off/0-3] Noise Suppression"
echo "aiaec [on/off] Echo Cancellation"
echo "aivol [-30-120] Audio Input Volume"
echo "aigain [0-31] Audio Input Gain"
echo "aialc [0-7] Audio Input ALC Gain"
echo "aovol [-30-120] Audio Output Volume"
echo "aogain [0-31] Audio Output Gain"
echo "contrast [0-255] Contrast"
echo "brightness [0-255] Brightness"
echo "saturation [0-255] Saturation"
echo "sharpness [0-255] Sharpness"
echo "sinter [0-255] Sinter Strength"
echo "temper [0-255] Temper Strength"
echo "aecomp [0-255] AE Compensation"
echo "aeitmax [value] AE Max parameters"
echo "backlightcomp [strength] Set Backlight Comp."
echo "dpc [0-255] DPC Strength"
echo "drc [0-255] DRC Strength"
echo "hilight [0-10] Highlight Intensity"
echo "again [value] Analog Gain"
echo "dgain [value] Digital Gain"
echo "hue [0-255] Hue"
echo "ispmode [0/1] ISP Mode (Day/Night)"
echo "flicker [0/1/2] Anti-Flicker"
echo "flip [normal/flip/mirror/flip_mirror] Image Flip"
echo "fps [fps_num] [fps_den] Set Sensor FPS"
echo "whitebalance [mode] [rgain] [bgain] Set White Balance"
echo "gamma Get Gamma Values"
echo "autozoom [ch] [scaler enable] [scale w] [scale h] [crop enable] [crop left] [crop top] [crop w] [crop h]"
echo " Set Auto Zoom"
echo "frontcrop [enable] [top] [left] [width] [height]"
echo " Set Front Crop"
echo "mask [ch] [enable] [top] [left] [width] [height] [green] [blue] [red]"
echo " Set Mask"
}
# Check for no arguments and display help
if [ "$#" -eq 0 ]; then
show_help
else
# Send the command and parameters to the server
echo "imp_control $*" | nc localhost 4000
fi