#ifndef PWC_H
#define PWC_H
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <asm/errno.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-vmalloc.h>
#ifdef CONFIG_USB_PWC_INPUT_EVDEV
#include <linux/input.h>
#endif
#include "pwc-dec1.h"
#include "pwc-dec23.h"
#define PWC_VERSION …
#define PWC_NAME …
#define PFX …
#define PWC_DEBUG_LEVEL_MODULE …
#define PWC_DEBUG_LEVEL_PROBE …
#define PWC_DEBUG_LEVEL_OPEN …
#define PWC_DEBUG_LEVEL_READ …
#define PWC_DEBUG_LEVEL_MEMORY …
#define PWC_DEBUG_LEVEL_FLOW …
#define PWC_DEBUG_LEVEL_SIZE …
#define PWC_DEBUG_LEVEL_IOCTL …
#define PWC_DEBUG_LEVEL_TRACE …
#define PWC_DEBUG_MODULE(fmt, args...) …
#define PWC_DEBUG_PROBE(fmt, args...) …
#define PWC_DEBUG_OPEN(fmt, args...) …
#define PWC_DEBUG_READ(fmt, args...) …
#define PWC_DEBUG_MEMORY(fmt, args...) …
#define PWC_DEBUG_FLOW(fmt, args...) …
#define PWC_DEBUG_SIZE(fmt, args...) …
#define PWC_DEBUG_IOCTL(fmt, args...) …
#define PWC_DEBUG_TRACE(fmt, args...) …
#ifdef CONFIG_USB_PWC_DEBUG
#define PWC_DEBUG_LEVEL …
#define PWC_DEBUG(level, fmt, args...) …
#define PWC_ERROR(fmt, args...) …
#define PWC_WARNING(fmt, args...) …
#define PWC_INFO(fmt, args...) …
#define PWC_TRACE(fmt, args...) …
#else
#define PWC_ERROR …
#define PWC_WARNING …
#define PWC_INFO …
#define PWC_TRACE …
#define PWC_DEBUG …
#define pwc_trace …
#endif
#define TOUCAM_HEADER_SIZE …
#define TOUCAM_TRAILER_SIZE …
#define FEATURE_MOTOR_PANTILT …
#define FEATURE_CODEC1 …
#define FEATURE_CODEC2 …
#define MAX_WIDTH …
#define MAX_HEIGHT …
#define FRAME_LOWMARK …
#define MAX_ISO_BUFS …
#define ISO_FRAMES_PER_DESC …
#define ISO_MAX_FRAME_SIZE …
#define ISO_BUFFER_SIZE …
#define PWC_FRAME_SIZE …
#define MIN_FRAMES …
#define MAX_FRAMES …
#define DEVICE_USE_CODEC1(x) …
#define DEVICE_USE_CODEC2(x) …
#define DEVICE_USE_CODEC3(x) …
#define DEVICE_USE_CODEC23(x) …
#define SET_LUM_CTL …
#define GET_LUM_CTL …
#define SET_CHROM_CTL …
#define GET_CHROM_CTL …
#define SET_STATUS_CTL …
#define GET_STATUS_CTL …
#define SET_EP_STREAM_CTL …
#define GET_EP_STREAM_CTL …
#define GET_XX_CTL …
#define SET_XX_CTL …
#define GET_XY_CTL …
#define SET_XY_CTL …
#define SET_MPT_CTL …
#define GET_MPT_CTL …
#define AGC_MODE_FORMATTER …
#define PRESET_AGC_FORMATTER …
#define SHUTTER_MODE_FORMATTER …
#define PRESET_SHUTTER_FORMATTER …
#define PRESET_CONTOUR_FORMATTER …
#define AUTO_CONTOUR_FORMATTER …
#define BACK_LIGHT_COMPENSATION_FORMATTER …
#define CONTRAST_FORMATTER …
#define DYNAMIC_NOISE_CONTROL_FORMATTER …
#define FLICKERLESS_MODE_FORMATTER …
#define AE_CONTROL_SPEED …
#define BRIGHTNESS_FORMATTER …
#define GAMMA_FORMATTER …
#define WB_MODE_FORMATTER …
#define AWB_CONTROL_SPEED_FORMATTER …
#define AWB_CONTROL_DELAY_FORMATTER …
#define PRESET_MANUAL_RED_GAIN_FORMATTER …
#define PRESET_MANUAL_BLUE_GAIN_FORMATTER …
#define COLOUR_MODE_FORMATTER …
#define SATURATION_MODE_FORMATTER1 …
#define SATURATION_MODE_FORMATTER2 …
#define SAVE_USER_DEFAULTS_FORMATTER …
#define RESTORE_USER_DEFAULTS_FORMATTER …
#define RESTORE_FACTORY_DEFAULTS_FORMATTER …
#define READ_AGC_FORMATTER …
#define READ_SHUTTER_FORMATTER …
#define READ_RED_GAIN_FORMATTER …
#define READ_BLUE_GAIN_FORMATTER …
#define PT_RELATIVE_CONTROL_FORMATTER …
#define PT_RESET_CONTROL_FORMATTER …
#define PT_STATUS_FORMATTER …
#define PSZ_SQCIF …
#define PSZ_QSIF …
#define PSZ_QCIF …
#define PSZ_SIF …
#define PSZ_CIF …
#define PSZ_VGA …
#define PSZ_MAX …
struct pwc_raw_frame { … } __packed;
struct pwc_frame_buf
{ … };
struct pwc_device
{ … };
#ifdef CONFIG_USB_PWC_DEBUG
extern int pwc_trace;
#endif
extern const int pwc_image_sizes[PSZ_MAX][2];
int pwc_get_size(struct pwc_device *pdev, int width, int height);
void pwc_construct(struct pwc_device *pdev);
extern int pwc_set_video_mode(struct pwc_device *pdev, int width, int height,
int pixfmt, int frames, int *compression, int send_to_cam);
extern unsigned int pwc_get_fps(struct pwc_device *pdev, unsigned int index, unsigned int size);
extern int pwc_set_leds(struct pwc_device *pdev, int on_value, int off_value);
extern int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor);
extern int send_control_msg(struct pwc_device *pdev,
u8 request, u16 value, void *buf, int buflen);
int pwc_get_u8_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *data);
int pwc_set_u8_ctrl(struct pwc_device *pdev, u8 request, u16 value, u8 data);
int pwc_get_s8_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *data);
#define pwc_set_s8_ctrl …
int pwc_get_u16_ctrl(struct pwc_device *pdev, u8 request, u16 value, int *dat);
int pwc_set_u16_ctrl(struct pwc_device *pdev, u8 request, u16 value, u16 data);
int pwc_button_ctrl(struct pwc_device *pdev, u16 value);
int pwc_init_controls(struct pwc_device *pdev);
extern void pwc_camera_power(struct pwc_device *pdev, int power);
extern const struct v4l2_ioctl_ops pwc_ioctl_ops;
int pwc_decompress(struct pwc_device *pdev, struct pwc_frame_buf *fbuf);
#endif