Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4464535pxf; Tue, 16 Mar 2021 14:20:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2nJ2FgktRy9z4Xtccgh6LLd5PnG1LeExndTug2GdF8rodW5Zr6NxxgYEskZo+SZe6BXUB X-Received: by 2002:a50:9ea4:: with SMTP id a33mr39328238edf.295.1615929611323; Tue, 16 Mar 2021 14:20:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615929611; cv=none; d=google.com; s=arc-20160816; b=jeU4QKGMluLHE+TbUGJe2M+8SJUzbhSWcaGNQG7vEBXhJvwLEwHx9ui4hpGzTitUkB RoeYSY7W+rqebsqvaCZ5ssGRzBWNv2sGjeRwe/kfiif/3vuQPRDJuJbXpJ5W7vfWgzH7 Ik5RwakGlfBkR+2nl2i3Hpt3oxmXZ9eAjWSTkH1QzWNw0FgH96q3UP0EReNM+SCjGlPW dLaFHDQ1Cul1HO5+xbdH3dYD37Sgk1IIKYUadh3vXLQ8/Gp/nReQuk9jVdVC0fEZCBuS vkDRlAaxO0wwDp5f/Gm//WEigFjQCrge5hV6Xe+r3kO1biBlkh4AWtugtnFsosHTd4G+ CAMQ== 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=kGLUxRHfm3EIlGd4N+uEn8OSkXWMynAv8QMKM8OCTEg=; b=znGkPwSdyajXDQRiIvansGcNos0nBRM2wp9r6JF2NUhFzOVMlajZohGJSx0tbCGlZ0 UZLJq7q3kjODewX41J1BTu5pnasiKrzfF6jDGwV96VTO4dF9ejqGJn4m5H4QYCsp/jlJ sEKnwG3Sirt1ns7h5zUzOUh0Zzjp7uvP9A1MQdd3Soex/Ax6NbMj6eFlj7Mm1Mc25TKm 1CpiMwuZLiKandzG1qWFoumTW4WRerSS8LM/m1CCKkAvVAYTrqECae6gaGNgSV2ZQTed iiC+suF5LDKHn+7dITH3OVy/Cow0PgNMrUFqZGvHVZVft+omPFpisKADdZyM6guP49fZ 2iKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=M+POaY5F; 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 bh18si227888ejb.405.2021.03.16.14.19.47; Tue, 16 Mar 2021 14:20:11 -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=M+POaY5F; 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 S239654AbhCPSBZ (ORCPT + 99 others); Tue, 16 Mar 2021 14:01:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239559AbhCPSAL (ORCPT ); Tue, 16 Mar 2021 14:00:11 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B0FBC061762 for ; Tue, 16 Mar 2021 11:00:10 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id j3so22646165edp.11 for ; Tue, 16 Mar 2021 11:00:10 -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=kGLUxRHfm3EIlGd4N+uEn8OSkXWMynAv8QMKM8OCTEg=; b=M+POaY5FwP9J4KG2/OWuUSHxopjUm0FEPSyT8boQDBOihvBQ8xLwG2tZK8Xc9vVv/N Sws6/WWU2Qe+ON2YXE4CCZcV+7FrNOe12TATdZAodv04JYVr3pwOP4oknC1ls8/459go 2FIdTLrHvhBdFSTCqXhGGXDFQw0Uq7KftpjZE= 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=kGLUxRHfm3EIlGd4N+uEn8OSkXWMynAv8QMKM8OCTEg=; b=TlG9hgROaAX9gaPvUyLCk1CvOVmh4WYeKybmG1XJLAJK1ZkW/VsuKw/8rwKAdi08XW J6i4itdGX9bHmOqe/KR6zTa3V8bc4/bjKNHt8lm2fSnyUm+A37nYG/RN4Ldr+BldHsB6 p4eKk9mE7TFmj9Ia5gGp/TQPeuF2Rz+RtviUe21eEN11JmNuhEDV3c5iGXOGMxUTyqa3 D9aFCdQ09UTdQzmORvGbp8HKQE47SRLQpl34bYUeIN1juMqazmuJjMB8rQlV/nLztWzx yKmVfE/FbbJKWXb0+6lybZHROtzpZiZpGdryWXIhCMdINcSuDbcpxqsG3lUmO6LJhsSg K5Dw== X-Gm-Message-State: AOAM531ZZMW+l6RoRkEJG7R309vsfLwqc3HyYPt3Bs4TMOKdFw1sN6ro RmKwZeN2zl8Wi5ZyuuBVsqznFQ== X-Received: by 2002:a05:6402:32a:: with SMTP id q10mr36976737edw.15.1615917609155; Tue, 16 Mar 2021 11:00:09 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id c19sm10953182edu.20.2021.03.16.11.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 11:00:08 -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 v5 02/13] media: uvcvideo: Set capability in s_param Date: Tue, 16 Mar 2021 18:59:52 +0100 Message-Id: <20210316180004.1605727-3-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210316180004.1605727-1-ribalda@chromium.org> References: <20210316180004.1605727-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 252136cc885c..157310c0ca87 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