aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx.h')
-rw-r--r--drivers/media/video/cx231xx/cx231xx.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index d067df9b81e7..72bbea2bcd56 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -34,7 +34,8 @@
34 34
35#include <media/videobuf-vmalloc.h> 35#include <media/videobuf-vmalloc.h>
36#include <media/v4l2-device.h> 36#include <media/v4l2-device.h>
37#include <media/ir-core.h> 37#include <media/rc-core.h>
38#include <media/ir-kbd-i2c.h>
38#include <media/videobuf-dvb.h> 39#include <media/videobuf-dvb.h>
39 40
40#include "cx231xx-reg.h" 41#include "cx231xx-reg.h"
@@ -62,6 +63,7 @@
62#define CX231XX_BOARD_CNXT_RDU_250 7 63#define CX231XX_BOARD_CNXT_RDU_250 7
63#define CX231XX_BOARD_HAUPPAUGE_EXETER 8 64#define CX231XX_BOARD_HAUPPAUGE_EXETER 8
64#define CX231XX_BOARD_HAUPPAUGE_USBLIVE2 9 65#define CX231XX_BOARD_HAUPPAUGE_USBLIVE2 9
66#define CX231XX_BOARD_PV_PLAYTV_USB_HYBRID 10
65 67
66/* Limits minimum and default number of buffers */ 68/* Limits minimum and default number of buffers */
67#define CX231XX_MIN_BUF 4 69#define CX231XX_MIN_BUF 4
@@ -344,6 +346,10 @@ struct cx231xx_board {
344 /* i2c masters */ 346 /* i2c masters */
345 u8 tuner_i2c_master; 347 u8 tuner_i2c_master;
346 u8 demod_i2c_master; 348 u8 demod_i2c_master;
349 u8 ir_i2c_master;
350
351 /* for devices with I2C chips for IR */
352 char *rc_map_name;
347 353
348 unsigned int max_range_640_480:1; 354 unsigned int max_range_640_480:1;
349 unsigned int has_dvb:1; 355 unsigned int has_dvb:1;
@@ -356,7 +362,7 @@ struct cx231xx_board {
356 362
357 struct cx231xx_input input[MAX_CX231XX_INPUT]; 363 struct cx231xx_input input[MAX_CX231XX_INPUT];
358 struct cx231xx_input radio; 364 struct cx231xx_input radio;
359 struct ir_scancode_table *ir_codes; 365 struct rc_map *ir_codes;
360}; 366};
361 367
362/* device states */ 368/* device states */
@@ -605,6 +611,9 @@ struct cx231xx {
605 611
606 struct cx231xx_board board; 612 struct cx231xx_board board;
607 613
614 /* For I2C IR support */
615 struct IR_i2c_init_data init_data;
616
608 unsigned int stream_on:1; /* Locks streams */ 617 unsigned int stream_on:1; /* Locks streams */
609 unsigned int vbi_stream_on:1; /* Locks streams for VBI */ 618 unsigned int vbi_stream_on:1; /* Locks streams for VBI */
610 unsigned int has_audio_class:1; 619 unsigned int has_audio_class:1;
@@ -616,8 +625,6 @@ struct cx231xx {
616 struct v4l2_subdev *sd_cx25840; 625 struct v4l2_subdev *sd_cx25840;
617 struct v4l2_subdev *sd_tuner; 626 struct v4l2_subdev *sd_tuner;
618 627
619 struct cx231xx_IR *ir;
620
621 struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */ 628 struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */
622 atomic_t stream_started; /* stream should be running if true */ 629 atomic_t stream_started; /* stream should be running if true */
623 630
@@ -954,6 +961,17 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg);
954extern int cx231xx_417_register(struct cx231xx *dev); 961extern int cx231xx_417_register(struct cx231xx *dev);
955extern void cx231xx_417_unregister(struct cx231xx *dev); 962extern void cx231xx_417_unregister(struct cx231xx *dev);
956 963
964/* cx23885-input.c */
965
966#if defined(CONFIG_VIDEO_CX231XX_RC)
967int cx231xx_ir_init(struct cx231xx *dev);
968void cx231xx_ir_exit(struct cx231xx *dev);
969#else
970#define cx231xx_ir_init(dev) (0)
971#define cx231xx_ir_exit(dev) (0)
972#endif
973
974
957/* printk macros */ 975/* printk macros */
958 976
959#define cx231xx_err(fmt, arg...) do {\ 977#define cx231xx_err(fmt, arg...) do {\