diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88.h')
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 33d161a11725..e8c732e7ae4f 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -31,9 +31,8 @@ | |||
31 | #include <media/videobuf-dma-sg.h> | 31 | #include <media/videobuf-dma-sg.h> |
32 | #include <media/v4l2-chip-ident.h> | 32 | #include <media/v4l2-chip-ident.h> |
33 | #include <media/cx2341x.h> | 33 | #include <media/cx2341x.h> |
34 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | ||
35 | #include <media/videobuf-dvb.h> | 34 | #include <media/videobuf-dvb.h> |
36 | #endif | 35 | #include <media/ir-kbd-i2c.h> |
37 | 36 | ||
38 | #include "btcx-risc.h" | 37 | #include "btcx-risc.h" |
39 | #include "cx88-reg.h" | 38 | #include "cx88-reg.h" |
@@ -108,7 +107,7 @@ static unsigned int inline norm_maxh(v4l2_std_id norm) | |||
108 | /* static data */ | 107 | /* static data */ |
109 | 108 | ||
110 | struct cx8800_fmt { | 109 | struct cx8800_fmt { |
111 | char *name; | 110 | const char *name; |
112 | u32 fourcc; /* v4l2 format id */ | 111 | u32 fourcc; /* v4l2 format id */ |
113 | int depth; | 112 | int depth; |
114 | int flags; | 113 | int flags; |
@@ -138,7 +137,7 @@ struct cx88_ctrl { | |||
138 | /* more */ | 137 | /* more */ |
139 | 138 | ||
140 | struct sram_channel { | 139 | struct sram_channel { |
141 | char *name; | 140 | const char *name; |
142 | u32 cmds_start; | 141 | u32 cmds_start; |
143 | u32 ctrl_start; | 142 | u32 ctrl_start; |
144 | u32 cdt; | 143 | u32 cdt; |
@@ -149,7 +148,7 @@ struct sram_channel { | |||
149 | u32 cnt1_reg; | 148 | u32 cnt1_reg; |
150 | u32 cnt2_reg; | 149 | u32 cnt2_reg; |
151 | }; | 150 | }; |
152 | extern struct sram_channel cx88_sram_channels[]; | 151 | extern const struct sram_channel const cx88_sram_channels[]; |
153 | 152 | ||
154 | /* ----------------------------------------------------------- */ | 153 | /* ----------------------------------------------------------- */ |
155 | /* card configuration */ | 154 | /* card configuration */ |
@@ -240,6 +239,7 @@ extern struct sram_channel cx88_sram_channels[]; | |||
240 | #define CX88_BOARD_WINFAST_DTV2000H_J 82 | 239 | #define CX88_BOARD_WINFAST_DTV2000H_J 82 |
241 | #define CX88_BOARD_PROF_7301 83 | 240 | #define CX88_BOARD_PROF_7301 83 |
242 | #define CX88_BOARD_SAMSUNG_SMT_7020 84 | 241 | #define CX88_BOARD_SAMSUNG_SMT_7020 84 |
242 | #define CX88_BOARD_TWINHAN_VP1027_DVBS 85 | ||
243 | 243 | ||
244 | enum cx88_itype { | 244 | enum cx88_itype { |
245 | CX88_VMUX_COMPOSITE1 = 1, | 245 | CX88_VMUX_COMPOSITE1 = 1, |
@@ -262,7 +262,7 @@ struct cx88_input { | |||
262 | }; | 262 | }; |
263 | 263 | ||
264 | struct cx88_board { | 264 | struct cx88_board { |
265 | char *name; | 265 | const char *name; |
266 | unsigned int tuner_type; | 266 | unsigned int tuner_type; |
267 | unsigned int radio_type; | 267 | unsigned int radio_type; |
268 | unsigned char tuner_addr; | 268 | unsigned char tuner_addr; |
@@ -281,6 +281,20 @@ struct cx88_subid { | |||
281 | u32 card; | 281 | u32 card; |
282 | }; | 282 | }; |
283 | 283 | ||
284 | enum cx88_tvaudio { | ||
285 | WW_NONE = 1, | ||
286 | WW_BTSC, | ||
287 | WW_BG, | ||
288 | WW_DK, | ||
289 | WW_I, | ||
290 | WW_L, | ||
291 | WW_EIAJ, | ||
292 | WW_I2SPT, | ||
293 | WW_FM, | ||
294 | WW_I2SADC, | ||
295 | WW_M | ||
296 | }; | ||
297 | |||
284 | #define INPUT(nr) (core->board.input[nr]) | 298 | #define INPUT(nr) (core->board.input[nr]) |
285 | 299 | ||
286 | /* ----------------------------------------------------------- */ | 300 | /* ----------------------------------------------------------- */ |
@@ -300,7 +314,7 @@ struct cx88_buffer { | |||
300 | /* cx88 specific */ | 314 | /* cx88 specific */ |
301 | unsigned int bpl; | 315 | unsigned int bpl; |
302 | struct btcx_riscmem risc; | 316 | struct btcx_riscmem risc; |
303 | struct cx8800_fmt *fmt; | 317 | const struct cx8800_fmt *fmt; |
304 | u32 count; | 318 | u32 count; |
305 | }; | 319 | }; |
306 | 320 | ||
@@ -352,7 +366,7 @@ struct cx88_core { | |||
352 | /* state info */ | 366 | /* state info */ |
353 | struct task_struct *kthread; | 367 | struct task_struct *kthread; |
354 | v4l2_std_id tvnorm; | 368 | v4l2_std_id tvnorm; |
355 | u32 tvaudio; | 369 | enum cx88_tvaudio tvaudio; |
356 | u32 audiomode_manual; | 370 | u32 audiomode_manual; |
357 | u32 audiomode_current; | 371 | u32 audiomode_current; |
358 | u32 input; | 372 | u32 input; |
@@ -363,6 +377,9 @@ struct cx88_core { | |||
363 | /* IR remote control state */ | 377 | /* IR remote control state */ |
364 | struct cx88_IR *ir; | 378 | struct cx88_IR *ir; |
365 | 379 | ||
380 | /* I2C remote data */ | ||
381 | struct IR_i2c_init_data init_data; | ||
382 | |||
366 | struct mutex lock; | 383 | struct mutex lock; |
367 | /* various v4l controls */ | 384 | /* various v4l controls */ |
368 | u32 freq; | 385 | u32 freq; |
@@ -381,17 +398,19 @@ static inline struct cx88_core *to_core(struct v4l2_device *v4l2_dev) | |||
381 | return container_of(v4l2_dev, struct cx88_core, v4l2_dev); | 398 | return container_of(v4l2_dev, struct cx88_core, v4l2_dev); |
382 | } | 399 | } |
383 | 400 | ||
384 | #define call_all(core, o, f, args...) \ | 401 | #define call_hw(core, grpid, o, f, args...) \ |
385 | do { \ | 402 | do { \ |
386 | if (!core->i2c_rc) { \ | 403 | if (!core->i2c_rc) { \ |
387 | if (core->gate_ctrl) \ | 404 | if (core->gate_ctrl) \ |
388 | core->gate_ctrl(core, 1); \ | 405 | core->gate_ctrl(core, 1); \ |
389 | v4l2_device_call_all(&core->v4l2_dev, 0, o, f, ##args); \ | 406 | v4l2_device_call_all(&core->v4l2_dev, grpid, o, f, ##args); \ |
390 | if (core->gate_ctrl) \ | 407 | if (core->gate_ctrl) \ |
391 | core->gate_ctrl(core, 0); \ | 408 | core->gate_ctrl(core, 0); \ |
392 | } \ | 409 | } \ |
393 | } while (0) | 410 | } while (0) |
394 | 411 | ||
412 | #define call_all(core, o, f, args...) call_hw(core, 0, o, f, ##args) | ||
413 | |||
395 | struct cx8800_dev; | 414 | struct cx8800_dev; |
396 | struct cx8802_dev; | 415 | struct cx8802_dev; |
397 | 416 | ||
@@ -410,7 +429,7 @@ struct cx8800_fh { | |||
410 | unsigned int nclips; | 429 | unsigned int nclips; |
411 | 430 | ||
412 | /* video capture */ | 431 | /* video capture */ |
413 | struct cx8800_fmt *fmt; | 432 | const struct cx8800_fmt *fmt; |
414 | unsigned int width,height; | 433 | unsigned int width,height; |
415 | struct videobuf_queue vidq; | 434 | struct videobuf_queue vidq; |
416 | 435 | ||
@@ -565,7 +584,7 @@ struct cx8802_dev { | |||
565 | /* ----------------------------------------------------------- */ | 584 | /* ----------------------------------------------------------- */ |
566 | /* cx88-core.c */ | 585 | /* cx88-core.c */ |
567 | 586 | ||
568 | extern void cx88_print_irqbits(char *name, char *tag, char **strings, | 587 | extern void cx88_print_irqbits(const char *name, const char *tag, const char *strings[], |
569 | int len, u32 bits, u32 mask); | 588 | int len, u32 bits, u32 mask); |
570 | 589 | ||
571 | extern int cx88_core_irq(struct cx88_core *core, u32 status); | 590 | extern int cx88_core_irq(struct cx88_core *core, u32 status); |
@@ -592,10 +611,10 @@ cx88_free_buffer(struct videobuf_queue *q, struct cx88_buffer *buf); | |||
592 | extern void cx88_risc_disasm(struct cx88_core *core, | 611 | extern void cx88_risc_disasm(struct cx88_core *core, |
593 | struct btcx_riscmem *risc); | 612 | struct btcx_riscmem *risc); |
594 | extern int cx88_sram_channel_setup(struct cx88_core *core, | 613 | extern int cx88_sram_channel_setup(struct cx88_core *core, |
595 | struct sram_channel *ch, | 614 | const struct sram_channel *ch, |
596 | unsigned int bpl, u32 risc); | 615 | unsigned int bpl, u32 risc); |
597 | extern void cx88_sram_channel_dump(struct cx88_core *core, | 616 | extern void cx88_sram_channel_dump(struct cx88_core *core, |
598 | struct sram_channel *ch); | 617 | const struct sram_channel *ch); |
599 | 618 | ||
600 | extern int cx88_set_scale(struct cx88_core *core, unsigned int width, | 619 | extern int cx88_set_scale(struct cx88_core *core, unsigned int width, |
601 | unsigned int height, enum v4l2_field field); | 620 | unsigned int height, enum v4l2_field field); |
@@ -603,8 +622,8 @@ extern int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm); | |||
603 | 622 | ||
604 | extern struct video_device *cx88_vdev_init(struct cx88_core *core, | 623 | extern struct video_device *cx88_vdev_init(struct cx88_core *core, |
605 | struct pci_dev *pci, | 624 | struct pci_dev *pci, |
606 | struct video_device *template, | 625 | const struct video_device *template_, |
607 | char *type); | 626 | const char *type); |
608 | extern struct cx88_core* cx88_core_get(struct pci_dev *pci); | 627 | extern struct cx88_core* cx88_core_get(struct pci_dev *pci); |
609 | extern void cx88_core_put(struct cx88_core *core, | 628 | extern void cx88_core_put(struct cx88_core *core, |
610 | struct pci_dev *pci); | 629 | struct pci_dev *pci); |
@@ -630,13 +649,12 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev, | |||
630 | struct cx88_dmaqueue *q); | 649 | struct cx88_dmaqueue *q); |
631 | void cx8800_vbi_timeout(unsigned long data); | 650 | void cx8800_vbi_timeout(unsigned long data); |
632 | 651 | ||
633 | extern struct videobuf_queue_ops cx8800_vbi_qops; | 652 | extern const struct videobuf_queue_ops cx8800_vbi_qops; |
634 | 653 | ||
635 | /* ----------------------------------------------------------- */ | 654 | /* ----------------------------------------------------------- */ |
636 | /* cx88-i2c.c */ | 655 | /* cx88-i2c.c */ |
637 | 656 | ||
638 | extern int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci); | 657 | extern int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci); |
639 | extern void cx88_i2c_init_ir(struct cx88_core *core); | ||
640 | 658 | ||
641 | 659 | ||
642 | /* ----------------------------------------------------------- */ | 660 | /* ----------------------------------------------------------- */ |
@@ -651,18 +669,6 @@ extern void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl); | |||
651 | /* ----------------------------------------------------------- */ | 669 | /* ----------------------------------------------------------- */ |
652 | /* cx88-tvaudio.c */ | 670 | /* cx88-tvaudio.c */ |
653 | 671 | ||
654 | #define WW_NONE 1 | ||
655 | #define WW_BTSC 2 | ||
656 | #define WW_BG 3 | ||
657 | #define WW_DK 4 | ||
658 | #define WW_I 5 | ||
659 | #define WW_L 6 | ||
660 | #define WW_EIAJ 7 | ||
661 | #define WW_I2SPT 8 | ||
662 | #define WW_FM 9 | ||
663 | #define WW_I2SADC 10 | ||
664 | #define WW_M 11 | ||
665 | |||
666 | void cx88_set_tvaudio(struct cx88_core *core); | 672 | void cx88_set_tvaudio(struct cx88_core *core); |
667 | void cx88_newstation(struct cx88_core *core); | 673 | void cx88_newstation(struct cx88_core *core); |
668 | void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); | 674 | void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); |
@@ -686,6 +692,7 @@ int cx88_ir_fini(struct cx88_core *core); | |||
686 | void cx88_ir_irq(struct cx88_core *core); | 692 | void cx88_ir_irq(struct cx88_core *core); |
687 | int cx88_ir_start(struct cx88_core *core); | 693 | int cx88_ir_start(struct cx88_core *core); |
688 | void cx88_ir_stop(struct cx88_core *core); | 694 | void cx88_ir_stop(struct cx88_core *core); |
695 | extern void cx88_i2c_init_ir(struct cx88_core *core); | ||
689 | 696 | ||
690 | /* ----------------------------------------------------------- */ | 697 | /* ----------------------------------------------------------- */ |
691 | /* cx88-mpeg.c */ | 698 | /* cx88-mpeg.c */ |
@@ -705,10 +712,3 @@ int cx88_set_freq (struct cx88_core *core,struct v4l2_frequency *f); | |||
705 | int cx88_get_control(struct cx88_core *core, struct v4l2_control *ctl); | 712 | int cx88_get_control(struct cx88_core *core, struct v4l2_control *ctl); |
706 | int cx88_set_control(struct cx88_core *core, struct v4l2_control *ctl); | 713 | int cx88_set_control(struct cx88_core *core, struct v4l2_control *ctl); |
707 | int cx88_video_mux(struct cx88_core *core, unsigned int input); | 714 | int cx88_video_mux(struct cx88_core *core, unsigned int input); |
708 | |||
709 | /* | ||
710 | * Local variables: | ||
711 | * c-basic-offset: 8 | ||
712 | * End: | ||
713 | * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off | ||
714 | */ | ||