Message ID | 20170616073915.5027-5-gustavo@padovan.org (mailing list archive) |
---|---|
State | New |
Delegated to: | Laurent Pinchart |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1dLlr4-0005mw-7E; Fri, 16 Jun 2017 07:39:42 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.89/mailfrontend-8) with esmtp id 1dLlr2-0004vQ-ks; Fri, 16 Jun 2017 09:39:42 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752761AbdFPHjh (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Fri, 16 Jun 2017 03:39:37 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33402 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbdFPHje (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 16 Jun 2017 03:39:34 -0400 Received: by mail-pg0-f65.google.com with SMTP id a70so4544944pge.0 for <linux-media@vger.kernel.org>; Fri, 16 Jun 2017 00:39:34 -0700 (PDT) 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; bh=uigofcy0rBrx0NPTJu9vNkmxlPiq1yVIpWE+8eMXksQ=; b=O+emIap5dmsOm22rXFw2/Fq6nRrkZc7+bsrnVhatdEH2JJU6Vr1xSRItPPsxny4E0p sufdHyw+2oefY0pVyInnz6MVtEXVT88Kr8tS7CrN91GUVYvGPtXztOn5NKhu76xou/s/ xjPtz5qWhTnHvr2eXVkb0B2pG4ZMzIWxmYDkLJL18pRrbut8p3YVBbajnby9bllW5bLj /tuT/mXc3ifbL5nQI5zs+R1m2GpBt9Zhi90TVhT1dNrxLXZYogva6Y9JOX6aFsQUgrJ1 8ZO3csrzhAhIjQ1XL/AoaJMWsP9igEdSP9sffvIeYfv55PrPo/sFFMeQsc+oI4FK6zlp 9EgA== X-Gm-Message-State: AKS2vOxWI4goWdnjcL3KCAgQmPLB264eUdybPncGKmTN2n7tBRW4Tc1c zN58YqSqOJKbfI9+le0= X-Received: by 10.98.93.154 with SMTP id n26mr9380487pfj.82.1497598774136; Fri, 16 Jun 2017 00:39:34 -0700 (PDT) Received: from jade.nodan1.kt.home.ne.jp (202-72-64-244.koalanet.ne.jp. [202.72.64.244]) by smtp.gmail.com with ESMTPSA id a2sm2760568pfj.8.2017.06.16.00.39.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2017 00:39:33 -0700 (PDT) From: Gustavo Padovan <gustavo@padovan.org> To: linux-media@vger.kernel.org Cc: Hans Verkuil <hverkuil@xs4all.nl>, Javier Martinez Canillas <javier@osg.samsung.com>, Mauro Carvalho Chehab <mchehab@osg.samsung.com>, Shuah Khan <shuahkh@osg.samsung.com>, Gustavo Padovan <gustavo.padovan@collabora.com> Subject: [PATCH 04/12] [media] uvc: enable subscriptions to other events Date: Fri, 16 Jun 2017 16:39:07 +0900 Message-Id: <20170616073915.5027-5-gustavo@padovan.org> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170616073915.5027-1-gustavo@padovan.org> References: <20170616073915.5027-1-gustavo@padovan.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.6.16.73017 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_700_799 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Gustavo F. Padovan
June 16, 2017, 7:39 a.m. UTC
From: Gustavo Padovan <gustavo.padovan@collabora.com> Call v4l2_ctrl_subscribe_event to subscribe to more events supported by v4l. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> --- drivers/media/usb/uvc/uvc_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > From: Gustavo Padovan <gustavo.padovan@collabora.com> > > Call v4l2_ctrl_subscribe_event to subscribe to more events supported by > v4l. > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> > --- > drivers/media/usb/uvc/uvc_v4l2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c > index 3e7e283..dfa0ccd 100644 > --- a/drivers/media/usb/uvc/uvc_v4l2.c > +++ b/drivers/media/usb/uvc/uvc_v4l2.c > @@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh, > case V4L2_EVENT_CTRL: > return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops); > default: > - return -EINVAL; > + return v4l2_ctrl_subscribe_event(fh, sub); This looks incorrect. With this change driver will be subscribing to all v4l2 events? Is this the intent? > } > } > > thanks, -- Shuah
2017-07-07 Shuah Khan <shuahkh@osg.samsung.com>: > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.padovan@collabora.com> > > > > Call v4l2_ctrl_subscribe_event to subscribe to more events supported by > > v4l. > > > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> > > --- > > drivers/media/usb/uvc/uvc_v4l2.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c > > index 3e7e283..dfa0ccd 100644 > > --- a/drivers/media/usb/uvc/uvc_v4l2.c > > +++ b/drivers/media/usb/uvc/uvc_v4l2.c > > @@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh, > > case V4L2_EVENT_CTRL: > > return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops); > > default: > > - return -EINVAL; > > + return v4l2_ctrl_subscribe_event(fh, sub); > > This looks incorrect. With this change driver will be subscribing to all > v4l2 events? Is this the intent? The intent was to enable this driver to subscribe to BUF_QUEUED events. It is the only one who can't at the moment. I'll review this. Gustavo
2017-07-10 Gustavo Padovan <gustavo@padovan.org>: > 2017-07-07 Shuah Khan <shuahkh@osg.samsung.com>: > > > On 06/16/2017 01:39 AM, Gustavo Padovan wrote: > > > From: Gustavo Padovan <gustavo.padovan@collabora.com> > > > > > > Call v4l2_ctrl_subscribe_event to subscribe to more events supported by > > > v4l. > > > > > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> > > > --- > > > drivers/media/usb/uvc/uvc_v4l2.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c > > > index 3e7e283..dfa0ccd 100644 > > > --- a/drivers/media/usb/uvc/uvc_v4l2.c > > > +++ b/drivers/media/usb/uvc/uvc_v4l2.c > > > @@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh, > > > case V4L2_EVENT_CTRL: > > > return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops); > > > default: > > > - return -EINVAL; > > > + return v4l2_ctrl_subscribe_event(fh, sub); > > > > This looks incorrect. With this change driver will be subscribing to all > > v4l2 events? Is this the intent? > > The intent was to enable this driver to subscribe to BUF_QUEUED events. > It is the only one who can't at the moment. I'll review this. This change do not enable all events, the only new event added is the BUF_QUEUED. v4l2_ctrl_subscribe_event() only add V4L2_EVENT_CTRL and V4L2_EVENT_BUF_QUEUED, but the V4L2_EVENT_CTRL case can't be accessed tere is this situation. Gustavo
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 3e7e283..dfa0ccd 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c @@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh, case V4L2_EVENT_CTRL: return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops); default: - return -EINVAL; + return v4l2_ctrl_subscribe_event(fh, sub); } }