Commit 5564da7e authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (95 commits)
  V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilation
  V4L/DVB (9294): gspca: Add a stop sequence in t613.
  V4L/DVB (9293): gspca: Separate and fix the sensor dependant sequences in t613.
  V4L/DVB (9292): gspca: Call the control setting functions at init time in t613.
  V4L/DVB (9291): gspca: Do not set the white balance temperature by default in t613.
  V4L/DVB (9290): gspca: Adjust the sensor init sequences in t613.
  V4L/DVB (9289): gspca: Other sensor identified as om6802 in t613.
  V4L/DVB (9288): gspca: Write to the USB device and not USB interface in t613.
  V4L/DVB (9287): gspca: Change the name of the multi bytes write function in t613.
  V4L/DVB (9286): gspca: Compilation problem of gspca.c and the kernel version.
  V4L/DVB (9283): Correct typo and enable setting the gain on the mt9m111 sensor
  V4L/DVB (9282): Properly iterate the urbs when destroying them.
  V4L/DVB (9281): gspca: Add hflip and vflip to the po1030 sensor
  V4L/DVB (9280): gspca: Use the gspca debug macros
  V4L/DVB (9279): gspca: Correct some copyright headers
  V4L/DVB (9278): gspca: Remove the m5602_debug variable
  V4L/DVB (9277): gspca: propagate an error in m5602_start_transfer()
  V4L/DVB (9276): videobuf-dvb: two functions are now static
  V4L/DVB (9275): dvb: input data pointer of cx24116_writeregN() should be const
  V4L/DVB (9274): Remove spurious messages and turn into debug.
  ...
