#ifndef CX25821_H_
#define CX25821_H_
#include <linux/pci.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/kdev_t.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-sg.h>
#include "cx25821-reg.h"
#include "cx25821-medusa-reg.h"
#include "cx25821-sram.h"
#include "cx25821-audio.h"
#include <linux/mutex.h>
#define UNSET …
#define NO_SYNC_LINE …
#define CX25821_MAXBOARDS …
#define LINE_SIZE_D1 …
#define MAX_DECODERS …
#define MAX_ENCODERS …
#define QUAD_DECODERS …
#define MAX_CAMERAS …
#define MAX_CX25821_INPUT …
#define RESOURCE_VIDEO0 …
#define RESOURCE_VIDEO1 …
#define RESOURCE_VIDEO2 …
#define RESOURCE_VIDEO3 …
#define RESOURCE_VIDEO4 …
#define RESOURCE_VIDEO5 …
#define RESOURCE_VIDEO6 …
#define RESOURCE_VIDEO7 …
#define RESOURCE_VIDEO8 …
#define RESOURCE_VIDEO9 …
#define RESOURCE_VIDEO10 …
#define RESOURCE_VIDEO11 …
#define BUFFER_TIMEOUT …
#define UNKNOWN_BOARD …
#define CX25821_BOARD …
#define CX25821_NORMS …
#define CX25821_BOARD_CONEXANT_ATHENA10 …
#define MAX_VID_CHANNEL_NUM …
#define MAX_VID_CAP_CHANNEL_NUM …
#define VID_CHANNEL_NUM …
struct cx25821_fmt { … };
struct cx25821_tvnorm { … };
enum cx25821_src_sel_type { … };
struct cx25821_riscmem { … };
struct cx25821_buffer { … };
enum port { … };
struct cx25821_board { … };
struct cx25821_i2c { … };
struct cx25821_dmaqueue { … };
struct cx25821_dev;
struct cx25821_channel;
struct cx25821_video_out_data { … };
struct cx25821_channel { … };
struct snd_card;
struct cx25821_dev { … };
static inline struct cx25821_dev *get_cx25821(struct v4l2_device *v4l2_dev)
{ … }
extern struct cx25821_board cx25821_boards[];
#define SRAM_CH00 …
#define SRAM_CH01 …
#define SRAM_CH02 …
#define SRAM_CH03 …
#define SRAM_CH04 …
#define SRAM_CH05 …
#define SRAM_CH06 …
#define SRAM_CH07 …
#define SRAM_CH08 …
#define SRAM_CH09 …
#define SRAM_CH10 …
#define SRAM_CH11 …
#define VID_UPSTREAM_SRAM_CHANNEL_I …
#define VID_UPSTREAM_SRAM_CHANNEL_J …
#define AUDIO_UPSTREAM_SRAM_CHANNEL_B …
struct sram_channel { … };
extern const struct sram_channel cx25821_sram_channels[];
#define cx_read(reg) …
#define cx_write(reg, value) …
#define cx_andor(reg, mask, value) …
#define cx_set(reg, bit) …
#define cx_clear(reg, bit) …
#define Set_GPIO_Bit(Bit) …
#define Clear_GPIO_Bit(Bit) …
#define CX25821_ERR(fmt, args...) …
#define CX25821_WARN(fmt, args...) …
#define CX25821_INFO(fmt, args...) …
extern int cx25821_i2c_register(struct cx25821_i2c *bus);
extern int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value);
extern int cx25821_i2c_write(struct cx25821_i2c *bus, u16 reg_addr, int value);
extern int cx25821_i2c_unregister(struct cx25821_i2c *bus);
extern void cx25821_gpio_init(struct cx25821_dev *dev);
extern void cx25821_set_gpiopin_direction(struct cx25821_dev *dev,
int pin_number, int pin_logic_value);
extern int medusa_video_init(struct cx25821_dev *dev);
extern int medusa_set_videostandard(struct cx25821_dev *dev);
extern void medusa_set_resolution(struct cx25821_dev *dev, int width,
int decoder_select);
extern int medusa_set_brightness(struct cx25821_dev *dev, int brightness,
int decoder);
extern int medusa_set_contrast(struct cx25821_dev *dev, int contrast,
int decoder);
extern int medusa_set_hue(struct cx25821_dev *dev, int hue, int decoder);
extern int medusa_set_saturation(struct cx25821_dev *dev, int saturation,
int decoder);
extern int cx25821_sram_channel_setup(struct cx25821_dev *dev,
const struct sram_channel *ch, unsigned int bpl,
u32 risc);
extern int cx25821_riscmem_alloc(struct pci_dev *pci,
struct cx25821_riscmem *risc,
unsigned int size);
extern int cx25821_risc_buffer(struct pci_dev *pci, struct cx25821_riscmem *risc,
struct scatterlist *sglist,
unsigned int top_offset,
unsigned int bottom_offset,
unsigned int bpl,
unsigned int padding, unsigned int lines);
extern int cx25821_risc_databuffer_audio(struct pci_dev *pci,
struct cx25821_riscmem *risc,
struct scatterlist *sglist,
unsigned int bpl,
unsigned int lines, unsigned int lpi);
extern void cx25821_free_buffer(struct cx25821_dev *dev,
struct cx25821_buffer *buf);
extern void cx25821_sram_channel_dump(struct cx25821_dev *dev,
const struct sram_channel *ch);
extern void cx25821_sram_channel_dump_audio(struct cx25821_dev *dev,
const struct sram_channel *ch);
extern struct cx25821_dev *cx25821_dev_get(struct pci_dev *pci);
extern void cx25821_print_irqbits(char *name, char *tag, char **strings,
int len, u32 bits, u32 mask);
extern void cx25821_dev_unregister(struct cx25821_dev *dev);
extern int cx25821_sram_channel_setup_audio(struct cx25821_dev *dev,
const struct sram_channel *ch,
unsigned int bpl, u32 risc);
extern void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel,
u32 format);
#endif