summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-03-01 22:35:16 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-15 13:46:15 +0300
commit9007d37939b971930252fd74b973b0d9c0c83eed (patch)
tree16016676154d5dae1b39a4b70dbaa20f86c2b09c /utils
parent695304c43f4e468eef24eb23920d148044dc15eb (diff)
utils: rkisp1: Fix sensor format parsing
With sensors supporting crop, the regexp used to parse the media-ctl output isn't correct as the pad configuration may span multiple lines and contain other parameters. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rkisp1/rkisp1-capture.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
index d5ebe5b1..eee6b802 100755
--- a/utils/rkisp1/rkisp1-capture.sh
+++ b/utils/rkisp1/rkisp1-capture.sh
@@ -51,7 +51,7 @@ get_sensor_format() {
local format
local sensor=$1
- format=$($mediactl --get-v4l2 "'$sensor':0" | sed 's/\[\([^ ]*\).*/\1/')
+ format=$($mediactl --get-v4l2 "'$sensor':0" | grep 'fmt:' | sed 's/.*\(fmt:\S*\).*/\1/')
sensor_mbus_code=$(echo $format | sed 's/fmt:\([A-Z0-9_]*\).*/\1/')
sensor_size=$(echo $format | sed 's/[^\/]*\/\([0-9x]*\).*/\1/')