diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h index ece4f281ef42..c6a1e907f63a 100644 --- a/drivers/media/video/cx18/cx18-driver.h +++ b/drivers/media/video/cx18/cx18-driver.h | |||
@@ -80,8 +80,9 @@ | |||
80 | #define CX18_CARD_YUAN_MPC718 3 /* Yuan MPC718 */ | 80 | #define CX18_CARD_YUAN_MPC718 3 /* Yuan MPC718 */ |
81 | #define CX18_CARD_CNXT_RAPTOR_PAL 4 /* Conexant Raptor PAL */ | 81 | #define CX18_CARD_CNXT_RAPTOR_PAL 4 /* Conexant Raptor PAL */ |
82 | #define CX18_CARD_TOSHIBA_QOSMIO_DVBT 5 /* Toshiba Qosmio Interal DVB-T/Analog*/ | 82 | #define CX18_CARD_TOSHIBA_QOSMIO_DVBT 5 /* Toshiba Qosmio Interal DVB-T/Analog*/ |
83 | #define CX18_CARD_LEADTEK_PVR2100 6 /* Leadtek WinFast PVR2100/DVR3100 H */ | 83 | #define CX18_CARD_LEADTEK_PVR2100 6 /* Leadtek WinFast PVR2100 */ |
84 | #define CX18_CARD_LAST 6 | 84 | #define CX18_CARD_LEADTEK_DVR3100H 7 /* Leadtek WinFast DVR3100 H */ |
85 | #define CX18_CARD_LAST 7 | ||
85 | 86 | ||
86 | #define CX18_ENC_STREAM_TYPE_MPG 0 | 87 | #define CX18_ENC_STREAM_TYPE_MPG 0 |
87 | #define CX18_ENC_STREAM_TYPE_TS 1 | 88 | #define CX18_ENC_STREAM_TYPE_TS 1 |
@@ -254,6 +255,7 @@ struct cx18_options { | |||
254 | #define CX18_F_S_INTERNAL_USE 5 /* this stream is used internally (sliced VBI processing) */ | 255 | #define CX18_F_S_INTERNAL_USE 5 /* this stream is used internally (sliced VBI processing) */ |
255 | #define CX18_F_S_STREAMOFF 7 /* signal end of stream EOS */ | 256 | #define CX18_F_S_STREAMOFF 7 /* signal end of stream EOS */ |
256 | #define CX18_F_S_APPL_IO 8 /* this stream is used read/written by an application */ | 257 | #define CX18_F_S_APPL_IO 8 /* this stream is used read/written by an application */ |
258 | #define CX18_F_S_STOPPING 9 /* telling the fw to stop capturing */ | ||
257 | 259 | ||
258 | /* per-cx18, i_flags */ | 260 | /* per-cx18, i_flags */ |
259 | #define CX18_F_I_LOADED_FW 0 /* Loaded firmware 1st time */ | 261 | #define CX18_F_I_LOADED_FW 0 /* Loaded firmware 1st time */ |
@@ -285,6 +287,7 @@ struct cx18_queue { | |||
285 | struct list_head list; | 287 | struct list_head list; |
286 | atomic_t buffers; | 288 | atomic_t buffers; |
287 | u32 bytesused; | 289 | u32 bytesused; |
290 | spinlock_t lock; | ||
288 | }; | 291 | }; |
289 | 292 | ||
290 | struct cx18_dvb { | 293 | struct cx18_dvb { |
@@ -305,7 +308,7 @@ struct cx18_scb; /* forward reference */ | |||
305 | 308 | ||
306 | 309 | ||
307 | #define CX18_MAX_MDL_ACKS 2 | 310 | #define CX18_MAX_MDL_ACKS 2 |
308 | #define CX18_MAX_EPU_WORK_ORDERS (CX18_MAX_FW_MDLS_PER_STREAM + 7) | 311 | #define CX18_MAX_IN_WORK_ORDERS (CX18_MAX_FW_MDLS_PER_STREAM + 7) |
309 | /* CPU_DE_RELEASE_MDL can burst CX18_MAX_FW_MDLS_PER_STREAM orders in a group */ | 312 | /* CPU_DE_RELEASE_MDL can burst CX18_MAX_FW_MDLS_PER_STREAM orders in a group */ |
310 | 313 | ||
311 | #define CX18_F_EWO_MB_STALE_UPON_RECEIPT 0x1 | 314 | #define CX18_F_EWO_MB_STALE_UPON_RECEIPT 0x1 |
@@ -313,7 +316,7 @@ struct cx18_scb; /* forward reference */ | |||
313 | #define CX18_F_EWO_MB_STALE \ | 316 | #define CX18_F_EWO_MB_STALE \ |
314 | (CX18_F_EWO_MB_STALE_UPON_RECEIPT | CX18_F_EWO_MB_STALE_WHILE_PROC) | 317 | (CX18_F_EWO_MB_STALE_UPON_RECEIPT | CX18_F_EWO_MB_STALE_WHILE_PROC) |
315 | 318 | ||
316 | struct cx18_epu_work_order { | 319 | struct cx18_in_work_order { |
317 | struct work_struct work; | 320 | struct work_struct work; |
318 | atomic_t pending; | 321 | atomic_t pending; |
319 | struct cx18 *cx; | 322 | struct cx18 *cx; |
@@ -337,7 +340,6 @@ struct cx18_stream { | |||
337 | unsigned mdl_offset; | 340 | unsigned mdl_offset; |
338 | 341 | ||
339 | u32 id; | 342 | u32 id; |
340 | struct mutex qlock; /* locks access to the queues */ | ||
341 | unsigned long s_flags; /* status flags, see above */ | 343 | unsigned long s_flags; /* status flags, see above */ |
342 | int dma; /* can be PCI_DMA_TODEVICE, | 344 | int dma; /* can be PCI_DMA_TODEVICE, |
343 | PCI_DMA_FROMDEVICE or | 345 | PCI_DMA_FROMDEVICE or |
@@ -353,6 +355,8 @@ struct cx18_stream { | |||
353 | struct cx18_queue q_busy; /* busy buffers - in use by firmware */ | 355 | struct cx18_queue q_busy; /* busy buffers - in use by firmware */ |
354 | struct cx18_queue q_full; /* full buffers - data for user apps */ | 356 | struct cx18_queue q_full; /* full buffers - data for user apps */ |
355 | 357 | ||
358 | struct work_struct out_work_order; | ||
359 | |||
356 | /* DVB / Digital Transport */ | 360 | /* DVB / Digital Transport */ |
357 | struct cx18_dvb dvb; | 361 | struct cx18_dvb dvb; |
358 | }; | 362 | }; |
@@ -568,10 +572,14 @@ struct cx18 { | |||
568 | u32 sw2_irq_mask; | 572 | u32 sw2_irq_mask; |
569 | u32 hw2_irq_mask; | 573 | u32 hw2_irq_mask; |
570 | 574 | ||
571 | struct workqueue_struct *work_queue; | 575 | struct workqueue_struct *in_work_queue; |
572 | struct cx18_epu_work_order epu_work_order[CX18_MAX_EPU_WORK_ORDERS]; | 576 | char in_workq_name[11]; /* "cx18-NN-in" */ |
577 | struct cx18_in_work_order in_work_order[CX18_MAX_IN_WORK_ORDERS]; | ||
573 | char epu_debug_str[256]; /* CX18_EPU_DEBUG is rare: use shared space */ | 578 | char epu_debug_str[256]; /* CX18_EPU_DEBUG is rare: use shared space */ |
574 | 579 | ||
580 | struct workqueue_struct *out_work_queue; | ||
581 | char out_workq_name[12]; /* "cx18-NN-out" */ | ||
582 | |||
575 | /* i2c */ | 583 | /* i2c */ |
576 | struct i2c_adapter i2c_adap[2]; | 584 | struct i2c_adapter i2c_adap[2]; |
577 | struct i2c_algo_bit_data i2c_algo[2]; | 585 | struct i2c_algo_bit_data i2c_algo[2]; |