[{"id":23910,"web_url":"https://patchwork.libcamera.org/comment/23910/","msgid":"<20220715073100.GB3411283@pyrite.rasen.tech>","date":"2022-07-15T07:31:00","subject":"Re: [libcamera-devel] [PATCH 2/4] utils: rkisp1: Fix sensor format\n\tparsing","submitter":{"id":97,"url":"https://patchwork.libcamera.org/api/people/97/","name":"Nicolas Dufresne via libcamera-devel","email":"libcamera-devel@lists.libcamera.org"},"content":"Hi Laurent,\n\nOn Tue, Jun 21, 2022 at 12:06:56AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> With sensors supporting crop, the regexp used to parse the media-ctl\n> output isn't correct as the pad configuration may span multiple lines\n> and contain other parameters. Fix it.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  utils/rkisp1/rkisp1-capture.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh\n> index d5ebe5b1d1ba..eee6b8027261 100755\n> --- a/utils/rkisp1/rkisp1-capture.sh\n> +++ b/utils/rkisp1/rkisp1-capture.sh\n> @@ -51,7 +51,7 @@ get_sensor_format() {\n>  \tlocal format\n>  \tlocal sensor=$1\n>  \n> -\tformat=$($mediactl --get-v4l2 \"'$sensor':0\" | sed 's/\\[\\([^ ]*\\).*/\\1/')\n> +\tformat=$($mediactl --get-v4l2 \"'$sensor':0\" | grep 'fmt:' | sed 's/.*\\(fmt:\\S*\\).*/\\1/')\n>  \tsensor_mbus_code=$(echo $format | sed 's/fmt:\\([A-Z0-9_]*\\).*/\\1/')\n>  \tsensor_size=$(echo $format | sed 's/[^\\/]*\\/\\([0-9x]*\\).*/\\1/')\n>  \n> --","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EB58EBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Jul 2022 07:31:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 38E3E63312;\n\tFri, 15 Jul 2022 09:31:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D34A06330B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Jul 2022 09:31:08 +0200 (CEST)","from pyrite.rasen.tech (softbank036240121080.bbtec.net\n\t[36.240.121.80])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 521FF993;\n\tFri, 15 Jul 2022 09:31:07 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657870271;\n\tbh=cfTeNe6W4L/xHfYPZy4px+GxsNkAA0512wwAUpk8F1c=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=j7aJzWA9gqRNdPWjNKB1nrh/UL0cTZeT/1uggRSbRaZtw+yjxNdRmCGPU4G338h6d\n\t1f5SEAAJZGO5SIp1fnNZackDL03Yj3wBMds202EelTcM5Qh3T+A98DdcovAM9eHqTU\n\tG2aE6FPBcGnb/+MyjK9ztenkqECT7ZI0PwAO1YfJZqQM+MgktkVaC7huemZabMO55b\n\twZxZh4JzOP7DdFNaZfv9aDCtvlGzNbZIdBn5Q0vJnUCfOZSIJVicPio+aXf6J0ycGt\n\t2xlv9OSakx9qkieUIQBRTmvtd3gHJnl+Unit9IJO2P43dhocAqEV6wHwVayfSAjQsk\n\tEp+bz9QCrAP7A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657870268;\n\tbh=cfTeNe6W4L/xHfYPZy4px+GxsNkAA0512wwAUpk8F1c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=s3++y7XeGMdoqe2Mc/R+b/UinJevhSOw78BvvtGpr81GKCt2Pe4IthMvpPqslo8WQ\n\tIlmVTcVNo/eV5cGnXAuqAN5QQDdJKMJzF0V8KITG/ZVTvgQeKYy4HiP1HCed6sbInd\n\tegYFKOWlKw/RXbAY5hxbxLw5KLaFIwBgrD4beKjY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"s3++y7Xe\"; dkim-atps=neutral","Date":"Fri, 15 Jul 2022 16:31:00 +0900","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220715073100.GB3411283@pyrite.rasen.tech>","References":"<20220620210658.20288-1-laurent.pinchart@ideasonboard.com>\n\t<20220620210658.20288-3-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220620210658.20288-3-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/4] utils: rkisp1: Fix sensor format\n\tparsing","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"paul.elder@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]