#include "cx231xx.h"
#include <linux/kernel.h>
#include <linux/slab.h>
#include <media/dvbdev.h>
#include <media/dmxdev.h>
#include <media/dvb_demux.h>
#include <media/dvb_net.h>
#include <media/dvb_frontend.h>
#include <media/v4l2-common.h>
#include <media/tuner.h>
#include "xc5000.h"
#include "s5h1432.h"
#include "tda18271.h"
#include "s5h1411.h"
#include "lgdt3305.h"
#include "si2165.h"
#include "si2168.h"
#include "mb86a20s.h"
#include "si2157.h"
#include "lgdt3306a.h"
#include "r820t.h"
#include "mn88473.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static unsigned int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define CX231XX_DVB_NUM_BUFS …
#define CX231XX_DVB_MAX_PACKETSIZE …
#define CX231XX_DVB_MAX_PACKETS …
#define CX231XX_DVB_MAX_FRONTENDS …
struct cx231xx_dvb { … };
static struct s5h1432_config dvico_s5h1432_config = …;
static struct tda18271_std_map cnxt_rde253s_tda18271_std_map = …;
static struct tda18271_std_map mb86a20s_tda18271_config = …;
static struct tda18271_config cnxt_rde253s_tunerconfig = …;
static struct s5h1411_config tda18271_s5h1411_config = …;
static struct s5h1411_config xc5000_s5h1411_config = …;
static struct lgdt3305_config hcw_lgdt3305_config = …;
static struct tda18271_std_map hauppauge_tda18271_std_map = …;
static struct tda18271_config hcw_tda18271_config = …;
static const struct mb86a20s_config pv_mb86a20s_config = …;
static struct tda18271_config pv_tda18271_config = …;
static const struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = …;
static struct r820t_config astrometa_t2hybrid_r820t_config = …;
static inline void print_err_status(struct cx231xx *dev, int packet, int status)
{ … }
static inline int dvb_isoc_copy(struct cx231xx *dev, struct urb *urb)
{ … }
static inline int dvb_bulk_copy(struct cx231xx *dev, struct urb *urb)
{ … }
static int start_streaming(struct cx231xx_dvb *dvb)
{ … }
static int stop_streaming(struct cx231xx_dvb *dvb)
{ … }
static int start_feed(struct dvb_demux_feed *feed)
{ … }
static int stop_feed(struct dvb_demux_feed *feed)
{ … }
static int cx231xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
{ … }
static struct xc5000_config cnxt_rde250_tunerconfig = …;
static struct xc5000_config cnxt_rdu250_tunerconfig = …;
#if 0
static int attach_xc5000(u8 addr, struct cx231xx *dev)
{
struct dvb_frontend *fe;
struct xc5000_config cfg;
memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = cx231xx_get_i2c_adap(dev, dev->board.tuner_i2c_master);
cfg.i2c_addr = addr;
if (!dev->dvb->frontend[0]) {
dev_err(dev->dev, "%s/2: dvb frontend not attached. Can't attach xc5000\n",
dev->name);
return -EINVAL;
}
fe = dvb_attach(xc5000_attach, dev->dvb->frontend[0], &cfg);
if (!fe) {
dev_err(dev->dev, "%s/2: xc5000 attach failed\n", dev->name);
dvb_frontend_detach(dev->dvb->frontend[0]);
dev->dvb->frontend[0] = NULL;
return -EINVAL;
}
dev_info(dev->dev, "%s/2: xc5000 attached\n", dev->name);
return 0;
}
#endif
int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq)
{ … }
int cx231xx_reset_analog_tuner(struct cx231xx *dev)
{ … }
static int register_dvb(struct cx231xx_dvb *dvb,
struct module *module,
struct cx231xx *dev, struct device *device)
{ … }
static void unregister_dvb(struct cx231xx_dvb *dvb)
{ … }
static int dvb_init(struct cx231xx *dev)
{ … }
static int dvb_fini(struct cx231xx *dev)
{ … }
static struct cx231xx_ops dvb_ops = …;
static int __init cx231xx_dvb_register(void)
{ … }
static void __exit cx231xx_dvb_unregister(void)
{ … }
module_init(…) …;
module_exit(cx231xx_dvb_unregister);