#include <linux/i2c.h>
#include <asm/div64.h>
#include <linux/firmware.h>
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <media/tuner.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
#include "tuner-i2c.h"
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"
#include <linux/dvb/frontend.h>
#include "dvb_frontend.h"
Go to the source code of this file.
|
#define | XREG_INIT 0x00 |
|
#define | XREG_RF_FREQ 0x02 |
|
#define | XREG_POWER_DOWN 0x08 |
|
#define | XREG_FREQ_ERROR 0x01 |
|
#define | XREG_LOCK 0x02 |
|
#define | XREG_VERSION 0x04 |
|
#define | XREG_PRODUCT_ID 0x08 |
|
#define | XREG_HSYNC_FREQ 0x10 |
|
#define | XREG_FRAME_LINES 0x20 |
|
#define | XREG_SNR 0x40 |
|
#define | XREG_ADC_ENV 0x0100 |
|
#define | i2c_send(priv, buf, size) |
|
#define | i2c_rcv(priv, buf, size) |
|
#define | i2c_send_recv(priv, obuf, osize, ibuf, isize) |
|
#define | send_seq(priv, data...) |
|
#define | dump_firm_type(t) dump_firm_type_and_int_freq(t, 0) |
|
#define | DIV 15625 |
|
|
| module_param (debug, int, 0644) |
|
| MODULE_PARM_DESC (debug,"enable verbose debug messages") |
|
| module_param (no_poweroff, int, 0644) |
|
| MODULE_PARM_DESC (no_poweroff,"0 (default) powers device off when not used.\n""1 keep device energized and with tuner ready all the times.\n"" Faster, but consumes more power and keeps the device hotter\n") |
|
| module_param_string (audio_std, audio_std, sizeof(audio_std), 0) |
|
| MODULE_PARM_DESC (audio_std,"Audio standard. XC3028 audio decoder explicitly ""needs to know what audio\n""standard is needed for some video standards with audio A2 or NICAM.\n""The valid values are:\n""A2\n""A2/A\n""A2/B\n""NICAM\n""NICAM/A\n""NICAM/B\n") |
|
| module_param_string (firmware_name, firmware_name, sizeof(firmware_name), 0) |
|
| MODULE_PARM_DESC (firmware_name,"Firmware file name. Allows overriding the ""default firmware name\n") |
|
struct dvb_frontend * | xc2028_attach (struct dvb_frontend *fe, struct xc2028_config *cfg) |
|
| EXPORT_SYMBOL (xc2028_attach) |
|
| MODULE_DESCRIPTION ("Xceive xc2028/xc3028 tuner driver") |
|
| MODULE_AUTHOR ("Michel Ludwig <[email protected]>") |
|
| MODULE_AUTHOR ("Mauro Carvalho Chehab <[email protected]>") |
|
| MODULE_LICENSE ("GPL") |
|
| MODULE_FIRMWARE (XC2028_DEFAULT_FIRMWARE) |
|
| MODULE_FIRMWARE (XC3028L_DEFAULT_FIRMWARE) |
|
#define dump_firm_type |
( |
|
t | ) |
dump_firm_type_and_int_freq(t, 0) |
Value:({ \
int _rc; \
_rc = tuner_i2c_xfer_recv(&
priv->i2c_props,
buf,
size); \
tuner_err("i2c input error: rc = %d (should be %d)\n", \
_rc; \
})
Definition at line 134 of file tuner-xc2028.c.
Value:({ \
int _rc; \
_rc = tuner_i2c_xfer_send(&
priv->i2c_props,
buf,
size); \
tuner_info("i2c output error: rc = %d (should be %d)\n",\
msleep(
priv->ctrl.msleep); \
_rc; \
})
Definition at line 123 of file tuner-xc2028.c.
#define i2c_send_recv |
( |
|
priv, |
|
|
|
obuf, |
|
|
|
osize, |
|
|
|
ibuf, |
|
|
|
isize |
|
) |
| |
Value:({ \
int _rc; \
_rc = tuner_i2c_xfer_send_recv(&
priv->i2c_props, obuf, osize, \
ibuf, isize); \
if (isize != _rc) \
tuner_err("i2c input error: rc = %d (should be %d)\n", \
_rc, (int)isize); \
msleep(
priv->ctrl.msleep); \
_rc; \
})
Definition at line 143 of file tuner-xc2028.c.
#define send_seq |
( |
|
priv, |
|
|
|
data... |
|
) |
| |
Value:({ \
int _rc; \
if (sizeof(_val) != \
(_rc = tuner_i2c_xfer_send(&
priv->i2c_props, \
_val, sizeof(_val)))) { \
tuner_err("Error on line %d: %d\n", __LINE__, _rc); \
}
else if (
priv->ctrl.msleep) \
msleep(
priv->ctrl.msleep); \
_rc; \
})
Definition at line 155 of file tuner-xc2028.c.
#define XREG_ADC_ENV 0x0100 |
#define XREG_FRAME_LINES 0x20 |
#define XREG_FREQ_ERROR 0x01 |
#define XREG_HSYNC_FREQ 0x10 |
#define XREG_POWER_DOWN 0x08 |
#define XREG_PRODUCT_ID 0x08 |
#define XREG_RF_FREQ 0x02 |
#define XREG_VERSION 0x04 |
- Enumerator:
XC2028_NO_FIRMWARE |
|
XC2028_WAITING_FIRMWARE |
|
XC2028_ACTIVE |
|
XC2028_SLEEP |
|
XC2028_NODEV |
|
Definition at line 93 of file tuner-xc2028.c.
MODULE_DESCRIPTION |
( |
"Xceive xc2028/xc3028 tuner driver" |
| ) |
|
module_param |
( |
no_poweroff |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param_string |
( |
audio_std |
, |
|
|
audio_std |
, |
|
|
sizeof(audio_std) |
, |
|
|
0 |
|
|
) |
| |
module_param_string |
( |
firmware_name |
, |
|
|
firmware_name |
, |
|
|
sizeof(firmware_name) |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
firmware_name |
, |
|
|
"Firmware file name. Allows overriding the ""default firmware name\n" |
|
|
) |
| |