- 27 9月, 2015 1 次提交
-
-
由 Robert Baldyga 提交于
Since ep->driver_data is not used for endpoint claiming, neither for enabled/disabled state storing, we can reduce number of places where we read or modify it's value, as now it has no particular meaning for function or framework logic. In case of f_uvc, ep->driver_data was used only for endpoint claiming and marking endpoints as enabled, so we can simplify code by reducing it. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 7月, 2015 1 次提交
-
-
由 Robert Baldyga 提交于
Use bind_deactivated flag instead of calling usb_function_deactivate() in function bind(). Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 03 4月, 2015 1 次提交
-
-
由 Hans Verkuil 提交于
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 03 3月, 2015 1 次提交
-
-
由 Hans Verkuil 提交于
Switch this driver over to the V4L2 core locking mechanism in preparation for switching to unlocked_ioctl. Suggested by Laurent Pinchart. This patch introduces a new mutex at the struct uvc_video level and drops the old mutex at the queue level. The new lock is now used for all ioctl locking and in the release file operation (the driver always has to take care of locking in file operations, the core only serializes ioctls). Note that the mmap and get_unmapped_area file operations no longer take a lock. Commit f035eb4e fixed a AB-BA deadlock by moving all the locking down into vb2, so the mmap and get_unmapped_area file operations should no longer do any locking before calling into vb2. Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 13 1月, 2015 3 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
Add support for using the uvc function as a component of USB gadgets composed with configfs. Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
If the caller of uvc_alloc() does not provide enough descriptors, binding the function should fail, so appropriate code is returned from uvc_copy_descriptors(). uvc_function_bind() is modified accordingly to account for possible errors from uvc_copy_descriptors(). Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
When configfs is integrated, CONFIGFS_ATTR_STRUCT and CONFIGFS_ATTR_OPS macros should be used, but the latter expects that tere is a to_f_uvc_opts function accepting a config_item, whereas the macro being changed can be applied to a different type of argument. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 21 10月, 2014 4 次提交
-
-
由 Felipe Balbi 提交于
when our ->disable() method is called, we must make sure to teardown all our resources, including endpoints. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
just like any other endpoint, we must enable/disable our video control endpoint based on calls to our ->set_alt() method. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
If our alternate setting has been selected, we must return that on a subsequent Get Interface request even if we're not streaming. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
If a set_alt() to the same alternate setting that's already selected is received, functions are required to reset the interface state, this means we must disable all endpoints and reenable them again. This is also documented on our kdoc for struct usb_function * @set_alt: (REQUIRED) Reconfigures altsettings; function drivers may * initialize usb_ep.driver data at this time (when it is used). * Note that setting an interface to its current altsetting resets * interface state, and that all interfaces have a disabled state. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 16 9月, 2014 2 次提交
-
-
由 Laurent Pinchart 提交于
The struct usb_endpoint_descriptor wMaxPacketSize field the struct usb_ss_ep_comp_descriptor wBytesPerInterval field are stored in little-endian format. Convert the values from CPU order to little endian before storing the values. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Fengguang Wu 提交于
The function isn't called from outside of its compilation unit, make it static. Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 09 9月, 2014 5 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
Attach strings to gadget with usb_strings_attach. It is required for correct instantiation of functions more than once: instead of modifying the local uvc_en_us_strings a function instance specific copy is created with usb_gstrings_attach. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no users of the old interface left. Remove it. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Use the new function registration interface. It is required in order to integrate configfs support. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Updated copyright years] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Compile uvc_queue, uvc_v4l2, uvc_video separately so that later they can be all combined in a separately compiled f_uvc. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Make uvc_v4l2_ioctl_ops non-static] [Rename __UVC__V4L2__H__ and __UVC__VIDEO__H__] [Update MAINTAINERS] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Prepare for separate compilation of uvc function's components. Some symbols will have to be exported, so rename to avoid conflicts with functions of the same name in host uvc. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Rename uvc_video_pump and uvc_queue_head as well] [Rename forgotten uvc_queue_cancel instance in a comment] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 08 9月, 2014 3 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
When configfs support is integrated the future uvc function module must not take any parameters. Move parameters to webcam. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Simplify ioctl handling by using video_ioctl2. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
To handle class requests received on ep0, the driver needs to access the length and direction of the request after the setup stage. It currently stores them in a v4l2 event during the setup stage, and then copies them from the event structure to the driver internal state structure when the event is dequeued. This two-steps approach isn't necessary. Simplify the driver by storing the needed information in the driver internal state structure directly during the setup stage. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 21 8月, 2014 1 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
If uvc->control_buf is successfuly allocated but uvc->control_req is not, uvc->control_buf is not freed in the error recovery path. With this patch applied uvc->control_buf is freed unconditionally; if it happens to be NULL kfree on it is safe anyway. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 17 7月, 2014 1 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the USB functions implementations into a separate directory. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 21 6月, 2013 1 次提交
-
-
由 Hans Verkuil 提交于
This driver did not yet support struct v4l2_device, so add it. This make it possible to replace the deprecated parent field with the v4l2_dev field, allowing the eventual removal of the parent field. Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 29 5月, 2013 1 次提交
-
-
由 Laurent Pinchart 提交于
The streaming endpoint bandwidth parameters are computed are runtime from module parameters. Remove the corresponding static initializers. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 18 3月, 2013 9 次提交
-
-
由 Bhupesh Sharma 提交于
This patch adds the support in UVC webcam gadget design for providing USB_GADGET_DELAYED_STATUS in response to a set_interface(alt setting 1) command issue by the Host. The current UVC webcam gadget design generates a STREAMON event corresponding to a set_interface(alt setting 1) command from the Host. This STREAMON event will eventually be routed to a real V4L2 device. To start video streaming, it may be required to perform some register writes to a camera sensor device over slow external busses like I2C or SPI. So, it makes sense to ensure that we delay the STATUS stage of the set_interface (alt setting 1) command. Otherwise, a lot of ISOC IN tokens sent by the Host will be replied to by zero-length packets by the webcam device. On certain Hosts this may even lead to ISOC URBs been cancelled from the Host side. So, as soon as we finish doing all the "streaming" related stuff on the real V4L2 device, we call a STREAMON ioctl on the UVC side and from here we call the 'usb_composite_setup_continue' function to complete the status stage of the set_interface(alt setting 1) command. Further, we need to ensure that we queue no video buffers on the UVC webcam gadget, until we de-queue a video buffer from the V4L2 device. So, the application should call the STREAMON on UVC side only when it has dequeued sufficient buffers from the V4L2 side and queued them to the UVC gadget. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Bhupesh Sharma 提交于
As per the UVC compliance test suite's assertion 6.1.25, the `iFunction` field of the Interface Association Descriptor (IAD) should the match the `iInterface` field of the standard Video Control (VC) Interface Descriptor for this Video Interface Collection (VIC). This mandatory case is captured in section 3.11 of the USB Video Class Compliance specification revision 1.1 This patch fixes this test assertion's failure and has been tested on Linux FC16, WinXP, WIN7 and WIN8 High speed and Super Speed hosts for successful enumeration. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> [Merged the association and control string descriptors] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Bhupesh Sharma 提交于
As per UVC compliance test specification's assertion number 6.3.90 related to 'Standard VS Isochronous Video Data Endpoint Descriptor Assertions', the bits D3..2 of 'bmAttributes' field of Standard VS Isochronous Video Data Endpoint Descriptor should be 01 (binary) to indicate that the synchronization type is ASYNCHRONOUS. This mandatory requirement has been captured in section 3.10.1.1 of the UVC Video Class Specification version 1.1 This patch adds a fix for the same. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Call the appropriate usb_ep_autoconf*() function depending on the device speed, and pass it the corresponding streaming endpoint. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Compute the multiplier from the maximum packet size based on the speed. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
The descriptors are identical, there's no need to have several copies of them. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Let's keep the code consistent, people might want to read it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Descriptive names make the code more readable. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
The comment that describes string descriptors allocation isn't clear, fix it. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 07 2月, 2013 1 次提交
-
-
由 Chen Gang 提交于
for NUL terminated string, better notice '\0' in the end. Signed-off-by: NChen Gang <gang.chen@asianux.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 31 10月, 2012 3 次提交
-
-
Instead of calling usb_string_id() multiple times I replace it with one usb_string_ids_tab(). The NULL pointer in struct usb_string with "" and are not overwritten in fail or unbind case. The conditional assignment remains because some gadgets recycle the string ID because the same descriptor (and string ID) is used if we have more than one config descriptor. Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
HS and SS descriptors are staticaly created. They are updated during the bind process with the endpoint address, string id or interface numbers. After that, the descriptor chain is linked to struct usb_function which is used by composite in order to serve the GET_DESCRIPTOR requests, number of available configs and so on. There is no need to assign the HS descriptor only if the UDC supports HS speed because composite won't report those to the host if HS support has not been reached. The same reasoning is valid for SS. This patch makes sure each function updates HS/SS descriptors unconditionally and uses the newly introduced helper function to create a copy the descriptors for the speed which is supported by the UDC. While at that, also rename f->descriptors to f->fs_descriptors in order to make it more explicit what that means. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
The "video->minor = -1" assigment is done in V4L2 by video_register_device() so it is removed here. Now. uvc_function_bind() calls in error case uvc_function_unbind() for cleanup. The problem is that uvc_function_unbind() frees the uvc struct and uvc_bind_config() does as well in error case of usb_add_function(). Removing kfree() in usb_add_function() would make the patch smaller but it would look odd because the new allocated memory is not cleaned up. However it is not guaranteed that if we call usb_add_function() we also get to the bind function. Therefore the patch extracts the conditional cleanup from uvc_function_unbind() applies to uvc_function_bind(). uvc_function_unbind() now contains only the complete cleanup which is required once everything has been registrated. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Bhupesh Sharma <bhupesh.sharma@st.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 04 6月, 2012 2 次提交
-
-
由 Bhupesh Sharma 提交于
This patch adds super-speed support to UVC webcam gadget. Also in this patch: - We add the configurability to pass bInterval, bMaxBurst, mult factors for video streaming endpoint (ISOC IN) through module parameters. - We use config_ep_by_speed helper routine to configure video streaming endpoint. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Bhupesh Sharma 提交于
This patch adds a MACRO for the UVC video control status (interrupt) endpoint and removes the magic number which was being used earlier. Some UDCs have issues supporting an interrupt IN endpoint having a max packet size less than a particular value (say 32). It is easier in that case to simply change the MACRO value instead of changing the max packet size value at a number of locations. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-