aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cx2341x.h4
-rw-r--r--include/media/ir-common.h46
-rw-r--r--include/media/saa7115.h3
-rw-r--r--include/media/v4l2-common.h22
-rw-r--r--include/media/v4l2-dev.h15
-rw-r--r--include/media/video-buf.h3
6 files changed, 76 insertions, 17 deletions
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h
index ecad55bf0162..d758a52cf556 100644
--- a/include/media/cx2341x.h
+++ b/include/media/cx2341x.h
@@ -57,7 +57,6 @@ struct cx2341x_mpeg_params {
57 u16 video_b_frames; 57 u16 video_b_frames;
58 u16 video_gop_size; 58 u16 video_gop_size;
59 u16 video_gop_closure; 59 u16 video_gop_closure;
60 u16 video_pulldown;
61 enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; 60 enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode;
62 u32 video_bitrate; 61 u32 video_bitrate;
63 u32 video_bitrate_peak; 62 u32 video_bitrate_peak;
@@ -121,8 +120,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
121#define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 120#define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18
122#define CX2341X_DEC_EXTRACT_VBI 0x19 121#define CX2341X_DEC_EXTRACT_VBI 0x19
123#define CX2341X_DEC_SET_DECODER_SOURCE 0x1a 122#define CX2341X_DEC_SET_DECODER_SOURCE 0x1a
124#define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b
125#define CX2341X_DEC_SET_AV_DELAY 0x1c
126#define CX2341X_DEC_SET_PREBUFFERING 0x1e 123#define CX2341X_DEC_SET_PREBUFFERING 0x1e
127 124
128/* MPEG encoder API */ 125/* MPEG encoder API */
@@ -141,7 +138,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
141#define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d 138#define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d
142#define CX2341X_ENC_SET_CORING_LEVELS 0x9f 139#define CX2341X_ENC_SET_CORING_LEVELS 0x9f
143#define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 140#define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1
144#define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1
145#define CX2341X_ENC_SET_VBI_LINE 0xb7 141#define CX2341X_ENC_SET_VBI_LINE 0xb7
146#define CX2341X_ENC_SET_STREAM_TYPE 0xb9 142#define CX2341X_ENC_SET_STREAM_TYPE 0xb9
147#define CX2341X_ENC_SET_OUTPUT_PORT 0xbb 143#define CX2341X_ENC_SET_OUTPUT_PORT 0xbb
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 4bb0ad810179..9807a7c15830 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -36,6 +36,11 @@
36#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ 36#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \
37 ? tab[code] : KEY_RESERVED) 37 ? tab[code] : KEY_RESERVED)
38 38
39#define RC5_START(x) (((x)>>12)&3)
40#define RC5_TOGGLE(x) (((x)>>11)&1)
41#define RC5_ADDR(x) (((x)>>6)&31)
42#define RC5_INSTR(x) ((x)&63)
43
39struct ir_input_state { 44struct ir_input_state {
40 /* configuration */ 45 /* configuration */
41 int ir_type; 46 int ir_type;
@@ -48,6 +53,40 @@ struct ir_input_state {
48 int keypressed; /* current state */ 53 int keypressed; /* current state */
49}; 54};
50 55
56/* this was saa7134_ir and bttv_ir, moved here for
57 * rc5 decoding. */
58struct card_ir {
59 struct input_dev *dev;
60 struct ir_input_state ir;
61 char name[32];
62 char phys[32];
63
64 /* Usual gpio signalling */
65
66 u32 mask_keycode;
67 u32 mask_keydown;
68 u32 mask_keyup;
69 u32 polling;
70 u32 last_gpio;
71 int shift_by;
72 int start; // What should RC5_START() be
73 int addr; // What RC5_ADDR() should be.
74 int rc5_key_timeout;
75 int rc5_remote_gap;
76 struct work_struct work;
77 struct timer_list timer;
78
79 /* RC5 gpio */
80 u32 rc5_gpio;
81 struct timer_list timer_end; /* timer_end for code completion */
82 struct timer_list timer_keyup; /* timer_end for key release */
83 u32 last_rc5; /* last good rc5 code */
84 u32 last_bit; /* last raw bit seen */
85 u32 code; /* raw code under construction */
86 struct timeval base_time; /* time of last seen code */
87 int active; /* building raw code */
88};
89
51void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 90void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
52 int ir_type, IR_KEYTAB_TYPE *ir_codes); 91 int ir_type, IR_KEYTAB_TYPE *ir_codes);
53void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 92void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
@@ -58,6 +97,10 @@ int ir_dump_samples(u32 *samples, int count);
58int ir_decode_biphase(u32 *samples, int count, int low, int high); 97int ir_decode_biphase(u32 *samples, int count, int low, int high);
59int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); 98int ir_decode_pulsedistance(u32 *samples, int count, int low, int high);
60 99
100u32 ir_rc5_decode(unsigned int code);
101void ir_rc5_timer_end(unsigned long data);
102void ir_rc5_timer_keyup(unsigned long data);
103
61/* Keymaps to be used by other modules */ 104/* Keymaps to be used by other modules */
62 105
63extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; 106extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
@@ -94,6 +137,9 @@ extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE];
94extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; 137extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE];
95extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; 138extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE];
96extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; 139extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE];
140extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
141extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
142extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
97 143
98#endif 144#endif
99 145
diff --git a/include/media/saa7115.h b/include/media/saa7115.h
index 9f0e2285a099..f677dfb9d373 100644
--- a/include/media/saa7115.h
+++ b/include/media/saa7115.h
@@ -42,5 +42,8 @@
42#define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ 42#define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */
43#define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ 43#define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */
44 44
45#define SAA7115_IPORT_ON 1
46#define SAA7115_IPORT_OFF 0
47
45#endif 48#endif
46 49
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 91b19921f958..6eaeec98ed89 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -64,9 +64,6 @@
64/* Prints the ioctl in a human-readable format */ 64/* Prints the ioctl in a human-readable format */
65extern void v4l_printk_ioctl(unsigned int cmd); 65extern void v4l_printk_ioctl(unsigned int cmd);
66 66
67/* Prints the ioctl and arg in a human-readable format */
68extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg);
69
70/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ 67/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
71#define v4l_print_ioctl(name, cmd) \ 68#define v4l_print_ioctl(name, cmd) \
72 do { \ 69 do { \
@@ -97,14 +94,15 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
97 94
98/* ------------------------------------------------------------------------- */ 95/* ------------------------------------------------------------------------- */
99 96
100/* Internal ioctls */ 97/* Register/chip ident helper function */
101 98
102/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ 99struct i2c_client; /* forward reference */
103struct v4l2_register { 100int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id);
104 u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ 101int v4l2_chip_match_host(u32 id_type, u32 chip_id);
105 unsigned long reg; 102
106 u32 val; 103/* ------------------------------------------------------------------------- */
107}; 104
105/* Internal ioctls */
108 106
109/* VIDIOC_INT_DECODE_VBI_LINE */ 107/* VIDIOC_INT_DECODE_VBI_LINE */
110struct v4l2_decode_vbi_line { 108struct v4l2_decode_vbi_line {
@@ -175,9 +173,7 @@ enum v4l2_chip_ident {
175 Replacement of TUNER_SET_STANDBY. */ 173 Replacement of TUNER_SET_STANDBY. */
176#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) 174#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32)
177 175
178/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 176/* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */
179#define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register)
180#define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register)
181 177
182/* Generic reset command. The argument selects which subsystems to reset. 178/* Generic reset command. The argument selects which subsystems to reset.
183 Passing 0 will always reset the whole chip. */ 179 Passing 0 will always reset the whole chip. */
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index fb96472a1bd3..1dd3d3239ecf 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -271,6 +271,12 @@ struct video_device
271 struct v4l2_jpegcompression *a); 271 struct v4l2_jpegcompression *a);
272 int (*vidioc_s_jpegcomp) (struct file *file, void *fh, 272 int (*vidioc_s_jpegcomp) (struct file *file, void *fh,
273 struct v4l2_jpegcompression *a); 273 struct v4l2_jpegcompression *a);
274 int (*vidioc_g_enc_index) (struct file *file, void *fh,
275 struct v4l2_enc_idx *a);
276 int (*vidioc_encoder_cmd) (struct file *file, void *fh,
277 struct v4l2_encoder_cmd *a);
278 int (*vidioc_try_encoder_cmd) (struct file *file, void *fh,
279 struct v4l2_encoder_cmd *a);
274 280
275 /* Stream type-dependent parameter ioctls */ 281 /* Stream type-dependent parameter ioctls */
276 int (*vidioc_g_parm) (struct file *file, void *fh, 282 int (*vidioc_g_parm) (struct file *file, void *fh,
@@ -296,6 +302,15 @@ struct video_device
296 int (*vidioc_log_status) (struct file *file, void *fh); 302 int (*vidioc_log_status) (struct file *file, void *fh);
297 303
298 304
305 /* Debugging ioctls */
306#ifdef CONFIG_VIDEO_ADV_DEBUG
307 int (*vidioc_g_register) (struct file *file, void *fh,
308 struct v4l2_register *reg);
309 int (*vidioc_s_register) (struct file *file, void *fh,
310 struct v4l2_register *reg);
311#endif
312
313
299#ifdef OBSOLETE_OWNER /* to be removed soon */ 314#ifdef OBSOLETE_OWNER /* to be removed soon */
300/* obsolete -- fops->owner is used instead */ 315/* obsolete -- fops->owner is used instead */
301struct module *owner; 316struct module *owner;
diff --git a/include/media/video-buf.h b/include/media/video-buf.h
index 1115a256969f..d6f079476db3 100644
--- a/include/media/video-buf.h
+++ b/include/media/video-buf.h
@@ -78,6 +78,9 @@ struct videobuf_dmabuf {
78 /* for kernel buffers */ 78 /* for kernel buffers */
79 void *vmalloc; 79 void *vmalloc;
80 80
81 /* Stores the userspace pointer to vmalloc area */
82 void *varea;
83
81 /* for overlay buffers (pci-pci dma) */ 84 /* for overlay buffers (pci-pci dma) */
82 dma_addr_t bus_addr; 85 dma_addr_t bus_addr;
83 86