#include "cx231xx.h"
#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/bitmap.h>
#include <linux/i2c.h>
#include <linux/mm.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/drv-intf/msp3400.h>
#include <media/tuner.h>
#include "cx231xx-vbi.h"
static inline void print_err_status(struct cx231xx *dev, int packet, int status)
{ … }
static inline int cx231xx_isoc_vbi_copy(struct cx231xx *dev, struct urb *urb)
{ … }
static int vbi_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers, unsigned int *nplanes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int vbi_buf_prepare(struct vb2_buffer *vb)
{ … }
static void vbi_buf_queue(struct vb2_buffer *vb)
{ … }
static void return_all_buffers(struct cx231xx *dev,
enum vb2_buffer_state state)
{ … }
static int vbi_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void vbi_stop_streaming(struct vb2_queue *vq)
{ … }
struct vb2_ops cx231xx_vbi_qops = …;
static void cx231xx_irq_vbi_callback(struct urb *urb)
{ … }
void cx231xx_uninit_vbi_isoc(struct cx231xx *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets,
int num_bufs, int max_pkt_size,
int (*bulk_copy) (struct cx231xx *dev,
struct urb *urb))
{ … }
EXPORT_SYMBOL_GPL(…);
u32 cx231xx_get_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 sav_eav, u8 *p_buffer, u32 buffer_size)
{ … }
static inline void vbi_buffer_filled(struct cx231xx *dev,
struct cx231xx_dmaqueue *dma_q,
struct cx231xx_buffer *buf)
{ … }
u32 cx231xx_copy_vbi_line(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 *p_line, u32 length, int field_number)
{ … }
static inline void get_next_vbi_buf(struct cx231xx_dmaqueue *dma_q,
struct cx231xx_buffer **buf)
{ … }
void cx231xx_reset_vbi_buffer(struct cx231xx *dev,
struct cx231xx_dmaqueue *dma_q)
{ … }
int cx231xx_do_vbi_copy(struct cx231xx *dev, struct cx231xx_dmaqueue *dma_q,
u8 *p_buffer, u32 bytes_to_copy)
{ … }
u8 cx231xx_is_vbi_buffer_done(struct cx231xx *dev,
struct cx231xx_dmaqueue *dma_q)
{ … }