aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorOlivier Grenie <olivier.grenie@dibcom.fr>2010-09-07 11:50:46 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-09-27 21:21:58 -0400
commit970d14c6cca8c71307a4d23fe373c5895175b2d7 (patch)
tree238df31ec325c07c4e845e5a8a2e989de4454d10 /drivers/media
parent90e12cec707204930934acdb5efce5f94a163a5f (diff)
V4L/DVB: dib7000p: add disable sample and hold, and diversity delay parameter
This patch improves the overall driver performance in diversity-reception scenarios. Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c1
-rw-r--r--drivers/media/dvb/frontends/dib7000p.c6
-rw-r--r--drivers/media/dvb/frontends/dib7000p.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 385ce1c0a934..e06acd1fecb6 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -956,6 +956,7 @@ static struct dib7000p_config dib7770p_dib7000p_config = {
956 956
957 .hostbus_diversity = 1, 957 .hostbus_diversity = 1,
958 .enable_current_mirror = 1, 958 .enable_current_mirror = 1,
959 .disable_sample_and_hold = 0,
959}; 960};
960 961
961static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap) 962static int stk7770p_frontend_attach(struct dvb_usb_adapter *adap)
diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c
index 73f59ab06c86..3aed0d433921 100644
--- a/drivers/media/dvb/frontends/dib7000p.c
+++ b/drivers/media/dvb/frontends/dib7000p.c
@@ -260,6 +260,7 @@ static void dib7000p_set_adc_state(struct dib7000p_state *state, enum dibx000_ad
260 260
261// dprintk( "908: %x, 909: %x\n", reg_908, reg_909); 261// dprintk( "908: %x, 909: %x\n", reg_908, reg_909);
262 262
263 reg_909 |= (state->cfg.disable_sample_and_hold & 1) << 4;
263 reg_908 |= (state->cfg.enable_current_mirror & 1) << 7; 264 reg_908 |= (state->cfg.enable_current_mirror & 1) << 7;
264 265
265 dib7000p_write_word(state, 908, reg_908); 266 dib7000p_write_word(state, 908, reg_908);
@@ -780,7 +781,10 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct dvb_fronte
780 default: 781 default:
781 case GUARD_INTERVAL_1_32: value *= 1; break; 782 case GUARD_INTERVAL_1_32: value *= 1; break;
782 } 783 }
783 state->div_sync_wait = (value * 3) / 2 + 32; // add 50% SFN margin + compensate for one DVSY-fifo TODO 784 if (state->cfg.diversity_delay == 0)
785 state->div_sync_wait = (value * 3) / 2 + 48; // add 50% SFN margin + compensate for one DVSY-fifo
786 else
787 state->div_sync_wait = (value * 3) / 2 + state->cfg.diversity_delay; // add 50% SFN margin + compensate for one DVSY-fifo
784 788
785 /* deactive the possibility of diversity reception if extended interleaver */ 789 /* deactive the possibility of diversity reception if extended interleaver */
786 state->div_force_off = !1 && ch->u.ofdm.transmission_mode != TRANSMISSION_MODE_8K; 790 state->div_force_off = !1 && ch->u.ofdm.transmission_mode != TRANSMISSION_MODE_8K;
diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h
index 04a744938cca..da17345bf5bd 100644
--- a/drivers/media/dvb/frontends/dib7000p.h
+++ b/drivers/media/dvb/frontends/dib7000p.h
@@ -33,8 +33,10 @@ struct dib7000p_config {
33 int (*agc_control) (struct dvb_frontend *, u8 before); 33 int (*agc_control) (struct dvb_frontend *, u8 before);
34 34
35 u8 output_mode; 35 u8 output_mode;
36 u8 disable_sample_and_hold : 1;
36 37
37 u8 enable_current_mirror : 1; 38 u8 enable_current_mirror : 1;
39 u8 diversity_delay;
38 40
39}; 41};
40 42