ispsdk: Fix error sc2335 sensor config command on isp daemon.

Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
This commit is contained in:
Kevin.xie
2022-12-07 15:48:43 +08:00
parent d7540d4316
commit 540861f360
+7 -7
View File
@@ -2,7 +2,7 @@
ISP_CTRL_NAME=/root/ISP/stf_isp_ctrl ISP_CTRL_NAME=/root/ISP/stf_isp_ctrl
# Default sensor # Default sensor
SENSOR_CFG="imx219mipi -a 1" SENSOR_CFG="imx219mipi -j 0 -a 1"
USAGE="Usage: USAGE="Usage:
isp_ctrl_daemon.sh [start/stop] [imx219mipi/ov4689mipi/sc2235dvp] &" isp_ctrl_daemon.sh [start/stop] [imx219mipi/ov4689mipi/sc2235dvp] &"
@@ -20,15 +20,15 @@ fi
case "$2" in case "$2" in
imx219mipi) imx219mipi)
SENSOR_CFG="imx219mipi -a 1" SENSOR_CFG="imx219mipi -j 0 -a 1"
echo "Select sensor imx219" echo "Select sensor imx219"
;; ;;
ov4689mipi) ov4689mipi)
SENSOR_CFG="ov4689mipi -a 1" SENSOR_CFG="ov4689mipi -j 0 -a 1"
echo "Select sensor ov4689" echo "Select sensor ov4689"
;; ;;
sc2235dvp) sc2235dvp)
SENSOR_CFG="sc2235dvp -a 0" SENSOR_CFG="sc2235dvp -i 0 -a 0"
echo "Select sensor sc2235" echo "Select sensor sc2235"
;; ;;
*) *)
@@ -43,20 +43,20 @@ NUM=`ps aux | grep ${ISP_CTRL_NAME} | grep -v grep |wc -l`
# If there are less than 1 stf_isp_ctrl, start one. # If there are less than 1 stf_isp_ctrl, start one.
if [ "${NUM}" -lt "1" ];then if [ "${NUM}" -lt "1" ];then
${ISP_CTRL_NAME} -m ${SENSOR_CFG} -j 0 & ${ISP_CTRL_NAME} -m ${SENSOR_CFG} &
# If there are more than 1 stf_isp_ctrl, kill all of them and restart one. # If there are more than 1 stf_isp_ctrl, kill all of them and restart one.
elif [ "${NUM}" -gt "1" ];then elif [ "${NUM}" -gt "1" ];then
echo "more than 1 ${ISP_CTRL_NAME},killall & restart ${ISP_CTRL_NAME}" echo "more than 1 ${ISP_CTRL_NAME},killall & restart ${ISP_CTRL_NAME}"
killall -9 $ISP_CTRL_NAME killall -9 $ISP_CTRL_NAME
${ISP_CTRL_NAME} -m ${SENSOR_CFG} -j 0 & ${ISP_CTRL_NAME} -m ${SENSOR_CFG} &
fi fi
# Kill the zombie stf_isp_ctrl # Kill the zombie stf_isp_ctrl
NUM_STAT=`ps aux | grep ${ISP_CTRL_NAME} | grep T | grep -v grep | wc -l` NUM_STAT=`ps aux | grep ${ISP_CTRL_NAME} | grep T | grep -v grep | wc -l`
if [ "${NUM_STAT}" -gt "0" ];then if [ "${NUM_STAT}" -gt "0" ];then
killall -9 ${ISP_CTRL_NAME} killall -9 ${ISP_CTRL_NAME}
${ISP_CTRL_NAME} -m ${SENSOR_CFG} -j 0 & ${ISP_CTRL_NAME} -m ${SENSOR_CFG} &
fi fi
sleep 5; sleep 5;