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: V4L/DVB (10978): Report tuning algorith correctly V4L/DVB (10977): STB6100 init fix, the call to stb6100_set_bandwidth needs an argument V4L/DVB (10976): Bug fix: For legacy applications stv0899 performs search only first time after insmod. V4L/DVB (10975): Bug: Use signed types, Offsets and range can be negative V4L/DVB (10974): Use Diseqc 3/3 mode to send data V4L/DVB (10972): zl10353: i2c_gate_ctrl bug fix V4L/DVB (10834): zoran: auto-select bt866 for AverMedia 6 Eyes V4L/DVB (10832): tvaudio: Avoid breakage with tda9874a V4L/DVB (10789): m5602-s5k4aa: Split up the initial sensor probe in chunks.
This commit is contained in:
commit
2a4c13baeb
|
@ -1683,7 +1683,7 @@ static int dst_tune_frontend(struct dvb_frontend* fe,
|
|||
|
||||
static int dst_get_tuning_algo(struct dvb_frontend *fe)
|
||||
{
|
||||
return dst_algo;
|
||||
return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW;
|
||||
}
|
||||
|
||||
static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
|
||||
|
|
|
@ -1290,9 +1290,6 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
|
|||
dprintk("%s() Finalised property cache\n", __func__);
|
||||
dtv_property_cache_submit(fe);
|
||||
|
||||
/* Request the search algorithm to search */
|
||||
fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
|
||||
|
||||
r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND,
|
||||
&fepriv->parameters);
|
||||
break;
|
||||
|
@ -1717,6 +1714,10 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
|
|||
fepriv->min_delay = (dvb_override_tune_delay * HZ) / 1000;
|
||||
|
||||
fepriv->state = FESTATE_RETUNE;
|
||||
|
||||
/* Request the search algorithm to search */
|
||||
fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
|
||||
|
||||
dvb_frontend_wakeup(fe);
|
||||
dvb_frontend_add_event(fe, 0);
|
||||
fepriv->status = 0;
|
||||
|
|
|
@ -156,7 +156,7 @@ static void stb0899_first_subrange(struct stb0899_state *state)
|
|||
}
|
||||
|
||||
if (range > 0)
|
||||
internal->sub_range = MIN(internal->srch_range, range);
|
||||
internal->sub_range = min(internal->srch_range, range);
|
||||
else
|
||||
internal->sub_range = 0;
|
||||
|
||||
|
@ -185,7 +185,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state)
|
|||
timing = stb0899_read_reg(state, STB0899_RTF);
|
||||
|
||||
if (lock >= 42) {
|
||||
if ((lock > 48) && (ABS(timing) >= 110)) {
|
||||
if ((lock > 48) && (abs(timing) >= 110)) {
|
||||
internal->status = ANALOGCARRIER;
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "-->ANALOG Carrier !");
|
||||
} else {
|
||||
|
@ -222,7 +222,7 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
|
|||
index++;
|
||||
derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */
|
||||
|
||||
if (ABS(derot_freq) > derot_limit)
|
||||
if (abs(derot_freq) > derot_limit)
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
|
@ -298,7 +298,7 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state)
|
|||
last_derot_freq = derot_freq;
|
||||
derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */
|
||||
|
||||
if(ABS(derot_freq) > derot_limit)
|
||||
if(abs(derot_freq) > derot_limit)
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
|
@ -400,7 +400,7 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state)
|
|||
if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) {
|
||||
|
||||
derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
|
||||
if (ABS(derot_freq) > derot_limit)
|
||||
if (abs(derot_freq) > derot_limit)
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
|
@ -467,7 +467,7 @@ static void next_sub_range(struct stb0899_state *state)
|
|||
|
||||
if (internal->sub_dir > 0) {
|
||||
old_sub_range = internal->sub_range;
|
||||
internal->sub_range = MIN((internal->srch_range / 2) -
|
||||
internal->sub_range = min((internal->srch_range / 2) -
|
||||
(internal->tuner_offst + internal->sub_range / 2),
|
||||
internal->sub_range);
|
||||
|
||||
|
@ -771,7 +771,7 @@ static long Log2Int(int number)
|
|||
int i;
|
||||
|
||||
i = 0;
|
||||
while ((1 << i) <= ABS(number))
|
||||
while ((1 << i) <= abs(number))
|
||||
i++;
|
||||
|
||||
if (number == 0)
|
||||
|
|
|
@ -794,7 +794,7 @@ static int stb0899_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t
|
|||
reg = stb0899_read_reg(state, STB0899_DISCNTRL1);
|
||||
old_state = reg;
|
||||
/* set to burst mode */
|
||||
STB0899_SETFIELD_VAL(DISEQCMODE, reg, 0x02);
|
||||
STB0899_SETFIELD_VAL(DISEQCMODE, reg, 0x03);
|
||||
STB0899_SETFIELD_VAL(DISPRECHARGE, reg, 0x01);
|
||||
stb0899_write_reg(state, STB0899_DISCNTRL1, reg);
|
||||
switch (burst) {
|
||||
|
|
|
@ -59,10 +59,6 @@
|
|||
#define MAKEWORD32(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
|
||||
#define MAKEWORD16(a, b) (((a) << 8) | (b))
|
||||
|
||||
#define MIN(x, y) ((x) <= (y) ? (x) : (y))
|
||||
#define MAX(x, y) ((x) >= (y) ? (x) : (y))
|
||||
#define ABS(x) ((x) >= 0 ? (x) : -(x))
|
||||
|
||||
#define LSB(x) ((x & 0xff))
|
||||
#define MSB(y) ((y >> 8) & 0xff)
|
||||
|
||||
|
@ -168,10 +164,10 @@ struct stb0899_internal {
|
|||
u32 freq; /* Demod internal Frequency */
|
||||
u32 srate; /* Demod internal Symbol rate */
|
||||
enum stb0899_fec fecrate; /* Demod internal FEC rate */
|
||||
u32 srch_range; /* Demod internal Search Range */
|
||||
u32 sub_range; /* Demod current sub range (Hz) */
|
||||
u32 tuner_step; /* Tuner step (Hz) */
|
||||
u32 tuner_offst; /* Relative offset to carrier (Hz) */
|
||||
s32 srch_range; /* Demod internal Search Range */
|
||||
s32 sub_range; /* Demod current sub range (Hz) */
|
||||
s32 tuner_step; /* Tuner step (Hz) */
|
||||
s32 tuner_offst; /* Relative offset to carrier (Hz) */
|
||||
u32 tuner_bw; /* Current bandwidth of the tuner (Hz) */
|
||||
|
||||
s32 mclk; /* Masterclock Divider factor (binary) */
|
||||
|
|
|
@ -427,11 +427,11 @@ static int stb6100_init(struct dvb_frontend *fe)
|
|||
status->refclock = 27000000; /* Hz */
|
||||
status->iqsense = 1;
|
||||
status->bandwidth = 36000; /* kHz */
|
||||
state->bandwidth = status->bandwidth * 1000; /* MHz */
|
||||
state->bandwidth = status->bandwidth * 1000; /* Hz */
|
||||
state->reference = status->refclock / 1000; /* kHz */
|
||||
|
||||
/* Set default bandwidth. */
|
||||
return stb6100_set_bandwidth(fe, status->bandwidth);
|
||||
return stb6100_set_bandwidth(fe, state->bandwidth);
|
||||
}
|
||||
|
||||
static int stb6100_get_state(struct dvb_frontend *fe,
|
||||
|
|
|
@ -590,7 +590,7 @@ static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
|
|||
struct zl10353_state *state = fe->demodulator_priv;
|
||||
u8 val = 0x0a;
|
||||
|
||||
if (state->config.no_tuner) {
|
||||
if (state->config.disable_i2c_gate_ctrl) {
|
||||
/* No tuner attached to the internal I2C bus */
|
||||
/* If set enable I2C bridge, the main I2C bus stopped hardly */
|
||||
return 0;
|
||||
|
|
|
@ -38,6 +38,9 @@ struct zl10353_config
|
|||
|
||||
/* set if parallel ts output is required */
|
||||
int parallel_ts;
|
||||
|
||||
/* set if i2c_gate_ctrl disable is required */
|
||||
u8 disable_i2c_gate_ctrl:1;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE))
|
||||
|
|
|
@ -102,7 +102,11 @@ int s5k4aa_probe(struct sd *sd)
|
|||
}
|
||||
|
||||
/* Test some registers, but we don't know their exact meaning yet */
|
||||
if (m5602_read_sensor(sd, 0x00, prod_id, sizeof(prod_id)))
|
||||
if (m5602_read_sensor(sd, 0x00, prod_id, 2))
|
||||
return -ENODEV;
|
||||
if (m5602_read_sensor(sd, 0x02, prod_id+2, 2))
|
||||
return -ENODEV;
|
||||
if (m5602_read_sensor(sd, 0x04, prod_id+4, 2))
|
||||
return -ENODEV;
|
||||
|
||||
if (memcmp(prod_id, expected_prod_id, sizeof(prod_id)))
|
||||
|
|
|
@ -860,6 +860,7 @@ static struct zl10353_config behold_h6_config = {
|
|||
.demod_address = 0x1e>>1,
|
||||
.no_tuner = 1,
|
||||
.parallel_ts = 1,
|
||||
.disable_i2c_gate_ctrl = 1,
|
||||
};
|
||||
|
||||
/* ==================================================================
|
||||
|
|
|
@ -54,7 +54,7 @@ MODULE_LICENSE("GPL");
|
|||
/* ---------------------------------------------------------------------- */
|
||||
/* our structs */
|
||||
|
||||
#define MAXREGS 64
|
||||
#define MAXREGS 256
|
||||
|
||||
struct CHIPSTATE;
|
||||
typedef int (*getvalue)(int);
|
||||
|
|
|
@ -68,6 +68,7 @@ config VIDEO_ZORAN_AVS6EYES
|
|||
tristate "AverMedia 6 Eyes support (EXPERIMENTAL)"
|
||||
depends on VIDEO_ZORAN_ZR36060 && EXPERIMENTAL && VIDEO_V4L1
|
||||
select VIDEO_BT856 if VIDEO_HELPER_CHIPS_AUTO
|
||||
select VIDEO_BT866 if VIDEO_HELPER_CHIPS_AUTO
|
||||
select VIDEO_KS0127 if VIDEO_HELPER_CHIPS_AUTO
|
||||
help
|
||||
Support for the AverMedia 6 Eyes video surveillance card.
|
||||
|
|
Loading…
Reference in New Issue