- 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 3 次提交
-
-
由 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>
-
由 Bhupesh Sharma 提交于
usb: gadget: uvc: Fix string descriptor STALL issue when multiple uvc functions are added to a configuration This patch solved the string descriptor STALL issue when we add multiple UVC functions in a single configuration using a 'webcam.c' like composite driver. Signed-off-by: NBhupesh Sharma <bhupesh.sharma@st.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 10 9月, 2011 1 次提交
-
-
由 Klaus Schwarzkopf 提交于
remove the following two paragraphs as they are not needed: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 02 7月, 2011 1 次提交
-
-
由 Jassi Brar 提交于
The config bind was reported success even if usb_add_function failed. Fix the return value. Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org> Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 29 6月, 2011 1 次提交
-
-
由 Tatyana Brokhman 提交于
Change usb_ep_enable() prototype to use endpoint descriptor from usb_ep. This optimization spares the FDs from saving the endpoint chosen descriptor. This optimization is not full though. To fully exploit this change, one needs to update all the UDCs as well since in the current implementation each of them saves the endpoint descriptor in it's internal (and extended) endpoint structure. Signed-off-by: NTatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 03 8月, 2010 1 次提交
-
-
由 Laurent Pinchart 提交于
The UVC host and gadget drivers both define constants and structures in private header files. Move all those definitions to linux/usb/video.h where they can be shared by the two drivers (and be available for userspace applications). Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 12 7月, 2010 1 次提交
-
-
由 Laurent Pinchart 提交于
The UVC gadget driver borrowed code from the UVC host driver without changing the symbol names. This results in a namespace clash with multiple definitions of several symbols when compiling both drivers in the kernel. Make all generic UVC functions and variables static in the UVC gadget driver, as the symbols are not referenced outside of the gadget driver. Rename the uvc_trace_param global variable to uvc_gadget_trace_param. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
- 21 5月, 2010 1 次提交
-
-
由 Laurent Pinchart 提交于
This USB video class function driver implements a video capture device from the host's point of view. It creates a V4L2 output device on the gadget's side to transfer data from a userspace application over USB. The UVC-specific descriptors are passed by the gadget driver to the UVC function driver, making them completely configurable without any modification to the function's driver code. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-