2008-04-19 08:34:00 +08:00
|
|
|
/*
|
|
|
|
* Driver for the Auvitek AU0828 USB bridge
|
|
|
|
*
|
2008-09-04 04:12:12 +08:00
|
|
|
* Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
|
2008-04-19 08:34:00 +08:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
*
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
2014-08-10 08:47:17 +08:00
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
#include <linux/usb.h>
|
|
|
|
#include <linux/i2c.h>
|
|
|
|
#include <linux/i2c-algo-bit.h>
|
2008-03-30 06:53:07 +08:00
|
|
|
#include <media/tveeprom.h>
|
2008-04-19 08:34:00 +08:00
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
/* Analog */
|
|
|
|
#include <linux/videodev2.h>
|
[media] media: videobuf2: Restructure vb2_buffer
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.
Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
<snip>
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}
Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
<snip>
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
<snip>
};
v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;
__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};
Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-22 21:30:30 +08:00
|
|
|
#include <media/videobuf2-v4l2.h>
|
2015-01-30 00:41:32 +08:00
|
|
|
#include <media/videobuf2-vmalloc.h>
|
2009-03-11 14:01:04 +08:00
|
|
|
#include <media/v4l2-device.h>
|
2013-02-15 19:55:41 +08:00
|
|
|
#include <media/v4l2-ctrls.h>
|
2013-02-15 20:14:00 +08:00
|
|
|
#include <media/v4l2-fh.h>
|
2015-06-09 09:20:46 +08:00
|
|
|
#include <media/media-device.h>
|
2009-03-11 14:00:40 +08:00
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
/* DVB */
|
|
|
|
#include "demux.h"
|
|
|
|
#include "dmxdev.h"
|
|
|
|
#include "dvb_demux.h"
|
|
|
|
#include "dvb_frontend.h"
|
|
|
|
#include "dvb_net.h"
|
|
|
|
#include "dvbdev.h"
|
|
|
|
|
|
|
|
#include "au0828-reg.h"
|
|
|
|
#include "au0828-cards.h"
|
|
|
|
|
|
|
|
#define URB_COUNT 16
|
|
|
|
#define URB_BUFSIZE (0xe522)
|
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
/* Analog constants */
|
|
|
|
#define NTSC_STD_W 720
|
|
|
|
#define NTSC_STD_H 480
|
|
|
|
|
|
|
|
#define AU0828_INTERLACED_DEFAULT 1
|
|
|
|
#define V4L2_CID_PRIVATE_SHARPNESS (V4L2_CID_PRIVATE_BASE + 0)
|
|
|
|
|
|
|
|
/* Defination for AU0828 USB transfer */
|
|
|
|
#define AU0828_MAX_ISO_BUFS 12 /* maybe resize this value in the future */
|
2010-06-25 12:33:39 +08:00
|
|
|
#define AU0828_ISO_PACKETS_PER_URB 128
|
2009-03-11 14:00:40 +08:00
|
|
|
|
|
|
|
#define AU0828_MIN_BUF 4
|
|
|
|
#define AU0828_DEF_BUF 8
|
|
|
|
|
|
|
|
#define AU0828_MAX_INPUT 4
|
|
|
|
|
2010-05-30 04:18:45 +08:00
|
|
|
/* au0828 resource types (used for res_get/res_lock etc */
|
|
|
|
#define AU0828_RESOURCE_VIDEO 0x01
|
|
|
|
#define AU0828_RESOURCE_VBI 0x02
|
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
enum au0828_itype {
|
2009-03-11 14:01:01 +08:00
|
|
|
AU0828_VMUX_UNDEFINED = 0,
|
|
|
|
AU0828_VMUX_COMPOSITE,
|
2009-03-11 14:00:40 +08:00
|
|
|
AU0828_VMUX_SVIDEO,
|
|
|
|
AU0828_VMUX_CABLE,
|
|
|
|
AU0828_VMUX_TELEVISION,
|
|
|
|
AU0828_VMUX_DVB,
|
|
|
|
AU0828_VMUX_DEBUG
|
|
|
|
};
|
|
|
|
|
|
|
|
struct au0828_input {
|
|
|
|
enum au0828_itype type;
|
|
|
|
unsigned int vmux;
|
|
|
|
unsigned int amux;
|
|
|
|
void (*audio_setup) (void *priv, int enable);
|
|
|
|
};
|
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
struct au0828_board {
|
|
|
|
char *name;
|
2009-03-11 14:00:47 +08:00
|
|
|
unsigned int tuner_type;
|
|
|
|
unsigned char tuner_addr;
|
2009-04-01 11:11:31 +08:00
|
|
|
unsigned char i2c_clk_divider;
|
2014-07-25 09:49:02 +08:00
|
|
|
unsigned char has_ir_i2c:1;
|
2014-08-18 19:51:28 +08:00
|
|
|
unsigned char has_analog:1;
|
2009-03-11 14:00:40 +08:00
|
|
|
struct au0828_input input[AU0828_MAX_INPUT];
|
2008-04-19 08:34:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct au0828_dvb {
|
|
|
|
struct mutex lock;
|
|
|
|
struct dvb_adapter adapter;
|
|
|
|
struct dvb_frontend *frontend;
|
|
|
|
struct dvb_demux demux;
|
|
|
|
struct dmxdev dmxdev;
|
|
|
|
struct dmx_frontend fe_hw;
|
|
|
|
struct dmx_frontend fe_mem;
|
|
|
|
struct dvb_net net;
|
|
|
|
int feeding;
|
2014-01-07 12:29:24 +08:00
|
|
|
int start_count;
|
|
|
|
int stop_count;
|
[media] au0828: reset streaming when a new frequency is set
As reported by Trevor, doing several opening/streaming/closing
operations to the demux causes it to fail.
I was able to simulate this bug too. I also noticed that,
sometimes, changing channels with au0828, the same thing
happens.
Most of the issues seem to be due to some hardware bug, that
causes the device to not fill all the URBs allocated. When
the bug happens, the only known fix is to either replug the
device, or to send an USB reset to it.
There's also a hack a the au0828 driver that starts a thread
that tries to reset the device when a package doesn't start
with a sync.
One of the culpits for this bad hardware behavior seem to be
caused by the lack of stopping and restarting the stream every
time a new channel is set.
This patch warrants that the stream will be properly reset
every time the set_frontend callback is called, partially
solving the problem.
A complete fix, however, would also need to check the PM
conditions for the tuner and demux.
Reported-by: Trevor Graffa <tlgraffa@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-09 17:17:55 +08:00
|
|
|
|
|
|
|
int (*set_frontend)(struct dvb_frontend *fe);
|
2008-04-19 08:34:00 +08:00
|
|
|
};
|
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
enum au0828_stream_state {
|
|
|
|
STREAM_OFF,
|
|
|
|
STREAM_INTERRUPT,
|
|
|
|
STREAM_ON
|
|
|
|
};
|
|
|
|
|
2009-03-11 14:00:47 +08:00
|
|
|
#define AUVI_INPUT(nr) (dev->board.input[nr])
|
2009-03-11 14:00:40 +08:00
|
|
|
|
|
|
|
/* device state */
|
|
|
|
enum au0828_dev_state {
|
|
|
|
DEV_INITIALIZED = 0x01,
|
|
|
|
DEV_DISCONNECTED = 0x02,
|
|
|
|
DEV_MISCONFIGURED = 0x04
|
|
|
|
};
|
|
|
|
|
2015-01-30 00:41:32 +08:00
|
|
|
struct au0828_dev;
|
2009-03-11 14:00:40 +08:00
|
|
|
|
|
|
|
struct au0828_usb_isoc_ctl {
|
|
|
|
/* max packet size of isoc transaction */
|
|
|
|
int max_pkt_size;
|
|
|
|
|
|
|
|
/* number of allocated urbs */
|
|
|
|
int num_bufs;
|
|
|
|
|
|
|
|
/* urb for isoc transfers */
|
|
|
|
struct urb **urb;
|
|
|
|
|
|
|
|
/* transfer buffers for isoc transfer */
|
|
|
|
char **transfer_buffer;
|
|
|
|
|
|
|
|
/* Last buffer command and region */
|
|
|
|
u8 cmd;
|
|
|
|
int pos, size, pktsize;
|
|
|
|
|
|
|
|
/* Last field: ODD or EVEN? */
|
|
|
|
int field;
|
|
|
|
|
|
|
|
/* Stores incomplete commands */
|
|
|
|
u32 tmp_buf;
|
|
|
|
int tmp_buf_len;
|
|
|
|
|
|
|
|
/* Stores already requested buffers */
|
2010-05-30 04:18:45 +08:00
|
|
|
struct au0828_buffer *buf;
|
|
|
|
struct au0828_buffer *vbi_buf;
|
2009-03-11 14:00:40 +08:00
|
|
|
|
|
|
|
/* Stores the number of received fields */
|
|
|
|
int nfields;
|
|
|
|
|
|
|
|
/* isoc urb callback */
|
|
|
|
int (*isoc_copy) (struct au0828_dev *dev, struct urb *urb);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/* buffer for one video frame */
|
|
|
|
struct au0828_buffer {
|
|
|
|
/* common v4l buffer stuff -- must be first */
|
[media] media: videobuf2: Restructure vb2_buffer
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer.
Add new member variables - bytesused, length, offset, userptr, fd,
data_offset - to struct vb2_plane in order to cover all information
of v4l2_plane.
struct vb2_plane {
<snip>
unsigned int bytesused;
unsigned int length;
union {
unsigned int offset;
unsigned long userptr;
int fd;
} m;
unsigned int data_offset;
}
Replace v4l2_buf with new member variables - index, type, memory - which
are common fields for buffer management.
struct vb2_buffer {
<snip>
unsigned int index;
unsigned int type;
unsigned int memory;
unsigned int num_planes;
struct vb2_plane planes[VIDEO_MAX_PLANES];
<snip>
};
v4l2 specific fields - flags, field, timestamp, timecode,
sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c
struct vb2_v4l2_buffer {
struct vb2_buffer vb2_buf;
__u32 flags;
__u32 field;
struct timeval timestamp;
struct v4l2_timecode timecode;
__u32 sequence;
};
Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-09-22 21:30:30 +08:00
|
|
|
struct vb2_v4l2_buffer vb;
|
2015-01-30 00:41:32 +08:00
|
|
|
struct list_head list;
|
2009-03-11 14:00:40 +08:00
|
|
|
|
2015-01-30 00:41:32 +08:00
|
|
|
void *mem;
|
|
|
|
unsigned long length;
|
2009-03-11 14:00:40 +08:00
|
|
|
int top_field;
|
2015-01-30 00:41:32 +08:00
|
|
|
/* pointer to vmalloc memory address in vb */
|
|
|
|
char *vb_buf;
|
2009-03-11 14:00:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct au0828_dmaqueue {
|
|
|
|
struct list_head active;
|
|
|
|
/* Counters to control buffer fill */
|
2015-01-30 00:41:32 +08:00
|
|
|
int pos;
|
2009-03-11 14:00:40 +08:00
|
|
|
};
|
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
struct au0828_dev {
|
|
|
|
struct mutex mutex;
|
|
|
|
struct usb_device *usbdev;
|
2009-03-11 14:00:47 +08:00
|
|
|
int boardnr;
|
|
|
|
struct au0828_board board;
|
2008-04-19 08:34:00 +08:00
|
|
|
u8 ctrlmsg[64];
|
|
|
|
|
|
|
|
/* I2C */
|
|
|
|
struct i2c_adapter i2c_adap;
|
2009-03-11 14:01:04 +08:00
|
|
|
struct i2c_algorithm i2c_algo;
|
2008-04-19 08:34:00 +08:00
|
|
|
struct i2c_client i2c_client;
|
|
|
|
u32 i2c_rc;
|
|
|
|
|
|
|
|
/* Digital */
|
|
|
|
struct au0828_dvb dvb;
|
2012-08-07 09:46:53 +08:00
|
|
|
struct work_struct restart_streaming;
|
2008-04-19 08:34:00 +08:00
|
|
|
|
2012-12-04 22:30:00 +08:00
|
|
|
#ifdef CONFIG_VIDEO_AU0828_V4L2
|
2009-03-11 14:00:40 +08:00
|
|
|
/* Analog */
|
2009-03-11 14:01:04 +08:00
|
|
|
struct v4l2_device v4l2_dev;
|
2013-02-15 19:55:41 +08:00
|
|
|
struct v4l2_ctrl_handler v4l2_ctrl_hdl;
|
2012-12-04 22:30:00 +08:00
|
|
|
#endif
|
2014-07-25 09:49:02 +08:00
|
|
|
#ifdef CONFIG_VIDEO_AU0828_RC
|
|
|
|
struct au0828_rc *ir;
|
|
|
|
#endif
|
|
|
|
|
2015-02-27 06:33:13 +08:00
|
|
|
struct video_device vdev;
|
|
|
|
struct video_device vbi_dev;
|
2015-01-30 00:41:32 +08:00
|
|
|
|
|
|
|
/* Videobuf2 */
|
|
|
|
struct vb2_queue vb_vidq;
|
|
|
|
struct vb2_queue vb_vbiq;
|
|
|
|
struct mutex vb_queue_lock;
|
|
|
|
struct mutex vb_vbi_queue_lock;
|
|
|
|
|
|
|
|
unsigned int frame_count;
|
|
|
|
unsigned int vbi_frame_count;
|
|
|
|
|
2010-09-02 09:03:43 +08:00
|
|
|
struct timer_list vid_timeout;
|
2010-10-10 01:43:53 +08:00
|
|
|
int vid_timeout_running;
|
2010-09-02 09:03:43 +08:00
|
|
|
struct timer_list vbi_timeout;
|
2010-10-10 01:43:53 +08:00
|
|
|
int vbi_timeout_running;
|
2015-01-30 00:41:32 +08:00
|
|
|
|
|
|
|
int users;
|
|
|
|
int streaming_users;
|
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
int width;
|
|
|
|
int height;
|
2010-05-30 04:18:45 +08:00
|
|
|
int vbi_width;
|
|
|
|
int vbi_height;
|
|
|
|
u32 vbi_read;
|
2013-02-15 20:22:37 +08:00
|
|
|
v4l2_std_id std;
|
2009-03-11 14:00:40 +08:00
|
|
|
u32 field_size;
|
|
|
|
u32 frame_size;
|
|
|
|
u32 bytesperline;
|
|
|
|
int type;
|
|
|
|
u8 ctrl_ainput;
|
|
|
|
__u8 isoc_in_endpointaddr;
|
|
|
|
u8 isoc_init_ok;
|
|
|
|
int greenscreen_detected;
|
|
|
|
int ctrl_freq;
|
|
|
|
int input_type;
|
2012-08-07 09:46:59 +08:00
|
|
|
int std_set_in_tuner_core;
|
2009-03-11 14:00:40 +08:00
|
|
|
unsigned int ctrl_input;
|
|
|
|
enum au0828_dev_state dev_state;
|
|
|
|
enum au0828_stream_state stream_state;
|
|
|
|
wait_queue_head_t open;
|
|
|
|
|
|
|
|
struct mutex lock;
|
|
|
|
|
|
|
|
/* Isoc control struct */
|
|
|
|
struct au0828_dmaqueue vidq;
|
2010-05-30 04:18:45 +08:00
|
|
|
struct au0828_dmaqueue vbiq;
|
2009-03-11 14:00:40 +08:00
|
|
|
struct au0828_usb_isoc_ctl isoc_ctl;
|
|
|
|
spinlock_t slock;
|
|
|
|
|
|
|
|
/* usb transfer */
|
|
|
|
int alt; /* alternate */
|
|
|
|
int max_pkt_size; /* max packet size of isoc transaction */
|
|
|
|
int num_alt; /* Number of alternative settings */
|
|
|
|
unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */
|
|
|
|
struct urb *urb[AU0828_MAX_ISO_BUFS]; /* urb for isoc transfers */
|
|
|
|
char *transfer_buffer[AU0828_MAX_ISO_BUFS];/* transfer buffers for isoc
|
|
|
|
transfer */
|
|
|
|
|
2014-08-10 10:14:21 +08:00
|
|
|
/* DVB USB / URB Related */
|
|
|
|
bool urb_streaming, need_urb_start;
|
2008-04-19 08:34:00 +08:00
|
|
|
struct urb *urbs[URB_COUNT];
|
2014-01-07 12:29:25 +08:00
|
|
|
|
|
|
|
/* Preallocated transfer digital transfer buffers */
|
|
|
|
|
|
|
|
char *dig_transfer_buffer[URB_COUNT];
|
2015-06-09 09:20:46 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_MEDIA_CONTROLLER
|
|
|
|
struct media_device *media_dev;
|
|
|
|
struct media_pad video_pad, vbi_pad;
|
2015-06-19 00:06:38 +08:00
|
|
|
struct media_entity *decoder;
|
2015-08-31 22:43:09 +08:00
|
|
|
struct media_entity input_ent[AU0828_MAX_INPUT];
|
|
|
|
struct media_pad input_pad[AU0828_MAX_INPUT];
|
2015-06-09 09:20:46 +08:00
|
|
|
#endif
|
2008-04-19 08:34:00 +08:00
|
|
|
};
|
|
|
|
|
2015-01-30 00:41:32 +08:00
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
2008-04-19 09:12:52 +08:00
|
|
|
#define au0828_read(dev, reg) au0828_readreg(dev, reg)
|
|
|
|
#define au0828_write(dev, reg, value) au0828_writereg(dev, reg, value)
|
|
|
|
#define au0828_andor(dev, reg, mask, value) \
|
|
|
|
au0828_writereg(dev, reg, \
|
|
|
|
(au0828_readreg(dev, reg) & ~(mask)) | ((value) & (mask)))
|
|
|
|
|
|
|
|
#define au0828_set(dev, reg, bit) au0828_andor(dev, (reg), (bit), (bit))
|
|
|
|
#define au0828_clear(dev, reg, bit) au0828_andor(dev, (reg), (bit), 0)
|
2008-04-19 08:34:00 +08:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* au0828-core.c */
|
|
|
|
extern u32 au0828_read(struct au0828_dev *dev, u16 reg);
|
|
|
|
extern u32 au0828_write(struct au0828_dev *dev, u16 reg, u32 val);
|
2008-04-26 06:06:03 +08:00
|
|
|
extern int au0828_debug;
|
2008-04-19 08:34:00 +08:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* au0828-cards.c */
|
|
|
|
extern struct au0828_board au0828_boards[];
|
|
|
|
extern struct usb_device_id au0828_usb_id_table[];
|
|
|
|
extern void au0828_gpio_setup(struct au0828_dev *dev);
|
2008-09-13 00:31:45 +08:00
|
|
|
extern int au0828_tuner_callback(void *priv, int component,
|
|
|
|
int command, int arg);
|
2008-03-30 06:53:07 +08:00
|
|
|
extern void au0828_card_setup(struct au0828_dev *dev);
|
2008-04-19 08:34:00 +08:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* au0828-i2c.c */
|
|
|
|
extern int au0828_i2c_register(struct au0828_dev *dev);
|
|
|
|
extern int au0828_i2c_unregister(struct au0828_dev *dev);
|
|
|
|
|
2009-03-11 14:00:40 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* au0828-video.c */
|
2015-01-30 00:41:32 +08:00
|
|
|
extern int au0828_analog_register(struct au0828_dev *dev,
|
2009-03-11 14:01:00 +08:00
|
|
|
struct usb_interface *interface);
|
2015-01-30 00:41:32 +08:00
|
|
|
extern void au0828_analog_unregister(struct au0828_dev *dev);
|
|
|
|
extern int au0828_start_analog_streaming(struct vb2_queue *vq,
|
|
|
|
unsigned int count);
|
|
|
|
extern void au0828_stop_vbi_streaming(struct vb2_queue *vq);
|
2014-08-10 08:47:15 +08:00
|
|
|
#ifdef CONFIG_VIDEO_AU0828_V4L2
|
2015-01-30 00:41:32 +08:00
|
|
|
extern void au0828_v4l2_suspend(struct au0828_dev *dev);
|
|
|
|
extern void au0828_v4l2_resume(struct au0828_dev *dev);
|
2014-08-10 08:47:15 +08:00
|
|
|
#else
|
|
|
|
static inline void au0828_v4l2_suspend(struct au0828_dev *dev) { };
|
|
|
|
static inline void au0828_v4l2_resume(struct au0828_dev *dev) { };
|
|
|
|
#endif
|
2009-03-11 14:00:40 +08:00
|
|
|
|
2008-04-19 08:34:00 +08:00
|
|
|
/* ----------------------------------------------------------- */
|
|
|
|
/* au0828-dvb.c */
|
|
|
|
extern int au0828_dvb_register(struct au0828_dev *dev);
|
|
|
|
extern void au0828_dvb_unregister(struct au0828_dev *dev);
|
2014-08-10 08:47:13 +08:00
|
|
|
void au0828_dvb_suspend(struct au0828_dev *dev);
|
|
|
|
void au0828_dvb_resume(struct au0828_dev *dev);
|
2008-04-19 08:39:11 +08:00
|
|
|
|
2010-05-30 04:18:45 +08:00
|
|
|
/* au0828-vbi.c */
|
2015-01-30 00:41:32 +08:00
|
|
|
extern struct vb2_ops au0828_vbi_qops;
|
2010-05-30 04:18:45 +08:00
|
|
|
|
2008-04-19 08:39:11 +08:00
|
|
|
#define dprintk(level, fmt, arg...)\
|
2008-04-26 06:06:03 +08:00
|
|
|
do { if (au0828_debug & level)\
|
2014-08-10 08:47:17 +08:00
|
|
|
printk(KERN_DEBUG pr_fmt(fmt), ## arg);\
|
2008-04-19 08:39:11 +08:00
|
|
|
} while (0)
|
2014-07-25 09:49:02 +08:00
|
|
|
|
|
|
|
/* au0828-input.c */
|
2014-08-09 08:36:18 +08:00
|
|
|
#ifdef CONFIG_VIDEO_AU0828_RC
|
|
|
|
extern int au0828_rc_register(struct au0828_dev *dev);
|
|
|
|
extern void au0828_rc_unregister(struct au0828_dev *dev);
|
|
|
|
extern int au0828_rc_suspend(struct au0828_dev *dev);
|
|
|
|
extern int au0828_rc_resume(struct au0828_dev *dev);
|
|
|
|
#else
|
|
|
|
static inline int au0828_rc_register(struct au0828_dev *dev) { return 0; }
|
|
|
|
static inline void au0828_rc_unregister(struct au0828_dev *dev) { }
|
|
|
|
static inline int au0828_rc_suspend(struct au0828_dev *dev) { return 0; }
|
|
|
|
static inline int au0828_rc_resume(struct au0828_dev *dev) { return 0; }
|
|
|
|
#endif
|