Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp866714pxf; Thu, 18 Mar 2021 13:31:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV/rPXvbYyDsH3/FtgSRmRiUszUB/vxD+jXFEglj0AJcueWZI42EUn7YQUM8kSYaeoF5Sx X-Received: by 2002:a17:906:130c:: with SMTP id w12mr401366ejb.253.1616099489636; Thu, 18 Mar 2021 13:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616099489; cv=none; d=google.com; s=arc-20160816; b=pLD1Q3nE9fcBbn+E7IDhs1pkyIuUqJCqy+qF9cdrvKgED+oyHYpiFj7Lrx2X12HnU3 yP3w7y09QRFs3d6JLKUZj9kukxlFZTM0kiCBmrQnfo5hmy9kQo12i+gfaBGLz21Xtozn 2pOPzct3LE6jvQ2CovIIfaOM58MPlSgoESkvpOuI2Zb1rWYrvarKx10ijKLTej6R2Mma GDn96IKDUSdWDghsJlecg+EYkdmWTDEfx7cl5NG6AHcgOhPyqJv6eLR7g6HadtJsoI7K R9fwi/NPaEOq2xMqSTSV8N682tCEobODV1ZrO9HQmxl+v9wD+8xww9LxZMKfZ8zo8OMb pQMQ== 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=FSJfEMpG3gmvu/1zHkC5YrHmNIBqGbW9b1IfyrEOzZs=; b=AVwOR8H53LYycSTeU8DoO4QF5NEYqQUgmVc7PTxxKm0bFv3VTY8FM3JwUAgG1OUPGT UZu7p2rUYp9xSWRxTiwL6wSTJM43B7k/P65j2XMYo5SssdMD/Ai2rLd4VQ49T9V1VITR P0Jf51ylMTelTiWem+NJ98jNNbRnyFV6I6fGXXYcZe1DseXX1B15RUNSWLaGscpDLym9 /T5zvRbPq/UNz3wCmR8RBy/CAlrgRgHVMQGoqp+ecGhrn7jE+1NXFnFtiM2Ynm9Xjs9A yjiZSdQ/7/AGhFRJ5a6PldSsiU1fYIfx+10NtPxn+2Mz6x+U0+sBZjGpS6JbUvOczREa 82Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Rp4sh8Sv; 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 q16si2573569edr.239.2021.03.18.13.31.07; Thu, 18 Mar 2021 13:31:29 -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=Rp4sh8Sv; 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 S233163AbhCRU3n (ORCPT + 99 others); Thu, 18 Mar 2021 16:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233077AbhCRU3e (ORCPT ); Thu, 18 Mar 2021 16:29:34 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9044C06175F for ; Thu, 18 Mar 2021 13:29:33 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id y6so8318839eds.1 for ; Thu, 18 Mar 2021 13:29:33 -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=FSJfEMpG3gmvu/1zHkC5YrHmNIBqGbW9b1IfyrEOzZs=; b=Rp4sh8SvTreezYaiDbX6nqPkn8WyaoqSz0zaebel9/imOxNHSoL9bthZuVHoVCkf71 7QJKS3y6fYrxXmTMdwt8qb3fklRMDFlaHtMM3LTvIvmf8e+PzAjM7I2eql6+jZHGOesl vXlLQILAdwRyPAWp2JQObCuexRmNK1owoaOAw= 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=FSJfEMpG3gmvu/1zHkC5YrHmNIBqGbW9b1IfyrEOzZs=; b=fqhUDWpjL5UCBZlAs1/oxVgTVZGfW+zJNwTeFn73ieOyZdmeVkgg4+cZW6dQFE1te8 9wChSjdyyQ9WYmnemNlMK3b18633pvYbVQhv1C+shQhKqivEWbwn930HHeJNhsaVapOv TRdkiNho5Ja7+PuatZTalcACdtCqiBZ0u+Jz80zAJqvc9ATwJ0g0F0POKFfiaSQny9j8 iWyiq7c3OBuz5LwmRELxXvzTyyzGqk3MymimRSlzEKvONx6aIzPtRsKKBUaAmee0R0Hz 2OpF0YN6LWfMBJLXLigX48xC52ubZy8fbpqaoRzd0vhCxmPsEe2rfJNFOBK5qX5yFjQY ZByw== X-Gm-Message-State: AOAM5307rRjnkKWco3L2BrlnxyxPsG+sQsa7/tEqKKy3e7Dh8QSbtuG8 RvwTAQZxNCRM8b6er9bz3YV88Q== X-Received: by 2002:a50:fe81:: with SMTP id d1mr6013551edt.308.1616099372499; Thu, 18 Mar 2021 13:29:32 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id a22sm2533767ejr.89.2021.03.18.13.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 13:29:32 -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 v7 04/17] media: uvcvideo: Set capability in s_param Date: Thu, 18 Mar 2021 21:29:15 +0100 Message-Id: <20210318202928.166955-5-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210318202928.166955-1-ribalda@chromium.org> References: <20210318202928.166955-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 47b0e3224205..397217171bbb 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