From 7f009dde4b120d34173a77aa865b588d8c36575e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 27 May 2016 15:58:16 +0300 Subject: vsp-lib: Add set control support Signed-off-by: Laurent Pinchart --- scripts/vsp-lib.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index f6fd342..c587d5e 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -68,6 +68,18 @@ vsp1_has_control() { $yavta --no-query -l $subdev | grep -q -- "$control_name" } +vsp1_set_control() { + entity=$1 + control_name=$(echo $2 | tr '+' ' ') + value=$3 + + subdev=$(vsp1_entity_subdev $entity) + control=$($yavta --no-query -l $subdev | grep -- "$control_name" | cut -d ' ' -f 2) + + echo "Setting control $control_name ($control) to $value" | ./logger.sh "$entity" >> $logfile + $yavta --no-query -w "$control $value" $subdev | ./logger.sh "$entity" >> $logfile +} + # ----------------------------------------------------------------------------- # Referance frame generation # -- cgit v1.2.3