Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
f_uvc.c File Reference
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/usb/video.h>
#include <linux/vmalloc.h>
#include <linux/wait.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-event.h>
#include "uvc.h"

Go to the source code of this file.

Macros

#define UVC_STRING_ASSOCIATION_IDX   0
 
#define UVC_STRING_CONTROL_IDX   1
 
#define UVC_STRING_STREAMING_IDX   2
 
#define UVC_INTF_VIDEO_CONTROL   0
 
#define UVC_INTF_VIDEO_STREAMING   1
 
#define STATUS_BYTECOUNT   16 /* 16 bytes status */
 
#define UVC_COPY_DESCRIPTOR(mem, dst, desc)
 
#define UVC_COPY_DESCRIPTORS(mem, dst, src)
 

Functions

 module_param (streaming_interval, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (streaming_interval,"1 - 16")
 
 module_param (streaming_maxpacket, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (streaming_maxpacket,"0 - 1023 (fs), 0 - 1024 (hs/ss)")
 
 module_param (streaming_mult, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (streaming_mult,"0 - 2 (hs/ss only)")
 
 module_param (streaming_maxburst, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (streaming_maxburst,"0 - 15 (ss only)")
 
void uvc_function_connect (struct uvc_device *uvc)
 
void uvc_function_disconnect (struct uvc_device *uvc)
 
int __init uvc_bind_config (struct usb_configuration *c, const struct uvc_descriptor_header *const *fs_control, const struct uvc_descriptor_header *const *ss_control, const struct uvc_descriptor_header *const *fs_streaming, const struct uvc_descriptor_header *const *hs_streaming, const struct uvc_descriptor_header *const *ss_streaming)
 
 module_param_named (trace, uvc_gadget_trace_param, uint, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (trace,"Trace level bitmask")
 

Variables

unsigned int uvc_gadget_trace_param
 

Macro Definition Documentation

#define STATUS_BYTECOUNT   16 /* 16 bytes status */

Definition at line 81 of file f_uvc.c.

#define UVC_COPY_DESCRIPTOR (   mem,
  dst,
  desc 
)
Value:
do { \
memcpy(mem, desc, (desc)->bLength); \
*(dst)++ = mem; \
mem += (desc)->bLength; \
} while (0);

Definition at line 431 of file f_uvc.c.

#define UVC_COPY_DESCRIPTORS (   mem,
  dst,
  src 
)
Value:
do { \
const struct usb_descriptor_header * const *__src; \
for (__src = src; *__src; ++__src) { \
memcpy(mem, *__src, (*__src)->bLength); \
*dst++ = mem; \
mem += (*__src)->bLength; \
} \
} while (0)

Definition at line 438 of file f_uvc.c.

#define UVC_INTF_VIDEO_CONTROL   0

Definition at line 78 of file f_uvc.c.

#define UVC_INTF_VIDEO_STREAMING   1

Definition at line 79 of file f_uvc.c.

#define UVC_STRING_ASSOCIATION_IDX   0

Definition at line 57 of file f_uvc.c.

#define UVC_STRING_CONTROL_IDX   1

Definition at line 58 of file f_uvc.c.

#define UVC_STRING_STREAMING_IDX   2

Definition at line 59 of file f_uvc.c.

Function Documentation

module_param ( streaming_interval  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( streaming_maxpacket  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( streaming_mult  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param ( streaming_maxburst  ,
uint  ,
S_IRUGO S_IWUSR 
)
module_param_named ( trace  ,
uvc_gadget_trace_param  ,
uint  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( streaming_interval  ,
"1 - 16"   
)
MODULE_PARM_DESC ( streaming_maxpacket  ,
"0 - 1023   fs,
0-1024(hs/ss)"   
)
MODULE_PARM_DESC ( streaming_mult  ,
"0 - 2 (hs/ss only)"   
)
MODULE_PARM_DESC ( streaming_maxburst  ,
"0 - 15 (ss only)"   
)
MODULE_PARM_DESC ( trace  ,
"Trace level bitmask  
)

uvc_bind_config - add a UVC function to a configuration : the configuration to support the UVC instance Context: single threaded during gadget setup

Returns zero on success, else negative errno.

Caller must have called (). Caller is also responsible for calling () before module unload.

Definition at line 762 of file f_uvc.c.

void uvc_function_connect ( struct uvc_device uvc)

Definition at line 385 of file f_uvc.c.

void uvc_function_disconnect ( struct uvc_device uvc)

Definition at line 395 of file f_uvc.c.

Variable Documentation

unsigned int uvc_gadget_trace_param

Definition at line 30 of file f_uvc.c.