#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/timer.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <sound/pcm.h>
#include "tw686x-regs.h"
#define TYPE_MAX_CHANNELS …
#define TYPE_SECOND_GEN …
#define TW686X_DEF_PHASE_REF …
#define TW686X_AUDIO_PAGE_MAX …
#define TW686X_AUDIO_PERIODS_MIN …
#define TW686X_AUDIO_PERIODS_MAX …
#define TW686X_DMA_MODE_MEMCPY …
#define TW686X_DMA_MODE_CONTIG …
#define TW686X_DMA_MODE_SG …
struct tw686x_format { … };
struct tw686x_dma_desc { … };
struct tw686x_sg_desc { … };
struct tw686x_audio_buf { … };
struct tw686x_v4l2_buf { … };
struct tw686x_audio_channel { … };
struct tw686x_video_channel { … };
struct tw686x_dma_ops { … };
struct tw686x_dev { … };
static inline uint32_t reg_read(struct tw686x_dev *dev, unsigned int reg)
{ … }
static inline void reg_write(struct tw686x_dev *dev, unsigned int reg,
uint32_t value)
{ … }
static inline unsigned int max_channels(struct tw686x_dev *dev)
{ … }
static inline unsigned is_second_gen(struct tw686x_dev *dev)
{ … }
void tw686x_enable_channel(struct tw686x_dev *dev, unsigned int channel);
void tw686x_disable_channel(struct tw686x_dev *dev, unsigned int channel);
int tw686x_video_init(struct tw686x_dev *dev);
void tw686x_video_free(struct tw686x_dev *dev);
void tw686x_video_irq(struct tw686x_dev *dev, unsigned long requests,
unsigned int pb_status, unsigned int fifo_status,
unsigned int *reset_ch);
int tw686x_audio_init(struct tw686x_dev *dev);
void tw686x_audio_free(struct tw686x_dev *dev);
void tw686x_audio_irq(struct tw686x_dev *dev, unsigned long requests,
unsigned int pb_status);