aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-23 10:31:57 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:06:48 -0400
commita158f3559334c6314c7876390caffe88c9fdb64d (patch)
tree471c51b781669a5342725fdef3f051e2e8162ba4 /drivers/media/video/ivtv/ivtv-driver.h
parentfd8b281a2809d2bd9119df1fbd717ab2371297cd (diff)
V4L/DVB (6094): ivtv: more ivtv-driver.h cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.h')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h66
1 files changed, 32 insertions, 34 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 2c27515d8731..332d16415ebf 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -180,11 +180,11 @@ extern int ivtv_debug;
180#define IVTV_MAX_PGM_INDEX (400) 180#define IVTV_MAX_PGM_INDEX (400)
181 181
182struct ivtv_options { 182struct ivtv_options {
183 int kilobytes[IVTV_MAX_STREAMS]; /* Size in kilobytes of each stream */ 183 int kilobytes[IVTV_MAX_STREAMS]; /* size in kilobytes of each stream */
184 int cardtype; /* force card type on load */ 184 int cardtype; /* force card type on load */
185 int tuner; /* set tuner on load */ 185 int tuner; /* set tuner on load */
186 int radio; /* enable/disable radio */ 186 int radio; /* enable/disable radio */
187 int newi2c; /* New I2C algorithm */ 187 int newi2c; /* new I2C algorithm */
188}; 188};
189 189
190/* ivtv-specific mailbox template */ 190/* ivtv-specific mailbox template */
@@ -231,10 +231,10 @@ struct ivtv_mailbox_data {
231#define IVTV_F_I_DMA 0 /* DMA in progress */ 231#define IVTV_F_I_DMA 0 /* DMA in progress */
232#define IVTV_F_I_UDMA 1 /* UDMA in progress */ 232#define IVTV_F_I_UDMA 1 /* UDMA in progress */
233#define IVTV_F_I_UDMA_PENDING 2 /* UDMA pending */ 233#define IVTV_F_I_UDMA_PENDING 2 /* UDMA pending */
234#define IVTV_F_I_SPEED_CHANGE 3 /* A speed change is in progress */ 234#define IVTV_F_I_SPEED_CHANGE 3 /* a speed change is in progress */
235#define IVTV_F_I_EOS 4 /* End of encoder stream reached */ 235#define IVTV_F_I_EOS 4 /* end of encoder stream reached */
236#define IVTV_F_I_RADIO_USER 5 /* The radio tuner is selected */ 236#define IVTV_F_I_RADIO_USER 5 /* the radio tuner is selected */
237#define IVTV_F_I_DIG_RST 6 /* Reset digitizer */ 237#define IVTV_F_I_DIG_RST 6 /* reset digitizer */
238#define IVTV_F_I_DEC_YUV 7 /* YUV instead of MPG is being decoded */ 238#define IVTV_F_I_DEC_YUV 7 /* YUV instead of MPG is being decoded */
239#define IVTV_F_I_UPDATE_CC 9 /* CC should be updated */ 239#define IVTV_F_I_UPDATE_CC 9 /* CC should be updated */
240#define IVTV_F_I_UPDATE_WSS 10 /* WSS should be updated */ 240#define IVTV_F_I_UPDATE_WSS 10 /* WSS should be updated */
@@ -242,7 +242,7 @@ struct ivtv_mailbox_data {
242#define IVTV_F_I_DECODING_YUV 12 /* this stream is YUV frame decoding */ 242#define IVTV_F_I_DECODING_YUV 12 /* this stream is YUV frame decoding */
243#define IVTV_F_I_ENC_PAUSED 13 /* the encoder is paused */ 243#define IVTV_F_I_ENC_PAUSED 13 /* the encoder is paused */
244#define IVTV_F_I_VALID_DEC_TIMINGS 14 /* last_dec_timing is valid */ 244#define IVTV_F_I_VALID_DEC_TIMINGS 14 /* last_dec_timing is valid */
245#define IVTV_F_I_HAVE_WORK 15 /* Used in the interrupt handler: there is work to be done */ 245#define IVTV_F_I_HAVE_WORK 15 /* used in the interrupt handler: there is work to be done */
246#define IVTV_F_I_WORK_HANDLER_VBI 16 /* there is work to be done for VBI */ 246#define IVTV_F_I_WORK_HANDLER_VBI 16 /* there is work to be done for VBI */
247#define IVTV_F_I_WORK_HANDLER_YUV 17 /* there is work to be done for YUV */ 247#define IVTV_F_I_WORK_HANDLER_YUV 17 /* there is work to be done for YUV */
248#define IVTV_F_I_WORK_HANDLER_PIO 18 /* there is work to be done for PIO */ 248#define IVTV_F_I_WORK_HANDLER_PIO 18 /* there is work to be done for PIO */
@@ -295,19 +295,18 @@ struct ivtv_buffer {
295 unsigned short b_flags; 295 unsigned short b_flags;
296 unsigned short dma_xfer_cnt; 296 unsigned short dma_xfer_cnt;
297 char *buf; 297 char *buf;
298
299 u32 bytesused; 298 u32 bytesused;
300 u32 readpos; 299 u32 readpos;
301}; 300};
302 301
303struct ivtv_queue { 302struct ivtv_queue {
304 struct list_head list; 303 struct list_head list; /* the list of buffers in this queue */
305 u32 buffers; 304 u32 buffers; /* number of buffers in this queue */
306 u32 length; 305 u32 length; /* total number of bytes of available buffer space */
307 u32 bytesused; 306 u32 bytesused; /* total number of bytes used in this queue */
308}; 307};
309 308
310struct ivtv; /* forward reference */ 309struct ivtv; /* forward reference */
311 310
312struct ivtv_stream { 311struct ivtv_stream {
313 /* These first four fields are always set, even if the stream 312 /* These first four fields are always set, even if the stream
@@ -318,11 +317,9 @@ struct ivtv_stream {
318 int type; /* stream type */ 317 int type; /* stream type */
319 318
320 u32 id; 319 u32 id;
321 spinlock_t qlock; /* locks access to the queues */ 320 spinlock_t qlock; /* locks access to the queues */
322 unsigned long s_flags; /* status flags, see above */ 321 unsigned long s_flags; /* status flags, see above */
323 int dma; /* can be PCI_DMA_TODEVICE, 322 int dma; /* can be PCI_DMA_TODEVICE, PCI_DMA_FROMDEVICE or PCI_DMA_NONE */
324 PCI_DMA_FROMDEVICE or
325 PCI_DMA_NONE */
326 u32 pending_offset; 323 u32 pending_offset;
327 u32 pending_backup; 324 u32 pending_backup;
328 u64 pending_pts; 325 u64 pending_pts;
@@ -365,10 +362,10 @@ struct ivtv_stream {
365}; 362};
366 363
367struct ivtv_open_id { 364struct ivtv_open_id {
368 u32 open_id; 365 u32 open_id; /* unique ID for this file descriptor */
369 int type; 366 int type; /* stream type */
370 int yuv_frames; 367 int yuv_frames; /* 1: started OUT_UDMA_YUV output mode */
371 enum v4l2_priority prio; 368 enum v4l2_priority prio; /* priority */
372 struct ivtv *itv; 369 struct ivtv *itv;
373}; 370};
374 371
@@ -493,6 +490,14 @@ struct yuv_playback_info
493 490
494/* VBI data */ 491/* VBI data */
495struct vbi_info { 492struct vbi_info {
493 /* VBI general fixed card data */
494 u32 raw_decoder_line_size; /* raw VBI line size from digitizer */
495 u8 raw_decoder_sav_odd_field; /* raw VBI Start Active Video digitizer code of odd field */
496 u8 raw_decoder_sav_even_field; /* raw VBI Start Active Video digitizer code of even field */
497 u32 sliced_decoder_line_size; /* sliced VBI line size from digitizer */
498 u8 sliced_decoder_sav_odd_field; /* sliced VBI Start Active Video digitizer code of odd field */
499 u8 sliced_decoder_sav_even_field; /* sliced VBI Start Active Video digitizer code of even field */
500
496 u32 dec_start; 501 u32 dec_start;
497 u32 enc_start, enc_size; 502 u32 enc_start, enc_size;
498 int fpi; 503 int fpi;
@@ -506,12 +511,6 @@ struct vbi_info {
506 int wss; 511 int wss;
507 u8 wss_found; 512 u8 wss_found;
508 u8 wss_no_update; 513 u8 wss_no_update;
509 u32 raw_decoder_line_size;
510 u8 raw_decoder_sav_odd_field;
511 u8 raw_decoder_sav_even_field;
512 u32 sliced_decoder_line_size;
513 u8 sliced_decoder_sav_odd_field;
514 u8 sliced_decoder_sav_even_field;
515 struct v4l2_format in; 514 struct v4l2_format in;
516 /* convenience pointer to sliced struct in vbi_in union */ 515 /* convenience pointer to sliced struct in vbi_in union */
517 struct v4l2_sliced_vbi_format *sliced_in; 516 struct v4l2_sliced_vbi_format *sliced_in;
@@ -592,8 +591,7 @@ struct ivtv {
592 591
593 /* Locking */ 592 /* Locking */
594 spinlock_t lock; /* lock access to this struct */ 593 spinlock_t lock; /* lock access to this struct */
595 /* mutex used to serialize open/close/start/stop/ioctl operations */ 594 struct mutex serialize_lock; /* mutex used to serialize open/close/start/stop/ioctl operations */
596 struct mutex serialize_lock;
597 595
598 596
599 /* Streams */ 597 /* Streams */
@@ -616,7 +614,7 @@ struct ivtv {
616 int dma_retries; /* current DMA retry attempt */ 614 int dma_retries; /* current DMA retry attempt */
617 struct ivtv_user_dma udma; /* user based DMA for OSD */ 615 struct ivtv_user_dma udma; /* user based DMA for OSD */
618 struct timer_list dma_timer; /* timer used to catch unfinished DMAs */ 616 struct timer_list dma_timer; /* timer used to catch unfinished DMAs */
619 u32 last_vsync_frame; /* last seen vsync field */ 617 u32 last_vsync_field; /* last seen vsync field */
620 wait_queue_head_t dma_waitq; /* wake up when the current DMA is finished */ 618 wait_queue_head_t dma_waitq; /* wake up when the current DMA is finished */
621 wait_queue_head_t eos_waitq; /* wake up when EOS arrives */ 619 wait_queue_head_t eos_waitq; /* wake up when EOS arrives */
622 wait_queue_head_t event_waitq; /* wake up when the next decoder event arrives */ 620 wait_queue_head_t event_waitq; /* wake up when the next decoder event arrives */