Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1576921pxf; Fri, 19 Mar 2021 10:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfUFv8jT6qgHIC/q7mflyNMM3e4NB9Ghpo3a59D5WDRdaLCgY5h4/u2Kq7H+/Pktib615Y X-Received: by 2002:a17:906:3750:: with SMTP id e16mr5516396ejc.75.1616173873299; Fri, 19 Mar 2021 10:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616173873; cv=none; d=google.com; s=arc-20160816; b=mOlpWgW+gDnj9P52YsUdOwOiXQAoVYtCvfvGDXDkG9HLafJgZYlq+azD604npWm1MW Q8yz/U6aF+MvfgwI1YRVdyCUSIKIG07gyRG5p2ffCl3CvitdzwTkrz4MRBTLRgsaPfrJ 1pMId5+tphDNSrYaGsjfdoCG34YQ/zpLQxhbrkvRfcTGL6FYV3Z6kxQ9aVg8L/DXX9n+ j30mFNm8f7H0dCPcYARqdKAa/fFJ3MzgCNtraLTt6BI727ZaQHo2PkowFR+tj/soGo30 K4mkMLLGSSU/iXJlF6Ed4oQnFMAoLtL0Tv68x2g1ZG7OZPlZK0nXXDWkI3LW3J9fHc7W RJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u3RrB5yMnIIEoq7jfEuwhsCMgc7+RIV/M4RImdGKBho=; b=f2ARwZyb36XAlrKV6MGROzMXFh/Z39vSXKB5nDii7LrHNu2FSDGYkD1uQGaepj5elu yYAYKlUdvMERHIbdPZi3Ac1kYLXUI6l9SB0AdGsWC5fWfwx/OvImVInkwLbIcZJeZr5F vJh6ZsjkYA4EepTtT0NvWpX0QNtODjPFz+PxpwnSNECtHQRepwX8kanl3mW0+XPBErZH qDHODMEHU6L3d1n4eVrvIg7Iiznj0bzgX81I2FFwYO09tMWgQfft4q1Fe64lhi8aOjXk tlcI/FQJKRXX20RY42NZbPwf7qVIn9lcQqXxfsYPv5+KM7eERyxuZngp2vFQPAl2aSF9 KuNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="AWRzBKY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm15si4923726ejc.270.2021.03.19.10.10.48; Fri, 19 Mar 2021 10:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="AWRzBKY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230386AbhCSRJu (ORCPT + 99 others); Fri, 19 Mar 2021 13:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbhCSRJP (ORCPT ); Fri, 19 Mar 2021 13:09:15 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6EB7C06175F for ; Fri, 19 Mar 2021 10:09:14 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id z1so11648810edb.8 for ; Fri, 19 Mar 2021 10:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u3RrB5yMnIIEoq7jfEuwhsCMgc7+RIV/M4RImdGKBho=; b=AWRzBKY/3/+eP8Kjx6xHDUHbGFRl3vOeS1RngRF1sONcUk0MLKC+thk84sGxkP9tV4 u2KB/wYgLo01ATifLj4Kpl+zaCjIkjBYLk6AdesyD3Uf1DAhpb28841Sfe4wVHYx/qcJ yCrcdh+5WRg2tp4F9vH2P8PJAHpORtVBkorc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u3RrB5yMnIIEoq7jfEuwhsCMgc7+RIV/M4RImdGKBho=; b=Vq9mF1kE4KBAwoI+3fJA3FMUGicd4HzILKub2hK8HqLwKi++O5YOg+JJNLUwkcMdL9 DclsJXmGfJ0V0MT4B5VDvRey63byO62gjP09nPogZO6AdMIO4g5KU+Dqr/MgbZvc2vQJ 8v7aR95XhBpnmbnDfkti/df1zaKu7XQCF5S+yy7W3AY8/GcKBxC/bHeHuNjSUgbaLw5p 3GN0+S3FOEY+rK4ZNBJGj4+Qf0Xg80YS3m5FOQMy2mt0w63/xtj8boc4/LLcgQ4KcdOc wbwgL91tRNcEI+sFpmxu/tZpPr3dCsFT5s0Fh8HwQQgjdSO17LyQOFHCVZuwhlO71IF4 Ds8Q== X-Gm-Message-State: AOAM532tRjnKgXN/YWrqf6DIkwbJrMVn8bdDMUtPylvcK1RNJrryNxzF UEnY704hpEqfobYUDQ2XS/4U3d5yovEfzaQaKVk= X-Received: by 2002:a05:6402:22f6:: with SMTP id dn22mr10544010edb.214.1616173753540; Fri, 19 Mar 2021 10:09:13 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id be27sm4506050edb.47.2021.03.19.10.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 10:09:13 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v8 06/19] media: uvcvideo: Set capability in s_param Date: Fri, 19 Mar 2021 18:08:53 +0100 Message-Id: <20210319170906.278238-7-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210319170906.278238-1-ribalda@chromium.org> References: <20210319170906.278238-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes v4l2-compliance: Format ioctls (Input 0): warn: v4l2-test-formats.cpp(1339): S_PARM is supported but doesn't report V4L2_CAP_TIMEPERFRAME fail: v4l2-test-formats.cpp(1241): node->has_frmintervals && !cap->capability Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_v4l2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index ac98869d5a05..1eeeb00280e4 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -472,10 +472,13 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream, uvc_simplify_fraction(&timeperframe.numerator, &timeperframe.denominator, 8, 333); - if (parm->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) + if (parm->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { parm->parm.capture.timeperframe = timeperframe; - else + parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; + } else { parm->parm.output.timeperframe = timeperframe; + parm->parm.output.capability = V4L2_CAP_TIMEPERFRAME; + } return 0; } -- 2.31.0.rc2.261.g7f71774620-goog