diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_algo.c | 14 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_drv.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb0899_priv.h | 12 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/stb6100.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/zl10353.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/zl10353.h | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 1 | ||||
-rw-r--r-- | drivers/media/video/tvaudio.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran/Kconfig | 1 |
12 files changed, 31 insertions, 25 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 29e8f1546ab6..fec1d77fa855 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -1683,7 +1683,7 @@ static int dst_tune_frontend(struct dvb_frontend* fe, | |||
1683 | 1683 | ||
1684 | static int dst_get_tuning_algo(struct dvb_frontend *fe) | 1684 | static int dst_get_tuning_algo(struct dvb_frontend *fe) |
1685 | { | 1685 | { |
1686 | return dst_algo; | 1686 | return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW; |
1687 | } | 1687 | } |
1688 | 1688 | ||
1689 | static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) | 1689 | static int dst_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p) |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 843407785083..8dcb3fbf7acd 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -1290,9 +1290,6 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1290 | dprintk("%s() Finalised property cache\n", __func__); | 1290 | dprintk("%s() Finalised property cache\n", __func__); |
1291 | dtv_property_cache_submit(fe); | 1291 | dtv_property_cache_submit(fe); |
1292 | 1292 | ||
1293 | /* Request the search algorithm to search */ | ||
1294 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | ||
1295 | |||
1296 | r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, | 1293 | r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, |
1297 | &fepriv->parameters); | 1294 | &fepriv->parameters); |
1298 | break; | 1295 | break; |
@@ -1717,6 +1714,10 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, | |||
1717 | fepriv->min_delay = (dvb_override_tune_delay * HZ) / 1000; | 1714 | fepriv->min_delay = (dvb_override_tune_delay * HZ) / 1000; |
1718 | 1715 | ||
1719 | fepriv->state = FESTATE_RETUNE; | 1716 | fepriv->state = FESTATE_RETUNE; |
1717 | |||
1718 | /* Request the search algorithm to search */ | ||
1719 | fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; | ||
1720 | |||
1720 | dvb_frontend_wakeup(fe); | 1721 | dvb_frontend_wakeup(fe); |
1721 | dvb_frontend_add_event(fe, 0); | 1722 | dvb_frontend_add_event(fe, 0); |
1722 | fepriv->status = 0; | 1723 | fepriv->status = 0; |
diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c index a67d1775a43c..2da55ec20392 100644 --- a/drivers/media/dvb/frontends/stb0899_algo.c +++ b/drivers/media/dvb/frontends/stb0899_algo.c | |||
@@ -156,7 +156,7 @@ static void stb0899_first_subrange(struct stb0899_state *state) | |||
156 | } | 156 | } |
157 | 157 | ||
158 | if (range > 0) | 158 | if (range > 0) |
159 | internal->sub_range = MIN(internal->srch_range, range); | 159 | internal->sub_range = min(internal->srch_range, range); |
160 | else | 160 | else |
161 | internal->sub_range = 0; | 161 | internal->sub_range = 0; |
162 | 162 | ||
@@ -185,7 +185,7 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state) | |||
185 | timing = stb0899_read_reg(state, STB0899_RTF); | 185 | timing = stb0899_read_reg(state, STB0899_RTF); |
186 | 186 | ||
187 | if (lock >= 42) { | 187 | if (lock >= 42) { |
188 | if ((lock > 48) && (ABS(timing) >= 110)) { | 188 | if ((lock > 48) && (abs(timing) >= 110)) { |
189 | internal->status = ANALOGCARRIER; | 189 | internal->status = ANALOGCARRIER; |
190 | dprintk(state->verbose, FE_DEBUG, 1, "-->ANALOG Carrier !"); | 190 | dprintk(state->verbose, FE_DEBUG, 1, "-->ANALOG Carrier !"); |
191 | } else { | 191 | } else { |
@@ -222,7 +222,7 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state) | |||
222 | index++; | 222 | index++; |
223 | derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */ | 223 | derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */ |
224 | 224 | ||
225 | if (ABS(derot_freq) > derot_limit) | 225 | if (abs(derot_freq) > derot_limit) |
226 | next_loop--; | 226 | next_loop--; |
227 | 227 | ||
228 | if (next_loop) { | 228 | if (next_loop) { |
@@ -298,7 +298,7 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state) | |||
298 | last_derot_freq = derot_freq; | 298 | last_derot_freq = derot_freq; |
299 | derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */ | 299 | derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */ |
300 | 300 | ||
301 | if(ABS(derot_freq) > derot_limit) | 301 | if(abs(derot_freq) > derot_limit) |
302 | next_loop--; | 302 | next_loop--; |
303 | 303 | ||
304 | if (next_loop) { | 304 | if (next_loop) { |
@@ -400,7 +400,7 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state) | |||
400 | if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) { | 400 | if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) { |
401 | 401 | ||
402 | derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */ | 402 | derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */ |
403 | if (ABS(derot_freq) > derot_limit) | 403 | if (abs(derot_freq) > derot_limit) |
404 | next_loop--; | 404 | next_loop--; |
405 | 405 | ||
406 | if (next_loop) { | 406 | if (next_loop) { |
@@ -467,7 +467,7 @@ static void next_sub_range(struct stb0899_state *state) | |||
467 | 467 | ||
468 | if (internal->sub_dir > 0) { | 468 | if (internal->sub_dir > 0) { |
469 | old_sub_range = internal->sub_range; | 469 | old_sub_range = internal->sub_range; |
470 | internal->sub_range = MIN((internal->srch_range / 2) - | 470 | internal->sub_range = min((internal->srch_range / 2) - |
471 | (internal->tuner_offst + internal->sub_range / 2), | 471 | (internal->tuner_offst + internal->sub_range / 2), |
472 | internal->sub_range); | 472 | internal->sub_range); |
473 | 473 | ||
@@ -771,7 +771,7 @@ static long Log2Int(int number) | |||
771 | int i; | 771 | int i; |
772 | 772 | ||
773 | i = 0; | 773 | i = 0; |
774 | while ((1 << i) <= ABS(number)) | 774 | while ((1 << i) <= abs(number)) |
775 | i++; | 775 | i++; |
776 | 776 | ||
777 | if (number == 0) | 777 | if (number == 0) |
diff --git a/drivers/media/dvb/frontends/stb0899_drv.c b/drivers/media/dvb/frontends/stb0899_drv.c index 10613acf18f5..a04c782fff8d 100644 --- a/drivers/media/dvb/frontends/stb0899_drv.c +++ b/drivers/media/dvb/frontends/stb0899_drv.c | |||
@@ -794,7 +794,7 @@ static int stb0899_send_diseqc_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t | |||
794 | reg = stb0899_read_reg(state, STB0899_DISCNTRL1); | 794 | reg = stb0899_read_reg(state, STB0899_DISCNTRL1); |
795 | old_state = reg; | 795 | old_state = reg; |
796 | /* set to burst mode */ | 796 | /* set to burst mode */ |
797 | STB0899_SETFIELD_VAL(DISEQCMODE, reg, 0x02); | 797 | STB0899_SETFIELD_VAL(DISEQCMODE, reg, 0x03); |
798 | STB0899_SETFIELD_VAL(DISPRECHARGE, reg, 0x01); | 798 | STB0899_SETFIELD_VAL(DISPRECHARGE, reg, 0x01); |
799 | stb0899_write_reg(state, STB0899_DISCNTRL1, reg); | 799 | stb0899_write_reg(state, STB0899_DISCNTRL1, reg); |
800 | switch (burst) { | 800 | switch (burst) { |
diff --git a/drivers/media/dvb/frontends/stb0899_priv.h b/drivers/media/dvb/frontends/stb0899_priv.h index 24619e3689db..82395b912815 100644 --- a/drivers/media/dvb/frontends/stb0899_priv.h +++ b/drivers/media/dvb/frontends/stb0899_priv.h | |||
@@ -59,10 +59,6 @@ | |||
59 | #define MAKEWORD32(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) | 59 | #define MAKEWORD32(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) |
60 | #define MAKEWORD16(a, b) (((a) << 8) | (b)) | 60 | #define MAKEWORD16(a, b) (((a) << 8) | (b)) |
61 | 61 | ||
62 | #define MIN(x, y) ((x) <= (y) ? (x) : (y)) | ||
63 | #define MAX(x, y) ((x) >= (y) ? (x) : (y)) | ||
64 | #define ABS(x) ((x) >= 0 ? (x) : -(x)) | ||
65 | |||
66 | #define LSB(x) ((x & 0xff)) | 62 | #define LSB(x) ((x & 0xff)) |
67 | #define MSB(y) ((y >> 8) & 0xff) | 63 | #define MSB(y) ((y >> 8) & 0xff) |
68 | 64 | ||
@@ -168,10 +164,10 @@ struct stb0899_internal { | |||
168 | u32 freq; /* Demod internal Frequency */ | 164 | u32 freq; /* Demod internal Frequency */ |
169 | u32 srate; /* Demod internal Symbol rate */ | 165 | u32 srate; /* Demod internal Symbol rate */ |
170 | enum stb0899_fec fecrate; /* Demod internal FEC rate */ | 166 | enum stb0899_fec fecrate; /* Demod internal FEC rate */ |
171 | u32 srch_range; /* Demod internal Search Range */ | 167 | s32 srch_range; /* Demod internal Search Range */ |
172 | u32 sub_range; /* Demod current sub range (Hz) */ | 168 | s32 sub_range; /* Demod current sub range (Hz) */ |
173 | u32 tuner_step; /* Tuner step (Hz) */ | 169 | s32 tuner_step; /* Tuner step (Hz) */ |
174 | u32 tuner_offst; /* Relative offset to carrier (Hz) */ | 170 | s32 tuner_offst; /* Relative offset to carrier (Hz) */ |
175 | u32 tuner_bw; /* Current bandwidth of the tuner (Hz) */ | 171 | u32 tuner_bw; /* Current bandwidth of the tuner (Hz) */ |
176 | 172 | ||
177 | s32 mclk; /* Masterclock Divider factor (binary) */ | 173 | s32 mclk; /* Masterclock Divider factor (binary) */ |
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index ff39275ab49c..1ed5a7db4c5e 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c | |||
@@ -427,11 +427,11 @@ static int stb6100_init(struct dvb_frontend *fe) | |||
427 | status->refclock = 27000000; /* Hz */ | 427 | status->refclock = 27000000; /* Hz */ |
428 | status->iqsense = 1; | 428 | status->iqsense = 1; |
429 | status->bandwidth = 36000; /* kHz */ | 429 | status->bandwidth = 36000; /* kHz */ |
430 | state->bandwidth = status->bandwidth * 1000; /* MHz */ | 430 | state->bandwidth = status->bandwidth * 1000; /* Hz */ |
431 | state->reference = status->refclock / 1000; /* kHz */ | 431 | state->reference = status->refclock / 1000; /* kHz */ |
432 | 432 | ||
433 | /* Set default bandwidth. */ | 433 | /* Set default bandwidth. */ |
434 | return stb6100_set_bandwidth(fe, status->bandwidth); | 434 | return stb6100_set_bandwidth(fe, state->bandwidth); |
435 | } | 435 | } |
436 | 436 | ||
437 | static int stb6100_get_state(struct dvb_frontend *fe, | 437 | static int stb6100_get_state(struct dvb_frontend *fe, |
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 170720b02815..b150ed306696 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c | |||
@@ -590,7 +590,7 @@ static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) | |||
590 | struct zl10353_state *state = fe->demodulator_priv; | 590 | struct zl10353_state *state = fe->demodulator_priv; |
591 | u8 val = 0x0a; | 591 | u8 val = 0x0a; |
592 | 592 | ||
593 | if (state->config.no_tuner) { | 593 | if (state->config.disable_i2c_gate_ctrl) { |
594 | /* No tuner attached to the internal I2C bus */ | 594 | /* No tuner attached to the internal I2C bus */ |
595 | /* If set enable I2C bridge, the main I2C bus stopped hardly */ | 595 | /* If set enable I2C bridge, the main I2C bus stopped hardly */ |
596 | return 0; | 596 | return 0; |
diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index fdbb88ff75fe..2287bac46243 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h | |||
@@ -38,6 +38,9 @@ struct zl10353_config | |||
38 | 38 | ||
39 | /* set if parallel ts output is required */ | 39 | /* set if parallel ts output is required */ |
40 | int parallel_ts; | 40 | int parallel_ts; |
41 | |||
42 | /* set if i2c_gate_ctrl disable is required */ | ||
43 | u8 disable_i2c_gate_ctrl:1; | ||
41 | }; | 44 | }; |
42 | 45 | ||
43 | #if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE)) | 46 | #if defined(CONFIG_DVB_ZL10353) || (defined(CONFIG_DVB_ZL10353_MODULE) && defined(MODULE)) |
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index e564a61a72d7..48892b5715d5 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -102,7 +102,11 @@ int s5k4aa_probe(struct sd *sd) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | /* Test some registers, but we don't know their exact meaning yet */ | 104 | /* Test some registers, but we don't know their exact meaning yet */ |
105 | if (m5602_read_sensor(sd, 0x00, prod_id, sizeof(prod_id))) | 105 | if (m5602_read_sensor(sd, 0x00, prod_id, 2)) |
106 | return -ENODEV; | ||
107 | if (m5602_read_sensor(sd, 0x02, prod_id+2, 2)) | ||
108 | return -ENODEV; | ||
109 | if (m5602_read_sensor(sd, 0x04, prod_id+4, 2)) | ||
106 | return -ENODEV; | 110 | return -ENODEV; |
107 | 111 | ||
108 | if (memcmp(prod_id, expected_prod_id, sizeof(prod_id))) | 112 | if (memcmp(prod_id, expected_prod_id, sizeof(prod_id))) |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 0776ecf56d27..b5370b3e1a3d 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -860,6 +860,7 @@ static struct zl10353_config behold_h6_config = { | |||
860 | .demod_address = 0x1e>>1, | 860 | .demod_address = 0x1e>>1, |
861 | .no_tuner = 1, | 861 | .no_tuner = 1, |
862 | .parallel_ts = 1, | 862 | .parallel_ts = 1, |
863 | .disable_i2c_gate_ctrl = 1, | ||
863 | }; | 864 | }; |
864 | 865 | ||
865 | /* ================================================================== | 866 | /* ================================================================== |
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 5aeccb301cea..076ed5bf48b1 100644 --- a/drivers/media/video/tvaudio.c +++ b/drivers/media/video/tvaudio.c | |||
@@ -54,7 +54,7 @@ MODULE_LICENSE("GPL"); | |||
54 | /* ---------------------------------------------------------------------- */ | 54 | /* ---------------------------------------------------------------------- */ |
55 | /* our structs */ | 55 | /* our structs */ |
56 | 56 | ||
57 | #define MAXREGS 64 | 57 | #define MAXREGS 256 |
58 | 58 | ||
59 | struct CHIPSTATE; | 59 | struct CHIPSTATE; |
60 | typedef int (*getvalue)(int); | 60 | typedef int (*getvalue)(int); |
diff --git a/drivers/media/video/zoran/Kconfig b/drivers/media/video/zoran/Kconfig index 4ea5fa71de89..8666e19f31a7 100644 --- a/drivers/media/video/zoran/Kconfig +++ b/drivers/media/video/zoran/Kconfig | |||
@@ -68,6 +68,7 @@ config VIDEO_ZORAN_AVS6EYES | |||
68 | tristate "AverMedia 6 Eyes support (EXPERIMENTAL)" | 68 | tristate "AverMedia 6 Eyes support (EXPERIMENTAL)" |
69 | depends on VIDEO_ZORAN_ZR36060 && EXPERIMENTAL && VIDEO_V4L1 | 69 | depends on VIDEO_ZORAN_ZR36060 && EXPERIMENTAL && VIDEO_V4L1 |
70 | select VIDEO_BT856 if VIDEO_HELPER_CHIPS_AUTO | 70 | select VIDEO_BT856 if VIDEO_HELPER_CHIPS_AUTO |
71 | select VIDEO_BT866 if VIDEO_HELPER_CHIPS_AUTO | ||
71 | select VIDEO_KS0127 if VIDEO_HELPER_CHIPS_AUTO | 72 | select VIDEO_KS0127 if VIDEO_HELPER_CHIPS_AUTO |
72 | help | 73 | help |
73 | Support for the AverMedia 6 Eyes video surveillance card. | 74 | Support for the AverMedia 6 Eyes video surveillance card. |