From patchwork Mon Jun 20 21:06:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 16295 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 76D2DBD808 for ; Mon, 20 Jun 2022 21:07:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 16D3F65642; Mon, 20 Jun 2022 23:07:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1655759243; bh=D1OMN0SUrV0qHqWFe357kEXLc2M9F/1Q5I2WDT7fLgE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=PkMYKPMWHVfUH4V/nn0wE4ilrrwTtRzO2Wa8Cp9P6TAOTtjtqc+Go7FG1x6y7P5G4 RGMBQbZ7YnqB582muI2B+oxOS2ZWDXlZ+qgd6yX4n5fhfyA65+rf3Hcua282NX7d/0 HDcbN5Ln7LhHCTypVcKo6m6tihmdSdCgGB3C7zFKvED1B7W+wAK/Tv8qoVxpQiJBSH IB+o7/yHQTVWuW32kvp/v0LfAAwWhnmu1Rgyhx1FVH+Lk4BDuhRyDNXIjMW/wBduFW FZfGxCuefte4biSKa62oC+rHVmqHz0u7HZu/jJKw3XftXsqQsn22uyfyMYaYDAYh8s WltFbUs3ff5iQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2CD4A65632 for ; Mon, 20 Jun 2022 23:07:18 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="pNpaWLte"; dkim-atps=neutral Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C4F3DE5 for ; Mon, 20 Jun 2022 23:07:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1655759237; bh=D1OMN0SUrV0qHqWFe357kEXLc2M9F/1Q5I2WDT7fLgE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pNpaWLteuBDyGXRvT1YJ2PSGx3dpjFXcMKL/v0eNPTWqchwgTFT/dPzaDcsLQkauh SPNn6XixOGE6EFOxeVGFyyilUDn2L/JYNlLh7Iu49qD1T7wQ+EWJtAsPDlzzfYy3WU lV7yy9InJ6bu7tkPAkojXEhPYe4VkoV91swB5iTI= To: libcamera-devel@lists.libcamera.org Date: Tue, 21 Jun 2022 00:06:56 +0300 Message-Id: <20220620210658.20288-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220620210658.20288-1-laurent.pinchart@ideasonboard.com> References: <20220620210658.20288-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] utils: rkisp1: Fix sensor format parsing X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Paul Elder --- utils/rkisp1/rkisp1-capture.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh index d5ebe5b1d1ba..eee6b8027261 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/')