diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/Makefile | 3 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1409.c | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda10086.c | 14 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/zl10353.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/zl10353.h | 2 |
6 files changed, 25 insertions, 13 deletions
diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile index 73ac0a93fdeb..60a910052c16 100644 --- a/drivers/media/dvb/dvb-usb/Makefile +++ b/drivers/media/dvb/dvb-usb/Makefile | |||
@@ -62,3 +62,6 @@ dvb-usb-af9005-remote-objs = af9005-remote.o | |||
62 | obj-$(CONFIG_DVB_USB_AF9005_REMOTE) += dvb-usb-af9005-remote.o | 62 | obj-$(CONFIG_DVB_USB_AF9005_REMOTE) += dvb-usb-af9005-remote.o |
63 | 63 | ||
64 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ | 64 | EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/ |
65 | # due to tuner-xc3028 | ||
66 | EXTRA_CFLAGS += -Idrivers/media/video | ||
67 | |||
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index 9a184da01c47..8ee6cd4da9e7 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c | |||
@@ -223,6 +223,9 @@ static struct dibx000_agc_config dib3000p_panasonic_agc_config = { | |||
223 | .agc2_slope2 = 0x1e, | 223 | .agc2_slope2 = 0x1e, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | #if defined(CONFIG_DVB_DIB3000MC) || \ | ||
227 | (defined(CONFIG_DVB_DIB3000MC_MODULE) && defined(MODULE)) | ||
228 | |||
226 | static struct dib3000mc_config mod3000p_dib3000p_config = { | 229 | static struct dib3000mc_config mod3000p_dib3000p_config = { |
227 | &dib3000p_panasonic_agc_config, | 230 | &dib3000p_panasonic_agc_config, |
228 | 231 | ||
@@ -305,6 +308,7 @@ int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap) | |||
305 | return 0; | 308 | return 0; |
306 | } | 309 | } |
307 | EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); | 310 | EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); |
311 | #endif | ||
308 | 312 | ||
309 | /* | 313 | /* |
310 | * common remote control stuff | 314 | * common remote control stuff |
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 8dee7ec9456a..562d9208857a 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
@@ -107,7 +107,7 @@ static struct vsb_snr_tab { | |||
107 | u16 val; | 107 | u16 val; |
108 | u16 data; | 108 | u16 data; |
109 | } vsb_snr_tab[] = { | 109 | } vsb_snr_tab[] = { |
110 | { 1023, 770, }, | 110 | { 924, 300, }, |
111 | { 923, 300, }, | 111 | { 923, 300, }, |
112 | { 918, 295, }, | 112 | { 918, 295, }, |
113 | { 915, 290, }, | 113 | { 915, 290, }, |
@@ -154,6 +154,7 @@ static struct qam64_snr_tab { | |||
154 | u16 val; | 154 | u16 val; |
155 | u16 data; | 155 | u16 data; |
156 | } qam64_snr_tab[] = { | 156 | } qam64_snr_tab[] = { |
157 | { 1, 0, }, | ||
157 | { 12, 300, }, | 158 | { 12, 300, }, |
158 | { 15, 290, }, | 159 | { 15, 290, }, |
159 | { 18, 280, }, | 160 | { 18, 280, }, |
@@ -217,6 +218,7 @@ static struct qam64_snr_tab { | |||
217 | { 95, 202, }, | 218 | { 95, 202, }, |
218 | { 96, 201, }, | 219 | { 96, 201, }, |
219 | { 104, 200, }, | 220 | { 104, 200, }, |
221 | { 255, 0, }, | ||
220 | }; | 222 | }; |
221 | 223 | ||
222 | /* QAM256 SNR lookup table */ | 224 | /* QAM256 SNR lookup table */ |
@@ -224,6 +226,7 @@ static struct qam256_snr_tab { | |||
224 | u16 val; | 226 | u16 val; |
225 | u16 data; | 227 | u16 data; |
226 | } qam256_snr_tab[] = { | 228 | } qam256_snr_tab[] = { |
229 | { 1, 0, }, | ||
227 | { 12, 400, }, | 230 | { 12, 400, }, |
228 | { 13, 390, }, | 231 | { 13, 390, }, |
229 | { 15, 380, }, | 232 | { 15, 380, }, |
@@ -292,6 +295,7 @@ static struct qam256_snr_tab { | |||
292 | { 105, 262, }, | 295 | { 105, 262, }, |
293 | { 106, 261, }, | 296 | { 106, 261, }, |
294 | { 110, 260, }, | 297 | { 110, 260, }, |
298 | { 255, 0, }, | ||
295 | }; | 299 | }; |
296 | 300 | ||
297 | /* 8 bit registers, 16 bit values */ | 301 | /* 8 bit registers, 16 bit values */ |
@@ -670,14 +674,15 @@ static int s5h1409_read_snr(struct dvb_frontend* fe, u16* snr) | |||
670 | u16 reg; | 674 | u16 reg; |
671 | dprintk("%s()\n", __FUNCTION__); | 675 | dprintk("%s()\n", __FUNCTION__); |
672 | 676 | ||
673 | reg = s5h1409_readreg(state, 0xf1) & 0x1ff; | ||
674 | |||
675 | switch(state->current_modulation) { | 677 | switch(state->current_modulation) { |
676 | case QAM_64: | 678 | case QAM_64: |
679 | reg = s5h1409_readreg(state, 0xf0) & 0xff; | ||
677 | return s5h1409_qam64_lookup_snr(fe, snr, reg); | 680 | return s5h1409_qam64_lookup_snr(fe, snr, reg); |
678 | case QAM_256: | 681 | case QAM_256: |
682 | reg = s5h1409_readreg(state, 0xf0) & 0xff; | ||
679 | return s5h1409_qam256_lookup_snr(fe, snr, reg); | 683 | return s5h1409_qam256_lookup_snr(fe, snr, reg); |
680 | case VSB_8: | 684 | case VSB_8: |
685 | reg = s5h1409_readreg(state, 0xf1) & 0x3ff; | ||
681 | return s5h1409_vsb_lookup_snr(fe, snr, reg); | 686 | return s5h1409_vsb_lookup_snr(fe, snr, reg); |
682 | default: | 687 | default: |
683 | break; | 688 | break; |
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c index 9a8ddc537f8f..9d26ace65151 100644 --- a/drivers/media/dvb/frontends/tda10086.c +++ b/drivers/media/dvb/frontends/tda10086.c | |||
@@ -158,7 +158,7 @@ static int tda10086_init(struct dvb_frontend* fe) | |||
158 | tda10086_write_byte(state, 0x3d, 0x80); | 158 | tda10086_write_byte(state, 0x3d, 0x80); |
159 | 159 | ||
160 | // setup SEC | 160 | // setup SEC |
161 | tda10086_write_byte(state, 0x36, 0x00); // all SEC off | 161 | tda10086_write_byte(state, 0x36, 0x80); // all SEC off, no 22k tone |
162 | tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000))); // } tone frequency | 162 | tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000))); // } tone frequency |
163 | tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // } | 163 | tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // } |
164 | 164 | ||
@@ -183,13 +183,13 @@ static int tda10086_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone) | |||
183 | 183 | ||
184 | dprintk ("%s\n", __FUNCTION__); | 184 | dprintk ("%s\n", __FUNCTION__); |
185 | 185 | ||
186 | switch(tone) { | 186 | switch (tone) { |
187 | case SEC_TONE_OFF: | 187 | case SEC_TONE_OFF: |
188 | tda10086_write_byte(state, 0x36, 0x00); | 188 | tda10086_write_byte(state, 0x36, 0x80); |
189 | break; | 189 | break; |
190 | 190 | ||
191 | case SEC_TONE_ON: | 191 | case SEC_TONE_ON: |
192 | tda10086_write_byte(state, 0x36, 0x01); | 192 | tda10086_write_byte(state, 0x36, 0x81); |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | 195 | ||
@@ -212,7 +212,7 @@ static int tda10086_send_master_cmd (struct dvb_frontend* fe, | |||
212 | for(i=0; i< cmd->msg_len; i++) { | 212 | for(i=0; i< cmd->msg_len; i++) { |
213 | tda10086_write_byte(state, 0x48+i, cmd->msg[i]); | 213 | tda10086_write_byte(state, 0x48+i, cmd->msg[i]); |
214 | } | 214 | } |
215 | tda10086_write_byte(state, 0x36, 0x08 | ((cmd->msg_len - 1) << 4)); | 215 | tda10086_write_byte(state, 0x36, 0x88 | ((cmd->msg_len - 1) << 4)); |
216 | 216 | ||
217 | tda10086_diseqc_wait(state); | 217 | tda10086_diseqc_wait(state); |
218 | 218 | ||
@@ -230,11 +230,11 @@ static int tda10086_send_burst (struct dvb_frontend* fe, fe_sec_mini_cmd_t minic | |||
230 | 230 | ||
231 | switch(minicmd) { | 231 | switch(minicmd) { |
232 | case SEC_MINI_A: | 232 | case SEC_MINI_A: |
233 | tda10086_write_byte(state, 0x36, 0x04); | 233 | tda10086_write_byte(state, 0x36, 0x84); |
234 | break; | 234 | break; |
235 | 235 | ||
236 | case SEC_MINI_B: | 236 | case SEC_MINI_B: |
237 | tda10086_write_byte(state, 0x36, 0x06); | 237 | tda10086_write_byte(state, 0x36, 0x86); |
238 | break; | 238 | break; |
239 | } | 239 | } |
240 | 240 | ||
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index a97a7fd2c891..0106df4c55e8 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c | |||
@@ -122,7 +122,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, | |||
122 | enum fe_bandwidth bandwidth, | 122 | enum fe_bandwidth bandwidth, |
123 | u16 *nominal_rate) | 123 | u16 *nominal_rate) |
124 | { | 124 | { |
125 | u32 adc_clock = 22528; /* 20.480 MHz on the board(!?) */ | 125 | u32 adc_clock = 45056; /* 45.056 MHz */ |
126 | u8 bw; | 126 | u8 bw; |
127 | struct zl10353_state *state = fe->demodulator_priv; | 127 | struct zl10353_state *state = fe->demodulator_priv; |
128 | 128 | ||
@@ -142,7 +142,7 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, | |||
142 | break; | 142 | break; |
143 | } | 143 | } |
144 | 144 | ||
145 | *nominal_rate = (64 * bw * (1<<16) / (7 * 8) * 4000 / adc_clock + 2) / 4; | 145 | *nominal_rate = (bw * (1 << 23) / 7 * 125 + adc_clock / 2) / adc_clock; |
146 | 146 | ||
147 | dprintk("%s: bw %d, adc_clock %d => 0x%x\n", | 147 | dprintk("%s: bw %d, adc_clock %d => 0x%x\n", |
148 | __FUNCTION__, bw, adc_clock, *nominal_rate); | 148 | __FUNCTION__, bw, adc_clock, *nominal_rate); |
diff --git a/drivers/media/dvb/frontends/zl10353.h b/drivers/media/dvb/frontends/zl10353.h index cb274dc12b82..1c3d494a6da9 100644 --- a/drivers/media/dvb/frontends/zl10353.h +++ b/drivers/media/dvb/frontends/zl10353.h | |||
@@ -30,7 +30,7 @@ struct zl10353_config | |||
30 | u8 demod_address; | 30 | u8 demod_address; |
31 | 31 | ||
32 | /* frequencies in kHz */ | 32 | /* frequencies in kHz */ |
33 | int adc_clock; // default: 22528 | 33 | int adc_clock; /* default: 45056 */ |
34 | 34 | ||
35 | /* set if no pll is connected to the secondary i2c bus */ | 35 | /* set if no pll is connected to the secondary i2c bus */ |
36 | int no_tuner; | 36 | int no_tuner; |