diff options
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx.h')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx.h | 260 |
1 files changed, 237 insertions, 23 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h index 38d417191a65..d067df9b81e7 100644 --- a/drivers/media/video/cx231xx/cx231xx.h +++ b/drivers/media/video/cx231xx/cx231xx.h | |||
@@ -27,16 +27,15 @@ | |||
27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
28 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
29 | #include <linux/i2c-algo-bit.h> | 29 | #include <linux/i2c-algo-bit.h> |
30 | #include <linux/workqueue.h> | ||
30 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
31 | 32 | ||
33 | #include <media/cx2341x.h> | ||
32 | 34 | ||
33 | #include <media/videobuf-vmalloc.h> | 35 | #include <media/videobuf-vmalloc.h> |
34 | #include <media/v4l2-device.h> | 36 | #include <media/v4l2-device.h> |
35 | #include <media/ir-core.h> | 37 | #include <media/ir-core.h> |
36 | #if defined(CONFIG_VIDEO_CX231XX_DVB) || \ | ||
37 | defined(CONFIG_VIDEO_CX231XX_DVB_MODULE) | ||
38 | #include <media/videobuf-dvb.h> | 38 | #include <media/videobuf-dvb.h> |
39 | #endif | ||
40 | 39 | ||
41 | #include "cx231xx-reg.h" | 40 | #include "cx231xx-reg.h" |
42 | #include "cx231xx-pcb-cfg.h" | 41 | #include "cx231xx-pcb-cfg.h" |
@@ -49,12 +48,20 @@ | |||
49 | #define AFE_DEVICE_ADDRESS 0x60 | 48 | #define AFE_DEVICE_ADDRESS 0x60 |
50 | #define I2S_BLK_DEVICE_ADDRESS 0x98 | 49 | #define I2S_BLK_DEVICE_ADDRESS 0x98 |
51 | #define VID_BLK_I2C_ADDRESS 0x88 | 50 | #define VID_BLK_I2C_ADDRESS 0x88 |
51 | #define VERVE_I2C_ADDRESS 0x40 | ||
52 | #define DIF_USE_BASEBAND 0xFFFFFFFF | 52 | #define DIF_USE_BASEBAND 0xFFFFFFFF |
53 | 53 | ||
54 | /* Boards supported by driver */ | 54 | /* Boards supported by driver */ |
55 | #define CX231XX_BOARD_UNKNOWN 0 | 55 | #define CX231XX_BOARD_UNKNOWN 0 |
56 | #define CX231XX_BOARD_CNXT_RDE_250 1 | 56 | #define CX231XX_BOARD_CNXT_CARRAERA 1 |
57 | #define CX231XX_BOARD_CNXT_RDU_250 2 | 57 | #define CX231XX_BOARD_CNXT_SHELBY 2 |
58 | #define CX231XX_BOARD_CNXT_RDE_253S 3 | ||
59 | #define CX231XX_BOARD_CNXT_RDU_253S 4 | ||
60 | #define CX231XX_BOARD_CNXT_VIDEO_GRABBER 5 | ||
61 | #define CX231XX_BOARD_CNXT_RDE_250 6 | ||
62 | #define CX231XX_BOARD_CNXT_RDU_250 7 | ||
63 | #define CX231XX_BOARD_HAUPPAUGE_EXETER 8 | ||
64 | #define CX231XX_BOARD_HAUPPAUGE_USBLIVE2 9 | ||
58 | 65 | ||
59 | /* Limits minimum and default number of buffers */ | 66 | /* Limits minimum and default number of buffers */ |
60 | #define CX231XX_MIN_BUF 4 | 67 | #define CX231XX_MIN_BUF 4 |
@@ -95,6 +102,24 @@ | |||
95 | #define CX231XX_URB_TIMEOUT \ | 102 | #define CX231XX_URB_TIMEOUT \ |
96 | msecs_to_jiffies(CX231XX_NUM_BUFS * CX231XX_NUM_PACKETS) | 103 | msecs_to_jiffies(CX231XX_NUM_BUFS * CX231XX_NUM_PACKETS) |
97 | 104 | ||
105 | #define CX231xx_NORMS (\ | ||
106 | V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_443 | \ | ||
107 | V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_I | \ | ||
108 | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | \ | ||
109 | V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK) | ||
110 | #define CX231xx_VERSION_CODE KERNEL_VERSION(0, 0, 2) | ||
111 | |||
112 | #define SLEEP_S5H1432 30 | ||
113 | #define CX23417_OSC_EN 8 | ||
114 | #define CX23417_RESET 9 | ||
115 | |||
116 | struct cx23417_fmt { | ||
117 | char *name; | ||
118 | u32 fourcc; /* v4l2 format id */ | ||
119 | int depth; | ||
120 | int flags; | ||
121 | u32 cxformat; | ||
122 | }; | ||
98 | enum cx231xx_mode { | 123 | enum cx231xx_mode { |
99 | CX231XX_SUSPEND, | 124 | CX231XX_SUSPEND, |
100 | CX231XX_ANALOG_MODE, | 125 | CX231XX_ANALOG_MODE, |
@@ -114,7 +139,7 @@ enum cx231xx_stream_state { | |||
114 | 139 | ||
115 | struct cx231xx; | 140 | struct cx231xx; |
116 | 141 | ||
117 | struct cx231xx_usb_isoc_ctl { | 142 | struct cx231xx_isoc_ctl { |
118 | /* max packet size of isoc transaction */ | 143 | /* max packet size of isoc transaction */ |
119 | int max_pkt_size; | 144 | int max_pkt_size; |
120 | 145 | ||
@@ -148,6 +173,40 @@ struct cx231xx_usb_isoc_ctl { | |||
148 | int (*isoc_copy) (struct cx231xx *dev, struct urb *urb); | 173 | int (*isoc_copy) (struct cx231xx *dev, struct urb *urb); |
149 | }; | 174 | }; |
150 | 175 | ||
176 | struct cx231xx_bulk_ctl { | ||
177 | /* max packet size of bulk transaction */ | ||
178 | int max_pkt_size; | ||
179 | |||
180 | /* number of allocated urbs */ | ||
181 | int num_bufs; | ||
182 | |||
183 | /* urb for bulk transfers */ | ||
184 | struct urb **urb; | ||
185 | |||
186 | /* transfer buffers for bulk transfer */ | ||
187 | char **transfer_buffer; | ||
188 | |||
189 | /* Last buffer command and region */ | ||
190 | u8 cmd; | ||
191 | int pos, size, pktsize; | ||
192 | |||
193 | /* Last field: ODD or EVEN? */ | ||
194 | int field; | ||
195 | |||
196 | /* Stores incomplete commands */ | ||
197 | u32 tmp_buf; | ||
198 | int tmp_buf_len; | ||
199 | |||
200 | /* Stores already requested buffers */ | ||
201 | struct cx231xx_buffer *buf; | ||
202 | |||
203 | /* Stores the number of received fields */ | ||
204 | int nfields; | ||
205 | |||
206 | /* bulk urb callback */ | ||
207 | int (*bulk_copy) (struct cx231xx *dev, struct urb *urb); | ||
208 | }; | ||
209 | |||
151 | struct cx231xx_fmt { | 210 | struct cx231xx_fmt { |
152 | char *name; | 211 | char *name; |
153 | u32 fourcc; /* v4l2 format id */ | 212 | u32 fourcc; /* v4l2 format id */ |
@@ -165,6 +224,11 @@ struct cx231xx_buffer { | |||
165 | int receiving; | 224 | int receiving; |
166 | }; | 225 | }; |
167 | 226 | ||
227 | enum ps_package_head { | ||
228 | CX231XX_NEED_ADD_PS_PACKAGE_HEAD = 0, | ||
229 | CX231XX_NONEED_PS_PACKAGE_HEAD | ||
230 | }; | ||
231 | |||
168 | struct cx231xx_dmaqueue { | 232 | struct cx231xx_dmaqueue { |
169 | struct list_head active; | 233 | struct list_head active; |
170 | struct list_head queued; | 234 | struct list_head queued; |
@@ -181,6 +245,14 @@ struct cx231xx_dmaqueue { | |||
181 | u32 lines_completed; | 245 | u32 lines_completed; |
182 | u8 field1_done; | 246 | u8 field1_done; |
183 | u32 lines_per_field; | 247 | u32 lines_per_field; |
248 | |||
249 | /*Mpeg2 control buffer*/ | ||
250 | u8 *p_left_data; | ||
251 | u32 left_data_count; | ||
252 | u8 mpeg_buffer_done; | ||
253 | u32 mpeg_buffer_completed; | ||
254 | enum ps_package_head add_ps_package_head; | ||
255 | char ps_head[10]; | ||
184 | }; | 256 | }; |
185 | 257 | ||
186 | /* inputs */ | 258 | /* inputs */ |
@@ -259,9 +331,10 @@ struct cx231xx_board { | |||
259 | struct cx231xx_reg_seq *dvb_gpio; | 331 | struct cx231xx_reg_seq *dvb_gpio; |
260 | struct cx231xx_reg_seq *suspend_gpio; | 332 | struct cx231xx_reg_seq *suspend_gpio; |
261 | struct cx231xx_reg_seq *tuner_gpio; | 333 | struct cx231xx_reg_seq *tuner_gpio; |
262 | u8 tuner_sif_gpio; | 334 | /* Negative means don't use it */ |
263 | u8 tuner_scl_gpio; | 335 | s8 tuner_sif_gpio; |
264 | u8 tuner_sda_gpio; | 336 | s8 tuner_scl_gpio; |
337 | s8 tuner_sda_gpio; | ||
265 | 338 | ||
266 | /* PIN ctrl */ | 339 | /* PIN ctrl */ |
267 | u32 ctl_pin_status_mask; | 340 | u32 ctl_pin_status_mask; |
@@ -279,6 +352,7 @@ struct cx231xx_board { | |||
279 | unsigned char xclk, i2c_speed; | 352 | unsigned char xclk, i2c_speed; |
280 | 353 | ||
281 | enum cx231xx_decoder decoder; | 354 | enum cx231xx_decoder decoder; |
355 | int output_mode; | ||
282 | 356 | ||
283 | struct cx231xx_input input[MAX_CX231XX_INPUT]; | 357 | struct cx231xx_input input[MAX_CX231XX_INPUT]; |
284 | struct cx231xx_input radio; | 358 | struct cx231xx_input radio; |
@@ -309,10 +383,8 @@ enum AUDIO_INPUT { | |||
309 | }; | 383 | }; |
310 | 384 | ||
311 | #define CX231XX_AUDIO_BUFS 5 | 385 | #define CX231XX_AUDIO_BUFS 5 |
312 | #define CX231XX_NUM_AUDIO_PACKETS 64 | 386 | #define CX231XX_NUM_AUDIO_PACKETS 16 |
313 | #define CX231XX_CAPTURE_STREAM_EN 1 | 387 | #define CX231XX_ISO_NUM_AUDIO_PACKETS 64 |
314 | #define CX231XX_STOP_AUDIO 0 | ||
315 | #define CX231XX_START_AUDIO 1 | ||
316 | 388 | ||
317 | /* cx231xx extensions */ | 389 | /* cx231xx extensions */ |
318 | #define CX231XX_AUDIO 0x10 | 390 | #define CX231XX_AUDIO 0x10 |
@@ -330,7 +402,7 @@ struct cx231xx_audio { | |||
330 | struct snd_card *sndcard; | 402 | struct snd_card *sndcard; |
331 | 403 | ||
332 | int users, shutdown; | 404 | int users, shutdown; |
333 | enum cx231xx_stream_state capture_stream; | 405 | /* locks */ |
334 | spinlock_t slock; | 406 | spinlock_t slock; |
335 | 407 | ||
336 | int alt; /* alternate */ | 408 | int alt; /* alternate */ |
@@ -350,6 +422,28 @@ struct cx231xx_fh { | |||
350 | struct videobuf_queue vb_vidq; | 422 | struct videobuf_queue vb_vidq; |
351 | 423 | ||
352 | enum v4l2_buf_type type; | 424 | enum v4l2_buf_type type; |
425 | |||
426 | |||
427 | |||
428 | /*following is copyed from cx23885.h*/ | ||
429 | u32 resources; | ||
430 | |||
431 | /* video overlay */ | ||
432 | struct v4l2_window win; | ||
433 | struct v4l2_clip *clips; | ||
434 | unsigned int nclips; | ||
435 | |||
436 | /* video capture */ | ||
437 | struct cx23417_fmt *fmt; | ||
438 | unsigned int width, height; | ||
439 | |||
440 | /* vbi capture */ | ||
441 | struct videobuf_queue vidq; | ||
442 | struct videobuf_queue vbiq; | ||
443 | |||
444 | /* MPEG Encoder specifics ONLY */ | ||
445 | |||
446 | atomic_t v4l_reading; | ||
353 | }; | 447 | }; |
354 | 448 | ||
355 | /*****************************************************************/ | 449 | /*****************************************************************/ |
@@ -403,6 +497,13 @@ struct VENDOR_REQUEST_IN { | |||
403 | u8 *pBuff; | 497 | u8 *pBuff; |
404 | }; | 498 | }; |
405 | 499 | ||
500 | struct cx231xx_tvnorm { | ||
501 | char *name; | ||
502 | v4l2_std_id id; | ||
503 | u32 cxiformat; | ||
504 | u32 cxoformat; | ||
505 | }; | ||
506 | |||
406 | struct cx231xx_ctrl { | 507 | struct cx231xx_ctrl { |
407 | struct v4l2_queryctrl v; | 508 | struct v4l2_queryctrl v; |
408 | u32 off; | 509 | u32 off; |
@@ -424,7 +525,9 @@ enum TRANSFER_TYPE { | |||
424 | struct cx231xx_video_mode { | 525 | struct cx231xx_video_mode { |
425 | /* Isoc control struct */ | 526 | /* Isoc control struct */ |
426 | struct cx231xx_dmaqueue vidq; | 527 | struct cx231xx_dmaqueue vidq; |
427 | struct cx231xx_usb_isoc_ctl isoc_ctl; | 528 | struct cx231xx_isoc_ctl isoc_ctl; |
529 | struct cx231xx_bulk_ctl bulk_ctl; | ||
530 | /* locks */ | ||
428 | spinlock_t slock; | 531 | spinlock_t slock; |
429 | 532 | ||
430 | /* usb transfer */ | 533 | /* usb transfer */ |
@@ -434,6 +537,64 @@ struct cx231xx_video_mode { | |||
434 | unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */ | 537 | unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */ |
435 | u16 end_point_addr; | 538 | u16 end_point_addr; |
436 | }; | 539 | }; |
540 | /* | ||
541 | struct cx23885_dmaqueue { | ||
542 | struct list_head active; | ||
543 | struct list_head queued; | ||
544 | struct timer_list timeout; | ||
545 | struct btcx_riscmem stopper; | ||
546 | u32 count; | ||
547 | }; | ||
548 | */ | ||
549 | struct cx231xx_tsport { | ||
550 | struct cx231xx *dev; | ||
551 | |||
552 | int nr; | ||
553 | int sram_chno; | ||
554 | |||
555 | struct videobuf_dvb_frontends frontends; | ||
556 | |||
557 | /* dma queues */ | ||
558 | |||
559 | u32 ts_packet_size; | ||
560 | u32 ts_packet_count; | ||
561 | |||
562 | int width; | ||
563 | int height; | ||
564 | |||
565 | /* locks */ | ||
566 | spinlock_t slock; | ||
567 | |||
568 | /* registers */ | ||
569 | u32 reg_gpcnt; | ||
570 | u32 reg_gpcnt_ctl; | ||
571 | u32 reg_dma_ctl; | ||
572 | u32 reg_lngth; | ||
573 | u32 reg_hw_sop_ctrl; | ||
574 | u32 reg_gen_ctrl; | ||
575 | u32 reg_bd_pkt_status; | ||
576 | u32 reg_sop_status; | ||
577 | u32 reg_fifo_ovfl_stat; | ||
578 | u32 reg_vld_misc; | ||
579 | u32 reg_ts_clk_en; | ||
580 | u32 reg_ts_int_msk; | ||
581 | u32 reg_ts_int_stat; | ||
582 | u32 reg_src_sel; | ||
583 | |||
584 | /* Default register vals */ | ||
585 | int pci_irqmask; | ||
586 | u32 dma_ctl_val; | ||
587 | u32 ts_int_msk_val; | ||
588 | u32 gen_ctrl_val; | ||
589 | u32 ts_clk_en_val; | ||
590 | u32 src_sel_val; | ||
591 | u32 vld_misc_val; | ||
592 | u32 hw_sop_ctrl_val; | ||
593 | |||
594 | /* Allow a single tsport to have multiple frontends */ | ||
595 | u32 num_frontends; | ||
596 | void *port_priv; | ||
597 | }; | ||
437 | 598 | ||
438 | /* main device struct */ | 599 | /* main device struct */ |
439 | struct cx231xx { | 600 | struct cx231xx { |
@@ -457,6 +618,9 @@ struct cx231xx { | |||
457 | 618 | ||
458 | struct cx231xx_IR *ir; | 619 | struct cx231xx_IR *ir; |
459 | 620 | ||
621 | struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */ | ||
622 | atomic_t stream_started; /* stream should be running if true */ | ||
623 | |||
460 | struct list_head devlist; | 624 | struct list_head devlist; |
461 | 625 | ||
462 | int tuner_type; /* type of the tuner */ | 626 | int tuner_type; /* type of the tuner */ |
@@ -465,7 +629,9 @@ struct cx231xx { | |||
465 | /* I2C adapters: Master 1 & 2 (External) & Master 3 (Internal only) */ | 629 | /* I2C adapters: Master 1 & 2 (External) & Master 3 (Internal only) */ |
466 | struct cx231xx_i2c i2c_bus[3]; | 630 | struct cx231xx_i2c i2c_bus[3]; |
467 | unsigned int xc_fw_load_done:1; | 631 | unsigned int xc_fw_load_done:1; |
632 | /* locks */ | ||
468 | struct mutex gpio_i2c_lock; | 633 | struct mutex gpio_i2c_lock; |
634 | struct mutex i2c_lock; | ||
469 | 635 | ||
470 | /* video for linux */ | 636 | /* video for linux */ |
471 | int users; /* user count for exclusive use */ | 637 | int users; /* user count for exclusive use */ |
@@ -479,8 +645,6 @@ struct cx231xx { | |||
479 | /* frame properties */ | 645 | /* frame properties */ |
480 | int width; /* current frame width */ | 646 | int width; /* current frame width */ |
481 | int height; /* current frame height */ | 647 | int height; /* current frame height */ |
482 | unsigned hscale; /* horizontal scale factor (see datasheet) */ | ||
483 | unsigned vscale; /* vertical scale factor (see datasheet) */ | ||
484 | int interlaced; /* 1=interlace fileds, 0=just top fileds */ | 648 | int interlaced; /* 1=interlace fileds, 0=just top fileds */ |
485 | 649 | ||
486 | struct cx231xx_audio adev; | 650 | struct cx231xx_audio adev; |
@@ -505,6 +669,8 @@ struct cx231xx { | |||
505 | struct cx231xx_video_mode sliced_cc_mode; | 669 | struct cx231xx_video_mode sliced_cc_mode; |
506 | struct cx231xx_video_mode ts1_mode; | 670 | struct cx231xx_video_mode ts1_mode; |
507 | 671 | ||
672 | atomic_t devlist_count; | ||
673 | |||
508 | struct usb_device *udev; /* the usb device */ | 674 | struct usb_device *udev; /* the usb device */ |
509 | char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ | 675 | char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ |
510 | 676 | ||
@@ -550,8 +716,24 @@ struct cx231xx { | |||
550 | u8 vbi_or_sliced_cc_mode; /* 0 - vbi ; 1 - sliced cc mode */ | 716 | u8 vbi_or_sliced_cc_mode; /* 0 - vbi ; 1 - sliced cc mode */ |
551 | enum cx231xx_std_mode std_mode; /* 0 - Air; 1 - cable */ | 717 | enum cx231xx_std_mode std_mode; /* 0 - Air; 1 - cable */ |
552 | 718 | ||
719 | /*mode: digital=1 or analog=0*/ | ||
720 | u8 mode_tv; | ||
721 | |||
722 | u8 USE_ISO; | ||
723 | struct cx231xx_tvnorm encodernorm; | ||
724 | struct cx231xx_tsport ts1, ts2; | ||
725 | struct cx2341x_mpeg_params mpeg_params; | ||
726 | struct video_device *v4l_device; | ||
727 | atomic_t v4l_reader_count; | ||
728 | u32 freq; | ||
729 | unsigned int input; | ||
730 | u32 cx23417_mailbox; | ||
731 | u32 __iomem *lmmio; | ||
732 | u8 __iomem *bmmio; | ||
553 | }; | 733 | }; |
554 | 734 | ||
735 | extern struct list_head cx231xx_devlist; | ||
736 | |||
555 | #define cx25840_call(cx231xx, o, f, args...) \ | 737 | #define cx25840_call(cx231xx, o, f, args...) \ |
556 | v4l2_subdev_call(cx231xx->sd_cx25840, o, f, ##args) | 738 | v4l2_subdev_call(cx231xx->sd_cx25840, o, f, ##args) |
557 | #define tuner_call(cx231xx, o, f, args...) \ | 739 | #define tuner_call(cx231xx, o, f, args...) \ |
@@ -577,6 +759,10 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus); | |||
577 | int cx231xx_i2c_unregister(struct cx231xx_i2c *bus); | 759 | int cx231xx_i2c_unregister(struct cx231xx_i2c *bus); |
578 | 760 | ||
579 | /* Internal block control functions */ | 761 | /* Internal block control functions */ |
762 | int cx231xx_read_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, | ||
763 | u8 saddr_len, u32 *data, u8 data_len, int master); | ||
764 | int cx231xx_write_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr, | ||
765 | u8 saddr_len, u32 data, u8 data_len, int master); | ||
580 | int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, | 766 | int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, |
581 | u16 saddr, u8 saddr_len, u32 *data, u8 data_len); | 767 | u16 saddr, u8 saddr_len, u32 *data, u8 data_len); |
582 | int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, | 768 | int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, |
@@ -588,6 +774,9 @@ int cx231xx_read_modify_write_i2c_dword(struct cx231xx *dev, u8 dev_addr, | |||
588 | u16 saddr, u32 mask, u32 value); | 774 | u16 saddr, u32 mask, u32 value); |
589 | u32 cx231xx_set_field(u32 field_mask, u32 data); | 775 | u32 cx231xx_set_field(u32 field_mask, u32 data); |
590 | 776 | ||
777 | /*verve r/w*/ | ||
778 | void initGPIO(struct cx231xx *dev); | ||
779 | void uninitGPIO(struct cx231xx *dev); | ||
591 | /* afe related functions */ | 780 | /* afe related functions */ |
592 | int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count); | 781 | int cx231xx_afe_init_super_block(struct cx231xx *dev, u32 ref_count); |
593 | int cx231xx_afe_init_channels(struct cx231xx *dev); | 782 | int cx231xx_afe_init_channels(struct cx231xx *dev); |
@@ -607,6 +796,19 @@ int cx231xx_i2s_blk_set_audio_input(struct cx231xx *dev, u8 audio_input); | |||
607 | /* DIF related functions */ | 796 | /* DIF related functions */ |
608 | int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode, | 797 | int cx231xx_dif_configure_C2HH_for_low_IF(struct cx231xx *dev, u32 mode, |
609 | u32 function_mode, u32 standard); | 798 | u32 function_mode, u32 standard); |
799 | void cx231xx_set_Colibri_For_LowIF(struct cx231xx *dev, u32 if_freq, | ||
800 | u8 spectral_invert, u32 mode); | ||
801 | u32 cx231xx_Get_Colibri_CarrierOffset(u32 mode, u32 standerd); | ||
802 | void cx231xx_set_DIF_bandpass(struct cx231xx *dev, u32 if_freq, | ||
803 | u8 spectral_invert, u32 mode); | ||
804 | void cx231xx_Setup_AFE_for_LowIF(struct cx231xx *dev); | ||
805 | void reset_s5h1432_demod(struct cx231xx *dev); | ||
806 | void cx231xx_dump_HH_reg(struct cx231xx *dev); | ||
807 | void update_HH_register_after_set_DIF(struct cx231xx *dev); | ||
808 | void cx231xx_dump_SC_reg(struct cx231xx *dev); | ||
809 | |||
810 | |||
811 | |||
610 | int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard); | 812 | int cx231xx_dif_set_standard(struct cx231xx *dev, u32 standard); |
611 | int cx231xx_tuner_pre_channel_change(struct cx231xx *dev); | 813 | int cx231xx_tuner_pre_channel_change(struct cx231xx *dev); |
612 | int cx231xx_tuner_post_channel_change(struct cx231xx *dev); | 814 | int cx231xx_tuner_post_channel_change(struct cx231xx *dev); |
@@ -672,15 +874,28 @@ int cx231xx_set_audio_decoder_input(struct cx231xx *dev, | |||
672 | enum AUDIO_INPUT audio_input); | 874 | enum AUDIO_INPUT audio_input); |
673 | 875 | ||
674 | int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type); | 876 | int cx231xx_capture_start(struct cx231xx *dev, int start, u8 media_type); |
675 | int cx231xx_resolution_set(struct cx231xx *dev); | ||
676 | int cx231xx_set_video_alternate(struct cx231xx *dev); | 877 | int cx231xx_set_video_alternate(struct cx231xx *dev); |
677 | int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt); | 878 | int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt); |
879 | int is_fw_load(struct cx231xx *dev); | ||
880 | int cx231xx_check_fw(struct cx231xx *dev); | ||
678 | int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | 881 | int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, |
679 | int num_bufs, int max_pkt_size, | 882 | int num_bufs, int max_pkt_size, |
680 | int (*isoc_copy) (struct cx231xx *dev, | 883 | int (*isoc_copy) (struct cx231xx *dev, |
681 | struct urb *urb)); | 884 | struct urb *urb)); |
885 | int cx231xx_init_bulk(struct cx231xx *dev, int max_packets, | ||
886 | int num_bufs, int max_pkt_size, | ||
887 | int (*bulk_copy) (struct cx231xx *dev, | ||
888 | struct urb *urb)); | ||
889 | void cx231xx_stop_TS1(struct cx231xx *dev); | ||
890 | void cx231xx_start_TS1(struct cx231xx *dev); | ||
682 | void cx231xx_uninit_isoc(struct cx231xx *dev); | 891 | void cx231xx_uninit_isoc(struct cx231xx *dev); |
892 | void cx231xx_uninit_bulk(struct cx231xx *dev); | ||
683 | int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode); | 893 | int cx231xx_set_mode(struct cx231xx *dev, enum cx231xx_mode set_mode); |
894 | int cx231xx_unmute_audio(struct cx231xx *dev); | ||
895 | int cx231xx_ep5_bulkout(struct cx231xx *dev, u8 *firmware, u16 size); | ||
896 | void cx231xx_disable656(struct cx231xx *dev); | ||
897 | void cx231xx_enable656(struct cx231xx *dev); | ||
898 | int cx231xx_demod_reset(struct cx231xx *dev); | ||
684 | int cx231xx_gpio_set(struct cx231xx *dev, struct cx231xx_reg_seq *gpio); | 899 | int cx231xx_gpio_set(struct cx231xx *dev, struct cx231xx_reg_seq *gpio); |
685 | 900 | ||
686 | /* Device list functions */ | 901 | /* Device list functions */ |
@@ -712,7 +927,7 @@ int cx231xx_power_suspend(struct cx231xx *dev); | |||
712 | int cx231xx_init_ctrl_pin_status(struct cx231xx *dev); | 927 | int cx231xx_init_ctrl_pin_status(struct cx231xx *dev); |
713 | int cx231xx_set_agc_analog_digital_mux_select(struct cx231xx *dev, | 928 | int cx231xx_set_agc_analog_digital_mux_select(struct cx231xx *dev, |
714 | u8 analog_or_digital); | 929 | u8 analog_or_digital); |
715 | int cx231xx_enable_i2c_for_tuner(struct cx231xx *dev, u8 I2CIndex); | 930 | int cx231xx_enable_i2c_port_3(struct cx231xx *dev, bool is_port_3); |
716 | 931 | ||
717 | /* video audio decoder related functions */ | 932 | /* video audio decoder related functions */ |
718 | void video_mux(struct cx231xx *dev, int index); | 933 | void video_mux(struct cx231xx *dev, int index); |
@@ -733,12 +948,11 @@ extern void cx231xx_card_setup(struct cx231xx *dev); | |||
733 | extern struct cx231xx_board cx231xx_boards[]; | 948 | extern struct cx231xx_board cx231xx_boards[]; |
734 | extern struct usb_device_id cx231xx_id_table[]; | 949 | extern struct usb_device_id cx231xx_id_table[]; |
735 | extern const unsigned int cx231xx_bcount; | 950 | extern const unsigned int cx231xx_bcount; |
736 | void cx231xx_register_i2c_ir(struct cx231xx *dev); | ||
737 | int cx231xx_tuner_callback(void *ptr, int component, int command, int arg); | 951 | int cx231xx_tuner_callback(void *ptr, int component, int command, int arg); |
738 | 952 | ||
739 | /* Provided by cx231xx-input.c */ | 953 | /* cx23885-417.c */ |
740 | int cx231xx_ir_init(struct cx231xx *dev); | 954 | extern int cx231xx_417_register(struct cx231xx *dev); |
741 | int cx231xx_ir_fini(struct cx231xx *dev); | 955 | extern void cx231xx_417_unregister(struct cx231xx *dev); |
742 | 956 | ||
743 | /* printk macros */ | 957 | /* printk macros */ |
744 | 958 | ||