parents 58617d5e d4305c68
0 -> Unknown board (au0828) 0 -> Unknown board (au0828)
1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008] 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721e,2040:721f,2040:7280,0fd9:0008]
2 -> Hauppauge HVR850 (au0828) [2040:7240] 2 -> Hauppauge HVR850 (au0828) [2040:7240]
3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]
4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281] 4 -> Hauppauge HVR950Q rev xxF8 (au0828) [2040:7201,2040:7211,2040:7281]
......
...@@ -75,3 +75,4 @@ tuner=73 - Samsung TCPG 6121P30A ...@@ -75,3 +75,4 @@ tuner=73 - Samsung TCPG 6121P30A
tuner=75 - Philips TEA5761 FM Radio tuner=75 - Philips TEA5761 FM Radio
tuner=76 - Xceive 5000 tuner tuner=76 - Xceive 5000 tuner
tuner=77 - TCL tuner MF02GIP-5N-E tuner=77 - TCL tuner MF02GIP-5N-E
tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner
...@@ -3481,7 +3481,9 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum, ...@@ -3481,7 +3481,9 @@ static u16 MXL_ControlWrite_Group(struct dvb_frontend *fe, u16 controlNum,
} }
ctrlVal = 0; ctrlVal = 0;
for (k = 0; k < state->MXL_Ctrl[i].size; k++) for (k = 0; k < state->MXL_Ctrl[i].size; k++)
ctrlVal += state->MXL_Ctrl[i].val[k] * (1 << k); ctrlVal += state->
MXL_Ctrl[i].val[k] *
(1 << k);
} else } else
return -1; return -1;
} }
...@@ -3581,7 +3583,7 @@ static void MXL_RegWriteBit(struct dvb_frontend *fe, u8 address, u8 bit, ...@@ -3581,7 +3583,7 @@ static void MXL_RegWriteBit(struct dvb_frontend *fe, u8 address, u8 bit,
static u32 MXL_Ceiling(u32 value, u32 resolution) static u32 MXL_Ceiling(u32 value, u32 resolution)
{ {
return (value/resolution + (value % resolution > 0 ? 1 : 0)); return value / resolution + (value % resolution > 0 ? 1 : 0);
} }
/* Retrieve the Initialzation Registers */ /* Retrieve the Initialzation Registers */
...@@ -3910,7 +3912,10 @@ static int mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable, ...@@ -3910,7 +3912,10 @@ static int mxl5005s_writeregs(struct dvb_frontend *fe, u8 *addrtable,
static int mxl5005s_init(struct dvb_frontend *fe) static int mxl5005s_init(struct dvb_frontend *fe)
{ {
struct mxl5005s_state *state = fe->tuner_priv;
dprintk(1, "%s()\n", __func__); dprintk(1, "%s()\n", __func__);
state->current_mode = MXL_QAM;
return mxl5005s_reconfigure(fe, MXL_QAM, MXL5005S_BANDWIDTH_6MHZ); return mxl5005s_reconfigure(fe, MXL_QAM, MXL5005S_BANDWIDTH_6MHZ);
} }
...@@ -4092,7 +4097,6 @@ struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe, ...@@ -4092,7 +4097,6 @@ struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,
state->frontend = fe; state->frontend = fe;
state->config = config; state->config = config;
state->i2c = i2c; state->i2c = i2c;
state->current_mode = MXL_QAM;
printk(KERN_INFO "MXL5005S: Attached at address 0x%02x\n", printk(KERN_INFO "MXL5005S: Attached at address 0x%02x\n",
config->i2c_address); config->i2c_address);
......
...@@ -493,6 +493,7 @@ static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer) ...@@ -493,6 +493,7 @@ static int simple_radio_bandswitch(struct dvb_frontend *fe, u8 *buffer)
case TUNER_PHILIPS_FM1216ME_MK3: case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3: case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FMD1216ME_MK3: case TUNER_PHILIPS_FMD1216ME_MK3:
case TUNER_PHILIPS_FMD1216MEX_MK3:
case TUNER_LG_NTSC_TAPE: case TUNER_LG_NTSC_TAPE:
case TUNER_PHILIPS_FM1256_IH3: case TUNER_PHILIPS_FM1256_IH3:
case TUNER_TCL_MF02GIP_5N: case TUNER_TCL_MF02GIP_5N:
...@@ -767,6 +768,7 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf, ...@@ -767,6 +768,7 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
switch (priv->type) { switch (priv->type) {
case TUNER_PHILIPS_FMD1216ME_MK3: case TUNER_PHILIPS_FMD1216ME_MK3:
case TUNER_PHILIPS_FMD1216MEX_MK3:
if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ && if (params->u.ofdm.bandwidth == BANDWIDTH_8_MHZ &&
params->frequency >= 158870000) params->frequency >= 158870000)
buf[3] |= 0x08; buf[3] |= 0x08;
......
...@@ -946,7 +946,7 @@ static struct tuner_params tuner_tena_9533_di_params[] = { ...@@ -946,7 +946,7 @@ static struct tuner_params tuner_tena_9533_di_params[] = {
}, },
}; };
/* ------------ TUNER_PHILIPS_FMD1216ME_MK3 - Philips PAL ------------ */ /* ------------ TUNER_PHILIPS_FMD1216ME(X)_MK3 - Philips PAL ------------ */
static struct tuner_range tuner_philips_fmd1216me_mk3_pal_ranges[] = { static struct tuner_range tuner_philips_fmd1216me_mk3_pal_ranges[] = {
{ 16 * 160.00 /*MHz*/, 0x86, 0x51, }, { 16 * 160.00 /*MHz*/, 0x86, 0x51, },
...@@ -984,6 +984,27 @@ static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = { ...@@ -984,6 +984,27 @@ static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = {
}, },
}; };
static struct tuner_params tuner_philips_fmd1216mex_mk3_params[] = {
{
.type = TUNER_PARAM_TYPE_PAL,
.ranges = tuner_philips_fmd1216me_mk3_pal_ranges,
.count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges),
.has_tda9887 = 1,
.port1_active = 1,
.port2_active = 1,
.port2_fm_high_sensitivity = 1,
.port2_invert_for_secam_lc = 1,
.port1_set_for_fm_mono = 1,
.radio_if = 1,
.fm_gain_normal = 1,
},
{
.type = TUNER_PARAM_TYPE_DIGITAL,
.ranges = tuner_philips_fmd1216me_mk3_dvb_ranges,
.count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_dvb_ranges),
.iffreq = 16 * 36.125, /*MHz*/
},
};
/* ------ TUNER_LG_TDVS_H06XF - LG INNOTEK / INFINEON ATSC ----- */ /* ------ TUNER_LG_TDVS_H06XF - LG INNOTEK / INFINEON ATSC ----- */
...@@ -1663,6 +1684,16 @@ struct tunertype tuners[] = { ...@@ -1663,6 +1684,16 @@ struct tunertype tuners[] = {
.params = tuner_tcl_mf02gip_5n_params, .params = tuner_tcl_mf02gip_5n_params,
.count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params), .count = ARRAY_SIZE(tuner_tcl_mf02gip_5n_params),
}, },
[TUNER_PHILIPS_FMD1216MEX_MK3] = { /* Philips PAL */
.name = "Philips FMD1216MEX MK3 Hybrid Tuner",
.params = tuner_philips_fmd1216mex_mk3_params,
.count = ARRAY_SIZE(tuner_philips_fmd1216mex_mk3_params),
.min = 16 * 50.87,
.max = 16 * 858.00,
.stepsize = 166667,
.initdata = tua603x_agc112,
.sleepdata = (u8[]){ 4, 0x9c, 0x60, 0x85, 0x54 },
},
}; };
EXPORT_SYMBOL(tuners); EXPORT_SYMBOL(tuners);
......
...@@ -43,7 +43,7 @@ MODULE_PARM_DESC(init_fw, "Load firmware during driver initialization."); ...@@ -43,7 +43,7 @@ MODULE_PARM_DESC(init_fw, "Load firmware during driver initialization.");
static DEFINE_MUTEX(xc5000_list_mutex); static DEFINE_MUTEX(xc5000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list); static LIST_HEAD(hybrid_tuner_instance_list);
#define dprintk(level,fmt, arg...) if (debug >= level) \ #define dprintk(level, fmt, arg...) if (debug >= level) \
printk(KERN_INFO "%s: " fmt, "xc5000", ## arg) printk(KERN_INFO "%s: " fmt, "xc5000", ## arg)
#define XC5000_DEFAULT_FIRMWARE "dvb-fe-xc5000-1.1.fw" #define XC5000_DEFAULT_FIRMWARE "dvb-fe-xc5000-1.1.fw"
...@@ -138,11 +138,11 @@ struct xc5000_priv { ...@@ -138,11 +138,11 @@ struct xc5000_priv {
immediately the length of the following transaction. immediately the length of the following transaction.
*/ */
typedef struct { struct XC_TV_STANDARD {
char *Name; char *Name;
u16 AudioMode; u16 AudioMode;
u16 VideoMode; u16 VideoMode;
} XC_TV_STANDARD; };
/* Tuner standards */ /* Tuner standards */
#define MN_NTSC_PAL_BTSC 0 #define MN_NTSC_PAL_BTSC 0
...@@ -169,7 +169,7 @@ typedef struct { ...@@ -169,7 +169,7 @@ typedef struct {
#define FM_Radio_INPUT2 21 #define FM_Radio_INPUT2 21
#define FM_Radio_INPUT1 22 #define FM_Radio_INPUT1 22
static XC_TV_STANDARD XC5000_Standard[MAX_TV_STANDARD] = { static struct XC_TV_STANDARD XC5000_Standard[MAX_TV_STANDARD] = {
{"M/N-NTSC/PAL-BTSC", 0x0400, 0x8020}, {"M/N-NTSC/PAL-BTSC", 0x0400, 0x8020},
{"M/N-NTSC/PAL-A2", 0x0600, 0x8020}, {"M/N-NTSC/PAL-A2", 0x0600, 0x8020},
{"M/N-NTSC/PAL-EIAJ", 0x0440, 0x8020}, {"M/N-NTSC/PAL-EIAJ", 0x0440, 0x8020},
...@@ -183,7 +183,7 @@ static XC_TV_STANDARD XC5000_Standard[MAX_TV_STANDARD] = { ...@@ -183,7 +183,7 @@ static XC_TV_STANDARD XC5000_Standard[MAX_TV_STANDARD] = {
{"D/K-PAL-NICAM", 0x0E80, 0x8009}, {"D/K-PAL-NICAM", 0x0E80, 0x8009},
{"D/K-PAL-MONO", 0x1478, 0x8009}, {"D/K-PAL-MONO", 0x1478, 0x8009},
{"D/K-SECAM-A2 DK1", 0x1200, 0x8009}, {"D/K-SECAM-A2 DK1", 0x1200, 0x8009},
{"D/K-SECAM-A2 L/DK3",0x0E00, 0x8009}, {"D/K-SECAM-A2 L/DK3", 0x0E00, 0x8009},
{"D/K-SECAM-A2 MONO", 0x1478, 0x8009}, {"D/K-SECAM-A2 MONO", 0x1478, 0x8009},
{"L-SECAM-NICAM", 0x8E82, 0x0009}, {"L-SECAM-NICAM", 0x8E82, 0x0009},
{"L'-SECAM-NICAM", 0x8E82, 0x4009}, {"L'-SECAM-NICAM", 0x8E82, 0x4009},
...@@ -307,9 +307,10 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence) ...@@ -307,9 +307,10 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence)
unsigned int len, pos, index; unsigned int len, pos, index;
u8 buf[XC_MAX_I2C_WRITE_LENGTH]; u8 buf[XC_MAX_I2C_WRITE_LENGTH];
index=0; index = 0;
while ((i2c_sequence[index]!=0xFF) || (i2c_sequence[index+1]!=0xFF)) { while ((i2c_sequence[index] != 0xFF) ||
len = i2c_sequence[index]* 256 + i2c_sequence[index+1]; (i2c_sequence[index + 1] != 0xFF)) {
len = i2c_sequence[index] * 256 + i2c_sequence[index+1];
if (len == 0x0000) { if (len == 0x0000) {
/* RESET command */ /* RESET command */
result = xc_reset(fe); result = xc_reset(fe);
...@@ -329,15 +330,17 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence) ...@@ -329,15 +330,17 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence)
buf[1] = i2c_sequence[index + 1]; buf[1] = i2c_sequence[index + 1];
pos = 2; pos = 2;
while (pos < len) { while (pos < len) {
if ((len - pos) > XC_MAX_I2C_WRITE_LENGTH - 2) { if ((len - pos) > XC_MAX_I2C_WRITE_LENGTH - 2)
nbytes_to_send = XC_MAX_I2C_WRITE_LENGTH; nbytes_to_send =
} else { XC_MAX_I2C_WRITE_LENGTH;
else
nbytes_to_send = (len - pos + 2); nbytes_to_send = (len - pos + 2);
for (i = 2; i < nbytes_to_send; i++) {
buf[i] = i2c_sequence[index + pos +
i - 2];
} }
for (i=2; i<nbytes_to_send; i++) { result = xc_send_i2c_data(priv, buf,
buf[i] = i2c_sequence[index + pos + i - 2]; nbytes_to_send);
}
result = xc_send_i2c_data(priv, buf, nbytes_to_send);
if (result != XC_RESULT_SUCCESS) if (result != XC_RESULT_SUCCESS)
return result; return result;
...@@ -386,8 +389,7 @@ static int xc_SetSignalSource(struct xc5000_priv *priv, u16 rf_mode) ...@@ -386,8 +389,7 @@ static int xc_SetSignalSource(struct xc5000_priv *priv, u16 rf_mode)
dprintk(1, "%s(%d) Source = %s\n", __func__, rf_mode, dprintk(1, "%s(%d) Source = %s\n", __func__, rf_mode,
rf_mode == XC_RF_MODE_AIR ? "ANTENNA" : "CABLE"); rf_mode == XC_RF_MODE_AIR ? "ANTENNA" : "CABLE");
if ((rf_mode != XC_RF_MODE_AIR) && (rf_mode != XC_RF_MODE_CABLE)) if ((rf_mode != XC_RF_MODE_AIR) && (rf_mode != XC_RF_MODE_CABLE)) {
{
rf_mode = XC_RF_MODE_CABLE; rf_mode = XC_RF_MODE_CABLE;
printk(KERN_ERR printk(KERN_ERR
"%s(), Invalid mode, defaulting to CABLE", "%s(), Invalid mode, defaulting to CABLE",
...@@ -560,13 +562,13 @@ static int xc5000_readregs(struct xc5000_priv *priv, u8 *buf, u8 len) ...@@ -560,13 +562,13 @@ static int xc5000_readregs(struct xc5000_priv *priv, u8 *buf, u8 len)
.flags = I2C_M_RD, .buf = buf, .len = len }; .flags = I2C_M_RD, .buf = buf, .len = len };
if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) { if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) {
printk(KERN_ERR "xc5000 I2C read failed (len=%i)\n",(int)len); printk(KERN_ERR "xc5000 I2C read failed (len=%i)\n", (int)len);
return -EREMOTEIO; return -EREMOTEIO;
} }
return 0; return 0;
} }
static int xc5000_fwupload(struct dvb_frontend* fe) static int xc5000_fwupload(struct dvb_frontend *fe)
{ {
struct xc5000_priv *priv = fe->tuner_priv; struct xc5000_priv *priv = fe->tuner_priv;
const struct firmware *fw; const struct firmware *fw;
...@@ -576,7 +578,8 @@ static int xc5000_fwupload(struct dvb_frontend* fe) ...@@ -576,7 +578,8 @@ static int xc5000_fwupload(struct dvb_frontend* fe)
printk(KERN_INFO "xc5000: waiting for firmware upload (%s)...\n", printk(KERN_INFO "xc5000: waiting for firmware upload (%s)...\n",
XC5000_DEFAULT_FIRMWARE); XC5000_DEFAULT_FIRMWARE);
ret = request_firmware(&fw, XC5000_DEFAULT_FIRMWARE, &priv->i2c_props.adap->dev); ret = request_firmware(&fw, XC5000_DEFAULT_FIRMWARE,
&priv->i2c_props.adap->dev);
if (ret) { if (ret) {
printk(KERN_ERR "xc5000: Upload failed. (file not found?)\n"); printk(KERN_ERR "xc5000: Upload failed. (file not found?)\n");
ret = XC_RESULT_RESET_FAILURE; ret = XC_RESULT_RESET_FAILURE;
...@@ -592,7 +595,7 @@ static int xc5000_fwupload(struct dvb_frontend* fe) ...@@ -592,7 +595,7 @@ static int xc5000_fwupload(struct dvb_frontend* fe)
ret = XC_RESULT_RESET_FAILURE; ret = XC_RESULT_RESET_FAILURE;
} else { } else {
printk(KERN_INFO "xc5000: firmware upload\n"); printk(KERN_INFO "xc5000: firmware upload\n");
ret = xc_load_i2c_sequence(fe, fw->data ); ret = xc_load_i2c_sequence(fe, fw->data);
} }
out: out:
...@@ -651,7 +654,7 @@ static int xc5000_set_params(struct dvb_frontend *fe, ...@@ -651,7 +654,7 @@ static int xc5000_set_params(struct dvb_frontend *fe,
dprintk(1, "%s() frequency=%d (Hz)\n", __func__, params->frequency); dprintk(1, "%s() frequency=%d (Hz)\n", __func__, params->frequency);
switch(params->u.vsb.modulation) { switch (params->u.vsb.modulation) {
case VSB_8: case VSB_8:
case VSB_16: case VSB_16:
dprintk(1, "%s() VSB modulation\n", __func__); dprintk(1, "%s() VSB modulation\n", __func__);
...@@ -748,42 +751,42 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe, ...@@ -748,42 +751,42 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe,
/* FIX ME: Some video standards may have several possible audio /* FIX ME: Some video standards may have several possible audio
standards. We simply default to one of them here. standards. We simply default to one of them here.
*/ */
if(params->std & V4L2_STD_MN) { if (params->std & V4L2_STD_MN) {
/* default to BTSC audio standard */ /* default to BTSC audio standard */
priv->video_standard = MN_NTSC_PAL_BTSC; priv->video_standard = MN_NTSC_PAL_BTSC;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_PAL_BG) { if (params->std & V4L2_STD_PAL_BG) {
/* default to NICAM audio standard */ /* default to NICAM audio standard */
priv->video_standard = BG_PAL_NICAM; priv->video_standard = BG_PAL_NICAM;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_PAL_I) { if (params->std & V4L2_STD_PAL_I) {
/* default to NICAM audio standard */ /* default to NICAM audio standard */
priv->video_standard = I_PAL_NICAM; priv->video_standard = I_PAL_NICAM;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_PAL_DK) { if (params->std & V4L2_STD_PAL_DK) {
/* default to NICAM audio standard */ /* default to NICAM audio standard */
priv->video_standard = DK_PAL_NICAM; priv->video_standard = DK_PAL_NICAM;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_SECAM_DK) { if (params->std & V4L2_STD_SECAM_DK) {
/* default to A2 DK1 audio standard */ /* default to A2 DK1 audio standard */
priv->video_standard = DK_SECAM_A2DK1; priv->video_standard = DK_SECAM_A2DK1;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_SECAM_L) { if (params->std & V4L2_STD_SECAM_L) {
priv->video_standard = L_SECAM_NICAM; priv->video_standard = L_SECAM_NICAM;
goto tune_channel; goto tune_channel;
} }
if(params->std & V4L2_STD_SECAM_LC) { if (params->std & V4L2_STD_SECAM_LC) {
priv->video_standard = LC_SECAM_NICAM; priv->video_standard = LC_SECAM_NICAM;
goto tune_channel; goto tune_channel;
} }
...@@ -791,7 +794,7 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe, ...@@ -791,7 +794,7 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe,
tune_channel: tune_channel:
ret = xc_SetSignalSource(priv, priv->rf_mode); ret = xc_SetSignalSource(priv, priv->rf_mode);
if (ret != XC_RESULT_SUCCESS) { if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR printk(KERN_ERR
"xc5000: xc_SetSignalSource(%d) failed\n", "xc5000: xc_SetSignalSource(%d) failed\n",
priv->rf_mode); priv->rf_mode);
return -EREMOTEIO; return -EREMOTEIO;
...@@ -863,7 +866,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe) ...@@ -863,7 +866,7 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe)
* I2C transactions until calibration is complete. This way we * I2C transactions until calibration is complete. This way we
* don't have to rely on clock stretching working. * don't have to rely on clock stretching working.
*/ */
xc_wait( 100 ); xc_wait(100);
/* Default to "CABLE" mode */ /* Default to "CABLE" mode */
ret |= xc_write_reg(priv, XREG_SIGNALSOURCE, XC_RF_MODE_CABLE); ret |= xc_write_reg(priv, XREG_SIGNALSOURCE, XC_RF_MODE_CABLE);
...@@ -885,15 +888,13 @@ static int xc5000_sleep(struct dvb_frontend *fe) ...@@ -885,15 +888,13 @@ static int xc5000_sleep(struct dvb_frontend *fe)
*/ */
ret = xc_shutdown(priv); ret = xc_shutdown(priv);
if(ret != XC_RESULT_SUCCESS) { if (ret != XC_RESULT_SUCCESS) {
printk(KERN_ERR printk(KERN_ERR
"xc5000: %s() unable to shutdown tuner\n", "xc5000: %s() unable to shutdown tuner\n",
__func__); __func__);
return -EREMOTEIO; return -EREMOTEIO;
} } else
else {
return XC_RESULT_SUCCESS; return XC_RESULT_SUCCESS;
}
} }
static int xc5000_init(struct dvb_frontend *fe) static int xc5000_init(struct dvb_frontend *fe)
...@@ -989,7 +990,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, ...@@ -989,7 +990,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != 0) if (xc5000_readreg(priv, XREG_PRODUCT_ID, &id) != 0)
goto fail; goto fail;
switch(id) { switch (id) {
case XC_PRODUCT_ID_FW_LOADED: case XC_PRODUCT_ID_FW_LOADED:
printk(KERN_INFO printk(KERN_INFO
"xc5000: Successfully identified at address 0x%02x\n", "xc5000: Successfully identified at address 0x%02x\n",
......
...@@ -45,17 +45,17 @@ struct xc5000_config { ...@@ -45,17 +45,17 @@ struct xc5000_config {
#if defined(CONFIG_MEDIA_TUNER_XC5000) || \ #if defined(CONFIG_MEDIA_TUNER_XC5000) || \
(defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE)) (defined(CONFIG_MEDIA_TUNER_XC5000_MODULE) && defined(MODULE))
extern struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe, extern struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
struct xc5000_config *cfg); struct xc5000_config *cfg);
#else #else
static inline struct dvb_frontend* xc5000_attach(struct dvb_frontend *fe, static inline struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
struct i2c_adapter *i2c, struct i2c_adapter *i2c,
struct xc5000_config *cfg) struct xc5000_config *cfg)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
} }
#endif // CONFIG_MEDIA_TUNER_XC5000 #endif
#endif // __XC5000_H__ #endif
...@@ -595,6 +595,18 @@ static void dm1105dvb_hw_exit(struct dm1105dvb *dm1105dvb) ...@@ -595,6 +595,18 @@ static void dm1105dvb_hw_exit(struct dm1105dvb *dm1105dvb)
dm1105dvb_dma_unmap(dm1105dvb); dm1105dvb_dma_unmap(dm1105dvb);
} }
static struct stv0299_config sharp_z0194a_config = {
.demod_address = 0x68,
.inittab = sharp_z0194a_inittab,
.mclk = 88000000UL,
.invert = 1,
.skip_reinit = 0,
.lock_output = STV0299_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
.min_delay_ms = 100,
.set_symbol_rate = sharp_z0194a_set_symbol_rate,
};
static struct stv0288_config earda_config = { static struct stv0288_config earda_config = {
.demod_address = 0x68, .demod_address = 0x68,
.min_delay_ms = 100, .min_delay_ms = 100,
......
This diff is collapsed.
...@@ -222,6 +222,7 @@ struct dvb_frontend { ...@@ -222,6 +222,7 @@ struct dvb_frontend {
struct dtv_frontend_properties dtv_property_cache; struct dtv_frontend_properties dtv_property_cache;
#define DVB_FRONTEND_COMPONENT_TUNER 0 #define DVB_FRONTEND_COMPONENT_TUNER 0
int (*callback)(void *adapter_priv, int component, int cmd, int arg); int (*callback)(void *adapter_priv, int component, int cmd, int arg);
int id;
}; };
extern int dvb_register_frontend(struct dvb_adapter *dvb, extern int dvb_register_frontend(struct dvb_adapter *dvb,
......
...@@ -326,6 +326,9 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, ...@@ -326,6 +326,9 @@ int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
adap->name = name; adap->name = name;
adap->module = module; adap->module = module;
adap->device = device; adap->device = device;
adap->mfe_shared = 0;
adap->mfe_dvbdev = NULL;
mutex_init (&adap->mfe_lock);
list_add_tail (&adap->list_head, &dvb_adapter_list); list_add_tail (&adap->list_head, &dvb_adapter_list);
......
...@@ -62,6 +62,10 @@ struct dvb_adapter { ...@@ -62,6 +62,10 @@ struct dvb_adapter {
struct device *device; struct device *device;
struct module *module; struct module *module;
int mfe_shared; /* indicates mutually exclusive frontends */
struct dvb_device *mfe_dvbdev; /* frontend device in use */
struct mutex mfe_lock; /* access lock for thread creation */
}; };
......
...@@ -422,6 +422,18 @@ static int dw210x_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) ...@@ -422,6 +422,18 @@ static int dw210x_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
return 0; return 0;
} }
static struct stv0299_config sharp_z0194a_config = {
.demod_address = 0x68,
.inittab = sharp_z0194a_inittab,
.mclk = 88000000UL,
.invert = 1,
.skip_reinit = 0,
.lock_output = STV0299_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
.min_delay_ms = 100,
.set_symbol_rate = sharp_z0194a_set_symbol_rate,
};
static struct cx24116_config dw2104_config = { static struct cx24116_config dw2104_config = {
.demod_address = 0x55, .demod_address = 0x55,
.mpg_clk_pos_pol = 0x01, .mpg_clk_pos_pol = 0x01,
......
This diff is collapsed.
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
struct cx22702_config struct cx22702_config {
{
/* the demodulator's i2c address */ /* the demodulator's i2c address */
u8 demod_address; u8 demod_address;
...@@ -41,16 +40,19 @@ struct cx22702_config ...@@ -41,16 +40,19 @@ struct cx22702_config
u8 output_mode; u8 output_mode;
}; };
#if defined(CONFIG_DVB_CX22702) || (defined(CONFIG_DVB_CX22702_MODULE) && defined(MODULE)) #if defined(CONFIG_DVB_CX22702) || (defined(CONFIG_DVB_CX22702_MODULE) \
extern struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, && defined(MODULE))
struct i2c_adapter* i2c); extern struct dvb_frontend *cx22702_attach(
const struct cx22702_config *config,
struct i2c_adapter *i2c);
#else #else
static inline struct dvb_frontend* cx22702_attach(const struct cx22702_config* config, static inline struct dvb_frontend *cx22702_attach(
struct i2c_adapter* i2c) const struct cx22702_config *config,
struct i2c_adapter *i2c)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
} }
#endif // CONFIG_DVB_CX22702 #endif
#endif // CX22702_H #endif
This diff is collapsed.
...@@ -23,31 +23,32 @@ ...@@ -23,31 +23,32 @@
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
struct cx24116_config struct cx24116_config {
{
/* the demodulator's i2c address */ /* the demodulator's i2c address */
u8 demod_address; u8 demod_address;
/* Need to set device param for start_dma */ /* Need to set device param for start_dma */
int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
/* Need to reset device during firmware loading */ /* Need to reset device during firmware loading */
int (*reset_device)(struct dvb_frontend* fe); int (*reset_device)(struct dvb_frontend *fe);
/* Need to set MPEG parameters */ /* Need to set MPEG parameters */
u8 mpg_clk_pos_pol:0x02; u8 mpg_clk_pos_pol:0x02;
}; };
#if defined(CONFIG_DVB_CX24116) || defined(CONFIG_DVB_CX24116_MODULE) #if defined(CONFIG_DVB_CX24116) || defined(CONFIG_DVB_CX24116_MODULE)
extern struct dvb_frontend* cx24116_attach(const struct cx24116_config* config, extern struct dvb_frontend *cx24116_attach(
struct i2c_adapter* i2c); const struct cx24116_config *config,
struct i2c_adapter *i2c);
#else #else
static inline struct dvb_frontend* cx24116_attach(const struct cx24116_config* config, static inline struct dvb_frontend *cx24116_attach(
struct i2c_adapter* i2c) const struct cx24116_config *config,
struct i2c_adapter *i2c)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
} }
#endif // CONFIG_DVB_CX24116 #endif
#endif /* CX24116_H */ #endif /* CX24116_H */
This diff is collapsed.
...@@ -23,13 +23,12 @@ ...@@ -23,13 +23,12 @@
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
struct cx24123_config struct cx24123_config {
{
/* the demodulator's i2c address */ /* the demodulator's i2c address */
u8 demod_address; u8 demod_address;
/* Need to set device param for start_dma */ /* Need to set device param for start_dma */
int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
/* 0 = LNB voltage normal, 1 = LNB voltage inverted */ /* 0 = LNB voltage normal, 1 = LNB voltage inverted */
int lnb_polarity; int lnb_polarity;
...@@ -39,7 +38,8 @@ struct cx24123_config ...@@ -39,7 +38,8 @@ struct cx24123_config
void (*agc_callback) (struct dvb_frontend *); void (*agc_callback) (struct dvb_frontend *);
}; };
#if defined(CONFIG_DVB_CX24123) || (defined(CONFIG_DVB_CX24123_MODULE) && defined(MODULE)) #if defined(CONFIG_DVB_CX24123) || (defined(CONFIG_DVB_CX24123_MODULE) \
&& defined(MODULE))
extern struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, extern struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
struct i2c_adapter *i2c); struct i2c_adapter *i2c);
extern struct i2c_adapter *cx24123_get_tuner_i2c_adapter(struct dvb_frontend *); extern struct i2c_adapter *cx24123_get_tuner_i2c_adapter(struct dvb_frontend *);
...@@ -56,6 +56,6 @@ static struct i2c_adapter * ...@@ -56,6 +56,6 @@ static struct i2c_adapter *
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
} }
#endif // CONFIG_DVB_CX24123 #endif
#endif /* CX24123_H */ #endif /* CX24123_H */
This diff is collapsed.
...@@ -24,8 +24,7 @@ ...@@ -24,8 +24,7 @@
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
struct s5h1409_config struct s5h1409_config {
{
/* the demodulator's i2c address */ /* the demodulator's i2c address */
u8 demod_address; u8 demod_address;
...@@ -60,12 +59,14 @@ struct s5h1409_config ...@@ -60,12 +59,14 @@ struct s5h1409_config
u16 mpeg_timing; u16 mpeg_timing;
}; };
#if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) && defined(MODULE)) #if defined(CONFIG_DVB_S5H1409) || (defined(CONFIG_DVB_S5H1409_MODULE) \
extern struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config, && defined(MODULE))
struct i2c_adapter* i2c); extern struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config,
struct i2c_adapter *i2c);
#else #else
static inline struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config, static inline struct dvb_frontend *s5h1409_attach(
struct i2c_adapter* i2c) const struct s5h1409_config *config,
struct i2c_adapter *i2c)
{ {
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL; return NULL;
......
...@@ -343,7 +343,7 @@ static int s5h1411_writereg(struct s5h1411_state *state, ...@@ -343,7 +343,7 @@ static int s5h1411_writereg(struct s5h1411_state *state,
u8 addr, u8 reg, u16 data) u8 addr, u8 reg, u16 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data >> 8, data & 0xff }; u8 buf[] = { reg, data >> 8, data & 0xff };
struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 }; struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 };
...@@ -359,10 +359,10 @@ static int s5h1411_writereg(struct s5h1411_state *state, ...@@ -359,10 +359,10 @@ static int s5h1411_writereg(struct s5h1411_state *state,
static u16 s5h1411_readreg(struct s5h1411_state *state, u8 addr, u8 reg) static u16 s5h1411_readreg(struct s5h1411_state *state, u8 addr, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0[] = { reg };
u8 b1 [] = { 0, 0 }; u8 b1[] = { 0, 0 };
struct i2c_msg msg [] = { struct i2c_msg msg[] = {
{ .addr = addr, .flags = 0, .buf = b0, .len = 1 }, { .addr = addr, .flags = 0, .buf = b0, .len = 1 },
{ .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 } }; { .addr = addr, .flags = I2C_M_RD, .buf = b1, .len = 2 } };
......
...@@ -195,7 +195,7 @@ static struct init_tab { ...@@ -195,7 +195,7 @@ static struct init_tab {
static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data) static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data }; u8 buf[] = { reg, data };
struct i2c_msg msg = { struct i2c_msg msg = {
.addr = state->config->demod_address, .addr = state->config->demod_address,
.flags = 0, .buf = buf, .len = 2 }; .flags = 0, .buf = buf, .len = 2 };
...@@ -213,9 +213,9 @@ static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data) ...@@ -213,9 +213,9 @@ static int tda10048_writereg(struct tda10048_state *state, u8 reg, u8 data)
static u8 tda10048_readreg(struct tda10048_state *state, u8 reg) static u8 tda10048_readreg(struct tda10048_state *state, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0[] = { reg };
u8 b1 [] = { 0 }; u8 b1[] = { 0 };
struct i2c_msg msg [] = { struct i2c_msg msg[] = {
{ .addr = state->config->demod_address, { .addr = state->config->demod_address,
.flags = 0, .buf = b0, .len = 1 }, .flags = 0, .buf = b0, .len = 1 },
{ .addr = state->config->demod_address, { .addr = state->config->demod_address,
...@@ -393,43 +393,89 @@ static int tda10048_get_tps(struct tda10048_state *state, ...@@ -393,43 +393,89 @@ static int tda10048_get_tps(struct tda10048_state *state,
val = tda10048_readreg(state, TDA10048_OUT_CONF2); val = tda10048_readreg(state, TDA10048_OUT_CONF2);
switch ((val & 0x60) >> 5) { switch ((val & 0x60) >> 5) {
case 0: p->constellation = QPSK; break; case 0:
case 1: p->constellation = QAM_16; break; p->constellation = QPSK;
case 2: p->constellation = QAM_64; break; break;
case 1:
p->constellation = QAM_16;
break;
case 2:
p->constellation = QAM_64;
break;
} }
switch ((val & 0x18) >> 3) { switch ((val & 0x18) >> 3) {
case 0: p->hierarchy_information = HIERARCHY_NONE; break; case 0:
case 1: p->hierarchy_information = HIERARCHY_1; break; p->hierarchy_information = HIERARCHY_NONE;
case 2: p->hierarchy_information = HIERARCHY_2; break; break;
case 3: p->hierarchy_information = HIERARCHY_4; break; case 1:
p->hierarchy_information = HIERARCHY_1;
break;
case 2:
p->hierarchy_information = HIERARCHY_2;
break;
case 3:
p->hierarchy_information = HIERARCHY_4;
break;
} }
switch (val & 0x07) { switch (val & 0x07) {
case 0: p->code_rate_HP = FEC_1_2; break; case 0:
case 1: p->code_rate_HP = FEC_2_3; break; p->code_rate_HP = FEC_1_2;
case 2: p->code_rate_HP = FEC_3_4; break; break;
case 3: p->code_rate_HP = FEC_5_6; break; case 1:
case 4: p->code_rate_HP = FEC_7_8; break; p->code_rate_HP = FEC_2_3;
break;
case 2:
p->code_rate_HP = FEC_3_4;
break;
case 3:
p->code_rate_HP = FEC_5_6;
break;
case 4:
p->code_rate_HP = FEC_7_8;
break;
} }
val = tda10048_readreg(state, TDA10048_OUT_CONF3); val = tda10048_readreg(state, TDA10048_OUT_CONF3);
switch (val & 0x07) { switch (val & 0x07) {
case 0: p->code_rate_LP = FEC_1_2; break; case 0:
case 1: p->code_rate_LP = FEC_2_3; break; p->code_rate_LP = FEC_1_2;
case 2: p->code_rate_LP = FEC_3_4; break; break;
case 3: p->code_rate_LP = FEC_5_6; break; case 1:
case 4: p->code_rate_LP = FEC_7_8; break; p->code_rate_LP = FEC_2_3;
break;
case 2:
p->code_rate_LP = FEC_3_4;
break;
case 3:
p->code_rate_LP = FEC_5_6;
break;
case 4:
p->code_rate_LP = FEC_7_8;
break;
} }
val = tda10048_readreg(state, TDA10048_OUT_CONF1); val = tda10048_readreg(state, TDA10048_OUT_CONF1);
switch ((val & 0x0c) >> 2) { switch ((val & 0x0c) >> 2) {
case 0: p->guard_interval = GUARD_INTERVAL_1_32; break; case 0:
case 1: p->guard_interval = GUARD_INTERVAL_1_16; break; p->guard_interval = GUARD_INTERVAL_1_32;
case 2: p->guard_interval = GUARD_INTERVAL_1_8; break; break;
case 3: p->guard_interval = GUARD_INTERVAL_1_4; break; case 1:
p->guard_interval = GUARD_INTERVAL_1_16;
break;
case 2:
p->guard_interval = GUARD_INTERVAL_1_8;
break;
case 3:
p->guard_interval = GUARD_INTERVAL_1_4;
break;
} }
switch (val & 0x02) { switch (val & 0x02) {
case 0: p->transmission_mode = TRANSMISSION_MODE_2K; break; case 0:
case 1: p->transmission_mode = TRANSMISSION_MODE_8K; break; p->transmission_mode = TRANSMISSION_MODE_2K;
break;
case 1:
p->transmission_mode = TRANSMISSION_MODE_8K;
break;
} }
return 0; return 0;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifndef Z0194A #ifndef Z0194A
#define Z0194A #define Z0194A
static int sharp_z0194a__set_symbol_rate(struct dvb_frontend *fe, static int sharp_z0194a_set_symbol_rate(struct dvb_frontend *fe,
u32 srate, u32 ratio) u32 srate, u32 ratio)
{ {
u8 aclk = 0; u8 aclk = 0;
...@@ -40,7 +40,7 @@ static int sharp_z0194a__set_symbol_rate(struct dvb_frontend *fe, ...@@ -40,7 +40,7 @@ static int sharp_z0194a__set_symbol_rate(struct dvb_frontend *fe,
return 0; return 0;
} }
static u8 sharp_z0194a__inittab[] = { static u8 sharp_z0194a_inittab[] = {
0x01, 0x15, 0x01, 0x15,
0x02, 0x00, 0x02, 0x00,
0x03, 0x00, 0x03, 0x00,
...@@ -82,16 +82,4 @@ static u8 sharp_z0194a__inittab[] = { ...@@ -82,16 +82,4 @@ static u8 sharp_z0194a__inittab[] = {
0xff, 0xff 0xff, 0xff
}; };
static struct stv0299_config sharp_z0194a_config = {
.demod_address = 0x68,
.inittab = sharp_z0194a__inittab,
.mclk = 88000000UL,
.invert = 1,
.skip_reinit = 0,
.lock_output = STV0299_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
.min_delay_ms = 100,
.set_symbol_rate = sharp_z0194a__set_symbol_rate,
};
#endif #endif
...@@ -42,6 +42,10 @@ struct usb_device_id smsusb_id_table[] = { ...@@ -42,6 +42,10 @@ struct usb_device_id smsusb_id_table[] = {
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5510), { USB_DEVICE(0x2040, 0x5510),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5520),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5530),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5580), { USB_DEVICE(0x2040, 0x5580),
.driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM },
{ USB_DEVICE(0x2040, 0x5590), { USB_DEVICE(0x2040, 0x5590),
......
...@@ -359,7 +359,7 @@ config USB_SI470X ...@@ -359,7 +359,7 @@ config USB_SI470X
computer's USB port. computer's USB port.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called radio-silabs. module will be called radio-si470x.
config USB_MR800 config USB_MR800
tristate "AverMedia MR 800 USB FM radio support" tristate "AverMedia MR 800 USB FM radio support"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -90,6 +90,7 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data) ...@@ -90,6 +90,7 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */ case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */ case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */ case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */
case 72251: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */ case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */
case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */ case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */
break; break;
...@@ -185,7 +186,7 @@ void au0828_gpio_setup(struct au0828_dev *dev) ...@@ -185,7 +186,7 @@ void au0828_gpio_setup(struct au0828_dev *dev)
} }
/* table of devices that work with this driver */ /* table of devices that work with this driver */
struct usb_device_id au0828_usb_id_table [] = { struct usb_device_id au0828_usb_id_table[] = {
{ USB_DEVICE(0x2040, 0x7200), { USB_DEVICE(0x2040, 0x7200),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q }, .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x7240), { USB_DEVICE(0x2040, 0x7240),
...@@ -198,6 +199,8 @@ struct usb_device_id au0828_usb_id_table [] = { ...@@ -198,6 +199,8 @@ struct usb_device_id au0828_usb_id_table [] = {
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q }, .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x721b), { USB_DEVICE(0x2040, 0x721b),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q }, .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x721e),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x721f), { USB_DEVICE(0x2040, 0x721f),
.driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q }, .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
{ USB_DEVICE(0x2040, 0x7280), { USB_DEVICE(0x2040, 0x7280),
......
...@@ -91,7 +91,8 @@ static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value, ...@@ -91,7 +91,8 @@ static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
status = usb_control_msg(dev->usbdev, status = usb_control_msg(dev->usbdev,
usb_sndctrlpipe(dev->usbdev, 0), usb_sndctrlpipe(dev->usbdev, 0),
request, request,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USB_DIR_OUT | USB_TYPE_VENDOR |
USB_RECIP_DEVICE,
value, index, value, index,
cp, size, 1000); cp, size, 1000);
......
...@@ -173,7 +173,8 @@ static int start_urb_transfer(struct au0828_dev *dev) ...@@ -173,7 +173,8 @@ static int start_urb_transfer(struct au0828_dev *dev)
purb->status = -EINPROGRESS; purb->status = -EINPROGRESS;
usb_fill_bulk_urb(purb, usb_fill_bulk_urb(purb,
dev->usbdev, dev->usbdev,
usb_rcvbulkpipe(dev->usbdev, _AU0828_BULKPIPE), usb_rcvbulkpipe(dev->usbdev,
_AU0828_BULKPIPE),
purb->transfer_buffer, purb->transfer_buffer,
URB_BUFSIZE, URB_BUFSIZE,
urb_completion, urb_completion,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -131,7 +131,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, ...@@ -131,7 +131,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
printk(" >\n"); printk(" >\n");
} }
for (cnt = 1; cnt < msg->len; cnt++ ) { for (cnt = 1; cnt < msg->len; cnt++) {
/* following bytes */ /* following bytes */
wdata = msg->buf[cnt]; wdata = msg->buf[cnt];
ctrl = bus->i2c_period | (1 << 12) | (1 << 2); ctrl = bus->i2c_period | (1 << 12) | (1 << 2);
...@@ -151,9 +151,9 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, ...@@ -151,9 +151,9 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
if (retval == 0) if (retval == 0)
goto eio; goto eio;
if (i2c_debug) { if (i2c_debug) {
printk(" %02x", msg->buf[cnt]); dprintk(1, " %02x", msg->buf[cnt]);
if (!(ctrl & I2C_NOSTOP)) if (!(ctrl & I2C_NOSTOP))
printk(" >\n"); dprintk(1, " >\n");
} }
} }
return msg->len; return msg->len;
...@@ -162,7 +162,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, ...@@ -162,7 +162,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
retval = -EIO; retval = -EIO;
err: err:
if (i2c_debug) if (i2c_debug)
printk(" ERR: %d\n", retval); printk(KERN_ERR " ERR: %d\n", retval);
return retval; return retval;
} }
...@@ -194,12 +194,12 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, ...@@ -194,12 +194,12 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
if (i2c_debug) { if (i2c_debug) {
if (joined) if (joined)
printk(" R"); dprintk(1, " R");
else else
printk(" <R %02x", (msg->addr << 1) + 1); dprintk(1, " <R %02x", (msg->addr << 1) + 1);
} }
for(cnt = 0; cnt < msg->len; cnt++) { for (cnt = 0; cnt < msg->len; cnt++) {
ctrl = bus->i2c_period | (1 << 12) | (1 << 2) | 1; ctrl = bus->i2c_period | (1 << 12) | (1 << 2) | 1;
...@@ -216,9 +216,9 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, ...@@ -216,9 +216,9 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
goto eio; goto eio;
msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff; msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff;
if (i2c_debug) { if (i2c_debug) {
printk(" %02x", msg->buf[cnt]); dprintk(1, " %02x", msg->buf[cnt]);
if (!(ctrl & I2C_NOSTOP)) if (!(ctrl & I2C_NOSTOP))
printk(" >\n"); dprintk(1, " >\n");
} }
} }
return msg->len; return msg->len;
...@@ -227,7 +227,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, ...@@ -227,7 +227,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
retval = -EIO; retval = -EIO;
err: err:
if (i2c_debug) if (i2c_debug)
printk(" ERR: %d\n", retval); printk(KERN_ERR " ERR: %d\n", retval);
return retval; return retval;
} }
...@@ -353,17 +353,17 @@ static struct i2c_client cx23885_i2c_client_template = { ...@@ -353,17 +353,17 @@ static struct i2c_client cx23885_i2c_client_template = {
}; };
static char *i2c_devs[128] = { static char *i2c_devs[128] = {
[0x10 >> 1] = "tda10048", [0x10 >> 1] = "tda10048",
[0x12 >> 1] = "dib7000pc", [0x12 >> 1] = "dib7000pc",
[ 0x1c >> 1 ] = "lgdt3303", [0x1c >> 1] = "lgdt3303",
[ 0x86 >> 1 ] = "tda9887", [0x86 >> 1] = "tda9887",
[ 0x32 >> 1 ] = "cx24227", [0x32 >> 1] = "cx24227",
[ 0x88 >> 1 ] = "cx25837", [0x88 >> 1] = "cx25837",
[ 0x84 >> 1 ] = "tda8295", [0x84 >> 1] = "tda8295",
[ 0xa0 >> 1 ] = "eeprom", [0xa0 >> 1] = "eeprom",
[ 0xc0 >> 1 ] = "tuner/mt2131/tda8275", [0xc0 >> 1] = "tuner/mt2131/tda8275",
[0xc2 >> 1] = "tuner/mt2131/tda8275/xc5000/xc3028", [0xc2 >> 1] = "tuner/mt2131/tda8275/xc5000/xc3028",
[0xc8 >> 1] = "tuner/xc3028L", [0xc8 >> 1] = "tuner/xc3028L",
}; };
static void do_i2c_scan(char *name, struct i2c_client *c) static void do_i2c_scan(char *name, struct i2c_client *c)
...@@ -376,7 +376,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) ...@@ -376,7 +376,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
rc = i2c_master_recv(c, &buf, 0); rc = i2c_master_recv(c, &buf, 0);
if (rc < 0) if (rc < 0)
continue; continue;
printk("%s: i2c scan: found device @ 0x%x [%s]\n", printk(KERN_INFO "%s: i2c scan: found device @ 0x%x [%s]\n",
name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???"); name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???");
} }
} }
...@@ -408,11 +408,12 @@ int cx23885_i2c_register(struct cx23885_i2c *bus) ...@@ -408,11 +408,12 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
bus->i2c_client.adapter = &bus->i2c_adap; bus->i2c_client.adapter = &bus->i2c_adap;
if (0 == bus->i2c_rc) { if (0 == bus->i2c_rc) {
printk("%s: i2c bus %d registered\n", dev->name, bus->nr); dprintk(1, "%s: i2c bus %d registered\n", dev->name, bus->nr);
if (i2c_scan) if (i2c_scan)
do_i2c_scan(dev->name, &bus->i2c_client); do_i2c_scan(dev->name, &bus->i2c_client);
} else } else
printk("%s: i2c bus %d register FAILED\n", dev->name, bus->nr); printk(KERN_WARNING "%s: i2c bus %d register FAILED\n",
dev->name, bus->nr);
return bus->i2c_rc; return bus->i2c_rc;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define GSPCAV2_H #define GSPCAV2_H
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/videodev2.h> #include <linux/videodev2.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment