Go to the documentation of this file.
27 #include <linux/pci.h>
28 #include <linux/i2c.h>
31 #include <linux/sched.h>
32 #include <linux/kdev_t.h>
48 #include <linux/version.h>
51 #define CX25821_VERSION_CODE KERNEL_VERSION(0, 0, 106)
54 #define NO_SYNC_LINE (-1U)
56 #define CX25821_MAXBOARDS 2
60 #define LINE_SIZE_D1 1440
63 #define MAX_DECODERS 8
64 #define MAX_ENCODERS 2
65 #define QUAD_DECODERS 4
66 #define MAX_CAMERAS 16
69 #define MAX_CX25821_INPUT 8
70 #define INPUT(nr) (&cx25821_boards[dev->board].input[nr])
71 #define RESOURCE_VIDEO0 1
72 #define RESOURCE_VIDEO1 2
73 #define RESOURCE_VIDEO2 4
74 #define RESOURCE_VIDEO3 8
75 #define RESOURCE_VIDEO4 16
76 #define RESOURCE_VIDEO5 32
77 #define RESOURCE_VIDEO6 64
78 #define RESOURCE_VIDEO7 128
79 #define RESOURCE_VIDEO8 256
80 #define RESOURCE_VIDEO9 512
81 #define RESOURCE_VIDEO10 1024
82 #define RESOURCE_VIDEO11 2048
83 #define RESOURCE_VIDEO_IOCTL 4096
85 #define BUFFER_TIMEOUT (HZ)
87 #define UNKNOWN_BOARD 0
88 #define CX25821_BOARD 1
91 #define CX25821_NORMS (\
92 V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_JP | V4L2_STD_NTSC_M_KR | \
93 V4L2_STD_PAL_BG | V4L2_STD_PAL_DK | V4L2_STD_PAL_I | \
94 V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_H | \
97 #define CX25821_BOARD_CONEXANT_ATHENA10 1
98 #define MAX_VID_CHANNEL_NUM 12
99 #define VID_CHANNEL_NUM 8
100 #define CX25821_NR_INPUT 2
444 #define cx25821_call_all(dev, o, f, args...) \
445 v4l2_device_call_all(&dev->v4l2_dev, 0, o, f, ##args)
467 #define VID_UPSTREAM_SRAM_CHANNEL_I SRAM_CH09
468 #define VID_UPSTREAM_SRAM_CHANNEL_J SRAM_CH10
469 #define AUDIO_UPSTREAM_SRAM_CHANNEL_B SRAM_CH11
470 #define VIDEO_IOCTL_CH 11
508 #define STATUS_SUCCESS 0
509 #define STATUS_UNSUCCESSFUL -1
511 #define cx_read(reg) readl(dev->lmmio + ((reg)>>2))
512 #define cx_write(reg, value) writel((value), dev->lmmio + ((reg)>>2))
514 #define cx_andor(reg, mask, value) \
515 writel((readl(dev->lmmio+((reg)>>2)) & ~(mask)) |\
516 ((value) & (mask)), dev->lmmio+((reg)>>2))
518 #define cx_set(reg, bit) cx_andor((reg), (bit), (bit))
519 #define cx_clear(reg, bit) cx_andor((reg), (bit), 0)
521 #define Set_GPIO_Bit(Bit) (1 << Bit)
522 #define Clear_GPIO_Bit(Bit) (~(1 << Bit))
524 #define CX25821_ERR(fmt, args...) \
525 pr_err("(%d): " fmt, dev->board, ##args)
526 #define CX25821_WARN(fmt, args...) \
527 pr_warn("(%d): " fmt, dev->board, ##args)
528 #define CX25821_INFO(fmt, args...) \
529 pr_info("(%d): " fmt, dev->board, ##args)
539 int pin_number,
int pin_logic_value);
559 unsigned int top_offset,
560 unsigned int bottom_offset,
562 unsigned int padding,
unsigned int lines);
567 unsigned int lines,
unsigned int lpi);
583 unsigned int bpl,
u32 risc);
607 unsigned int bpl,
u32 risc);