diff options
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/au8522.c | 47 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/au8522.h | 11 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx22702.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx24123.c | 6 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cx24123.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1409.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1409.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1411.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1411.h | 2 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/s5h1420.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda10048.c | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/tda10048.h | 2 |
13 files changed, 67 insertions, 22 deletions
diff --git a/drivers/media/dvb/frontends/au8522.c b/drivers/media/dvb/frontends/au8522.c index f7b71657f0f6..0b82cc2a1e16 100644 --- a/drivers/media/dvb/frontends/au8522.c +++ b/drivers/media/dvb/frontends/au8522.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Auvitek AU8522 QAM/8VSB demodulator driver | 2 | Auvitek AU8522 QAM/8VSB demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -304,6 +304,43 @@ static int au8522_mse2snr_lookup(struct mse2snr_tab *tab, int sz, int mse, | |||
304 | return ret; | 304 | return ret; |
305 | } | 305 | } |
306 | 306 | ||
307 | static int au8522_set_if(struct dvb_frontend *fe, enum au8522_if_freq if_freq) | ||
308 | { | ||
309 | struct au8522_state *state = fe->demodulator_priv; | ||
310 | u8 r0b5, r0b6, r0b7; | ||
311 | char *ifmhz; | ||
312 | |||
313 | switch (if_freq) { | ||
314 | case AU8522_IF_3_25MHZ: | ||
315 | ifmhz = "3.25"; | ||
316 | r0b5 = 0x00; | ||
317 | r0b6 = 0x3d; | ||
318 | r0b7 = 0xa0; | ||
319 | break; | ||
320 | case AU8522_IF_4MHZ: | ||
321 | ifmhz = "4.00"; | ||
322 | r0b5 = 0x00; | ||
323 | r0b6 = 0x4b; | ||
324 | r0b7 = 0xd9; | ||
325 | break; | ||
326 | case AU8522_IF_6MHZ: | ||
327 | ifmhz = "6.00"; | ||
328 | r0b5 = 0xfb; | ||
329 | r0b6 = 0x8e; | ||
330 | r0b7 = 0x39; | ||
331 | break; | ||
332 | default: | ||
333 | dprintk("%s() IF Frequency not supported\n", __func__); | ||
334 | return -EINVAL; | ||
335 | } | ||
336 | dprintk("%s() %s MHz\n", __func__, ifmhz); | ||
337 | au8522_writereg(state, 0x80b5, r0b5); | ||
338 | au8522_writereg(state, 0x80b6, r0b6); | ||
339 | au8522_writereg(state, 0x80b7, r0b7); | ||
340 | |||
341 | return 0; | ||
342 | } | ||
343 | |||
307 | /* VSB Modulation table */ | 344 | /* VSB Modulation table */ |
308 | static struct { | 345 | static struct { |
309 | u16 reg; | 346 | u16 reg; |
@@ -334,9 +371,6 @@ static struct { | |||
334 | { 0x80af, 0x66 }, | 371 | { 0x80af, 0x66 }, |
335 | { 0x821b, 0xcc }, | 372 | { 0x821b, 0xcc }, |
336 | { 0x821d, 0x80 }, | 373 | { 0x821d, 0x80 }, |
337 | { 0x80b5, 0xfb }, | ||
338 | { 0x80b6, 0x8e }, | ||
339 | { 0x80b7, 0x39 }, | ||
340 | { 0x80a4, 0xe8 }, | 374 | { 0x80a4, 0xe8 }, |
341 | { 0x8231, 0x13 }, | 375 | { 0x8231, 0x13 }, |
342 | }; | 376 | }; |
@@ -350,9 +384,6 @@ static struct { | |||
350 | { 0x80a4, 0x00 }, | 384 | { 0x80a4, 0x00 }, |
351 | { 0x8081, 0xc4 }, | 385 | { 0x8081, 0xc4 }, |
352 | { 0x80a5, 0x40 }, | 386 | { 0x80a5, 0x40 }, |
353 | { 0x80b5, 0xfb }, | ||
354 | { 0x80b6, 0x8e }, | ||
355 | { 0x80b7, 0x39 }, | ||
356 | { 0x80aa, 0x77 }, | 387 | { 0x80aa, 0x77 }, |
357 | { 0x80ad, 0x77 }, | 388 | { 0x80ad, 0x77 }, |
358 | { 0x80a6, 0x67 }, | 389 | { 0x80a6, 0x67 }, |
@@ -438,6 +469,7 @@ static int au8522_enable_modulation(struct dvb_frontend *fe, | |||
438 | au8522_writereg(state, | 469 | au8522_writereg(state, |
439 | VSB_mod_tab[i].reg, | 470 | VSB_mod_tab[i].reg, |
440 | VSB_mod_tab[i].data); | 471 | VSB_mod_tab[i].data); |
472 | au8522_set_if(fe, state->config->vsb_if); | ||
441 | break; | 473 | break; |
442 | case QAM_64: | 474 | case QAM_64: |
443 | case QAM_256: | 475 | case QAM_256: |
@@ -446,6 +478,7 @@ static int au8522_enable_modulation(struct dvb_frontend *fe, | |||
446 | au8522_writereg(state, | 478 | au8522_writereg(state, |
447 | QAM_mod_tab[i].reg, | 479 | QAM_mod_tab[i].reg, |
448 | QAM_mod_tab[i].data); | 480 | QAM_mod_tab[i].data); |
481 | au8522_set_if(fe, state->config->qam_if); | ||
449 | break; | 482 | break; |
450 | default: | 483 | default: |
451 | dprintk("%s() Invalid modulation\n", __func__); | 484 | dprintk("%s() Invalid modulation\n", __func__); |
diff --git a/drivers/media/dvb/frontends/au8522.h b/drivers/media/dvb/frontends/au8522.h index d7affa3cdb27..595915ade8c3 100644 --- a/drivers/media/dvb/frontends/au8522.h +++ b/drivers/media/dvb/frontends/au8522.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Auvitek AU8522 QAM/8VSB demodulator driver | 2 | Auvitek AU8522 QAM/8VSB demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -24,6 +24,12 @@ | |||
24 | 24 | ||
25 | #include <linux/dvb/frontend.h> | 25 | #include <linux/dvb/frontend.h> |
26 | 26 | ||
27 | enum au8522_if_freq { | ||
28 | AU8522_IF_6MHZ = 0, | ||
29 | AU8522_IF_4MHZ, | ||
30 | AU8522_IF_3_25MHZ, | ||
31 | }; | ||
32 | |||
27 | struct au8522_config { | 33 | struct au8522_config { |
28 | /* the demodulator's i2c address */ | 34 | /* the demodulator's i2c address */ |
29 | u8 demod_address; | 35 | u8 demod_address; |
@@ -32,6 +38,9 @@ struct au8522_config { | |||
32 | #define AU8522_TUNERLOCKING 0 | 38 | #define AU8522_TUNERLOCKING 0 |
33 | #define AU8522_DEMODLOCKING 1 | 39 | #define AU8522_DEMODLOCKING 1 |
34 | u8 status_mode; | 40 | u8 status_mode; |
41 | |||
42 | enum au8522_if_freq vsb_if; | ||
43 | enum au8522_if_freq qam_if; | ||
35 | }; | 44 | }; |
36 | 45 | ||
37 | #if defined(CONFIG_DVB_AU8522) || \ | 46 | #if defined(CONFIG_DVB_AU8522) || \ |
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c index cc1db4e371c3..9430e03dba6c 100644 --- a/drivers/media/dvb/frontends/cx22702.c +++ b/drivers/media/dvb/frontends/cx22702.c | |||
@@ -7,7 +7,7 @@ | |||
7 | Copyright (C) 2001-2002 Convergence Integrated Media GmbH | 7 | Copyright (C) 2001-2002 Convergence Integrated Media GmbH |
8 | Holger Waechtler <holger@convergence.de> | 8 | Holger Waechtler <holger@convergence.de> |
9 | 9 | ||
10 | Copyright (C) 2004 Steven Toth <stoth@hauppauge.com> | 10 | Copyright (C) 2004 Steven Toth <stoth@linuxtv.org> |
11 | 11 | ||
12 | This program is free software; you can redistribute it and/or modify | 12 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/dvb/frontends/cx22702.h b/drivers/media/dvb/frontends/cx22702.h index 8af766a31552..b1e465c6c2ce 100644 --- a/drivers/media/dvb/frontends/cx22702.h +++ b/drivers/media/dvb/frontends/cx22702.h | |||
@@ -7,7 +7,7 @@ | |||
7 | Copyright (C) 2001-2002 Convergence Integrated Media GmbH | 7 | Copyright (C) 2001-2002 Convergence Integrated Media GmbH |
8 | Holger Waechtler <holger@convergence.de> | 8 | Holger Waechtler <holger@convergence.de> |
9 | 9 | ||
10 | Copyright (C) 2004 Steven Toth <stoth@hauppauge.com> | 10 | Copyright (C) 2004 Steven Toth <stoth@linuxtv.org> |
11 | 11 | ||
12 | This program is free software; you can redistribute it and/or modify | 12 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index 7f68d78c6558..7156157cb34b 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver | 2 | * Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Steven Toth <stoth@hauppauge.com> | 4 | * Copyright (C) 2005 Steven Toth <stoth@linuxtv.org> |
5 | * | 5 | * |
6 | * Support for KWorld DVB-S 100 by Vadim Catana <skystar@moldova.cc> | 6 | * Support for KWorld DVB-S 100 by Vadim Catana <skystar@moldova.cc> |
7 | * | 7 | * |
@@ -1072,8 +1072,8 @@ struct dvb_frontend* cx24123_attach(const struct cx24123_config* config, | |||
1072 | if (config->dont_use_pll) | 1072 | if (config->dont_use_pll) |
1073 | cx24123_repeater_mode(state, 1, 0); | 1073 | cx24123_repeater_mode(state, 1, 0); |
1074 | 1074 | ||
1075 | strncpy(state->tuner_i2c_adapter.name, | 1075 | strlcpy(state->tuner_i2c_adapter.name, "CX24123 tuner I2C bus", |
1076 | "CX24123 tuner I2C bus", I2C_NAME_SIZE); | 1076 | sizeof(state->tuner_i2c_adapter.name)); |
1077 | state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, | 1077 | state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, |
1078 | state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo; | 1078 | state->tuner_i2c_adapter.algo = &cx24123_tuner_i2c_algo; |
1079 | state->tuner_i2c_adapter.algo_data = NULL; | 1079 | state->tuner_i2c_adapter.algo_data = NULL; |
diff --git a/drivers/media/dvb/frontends/cx24123.h b/drivers/media/dvb/frontends/cx24123.h index 81ebc3d2f19f..cc6b411d6d20 100644 --- a/drivers/media/dvb/frontends/cx24123.h +++ b/drivers/media/dvb/frontends/cx24123.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver | 2 | Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver |
3 | 3 | ||
4 | Copyright (C) 2005 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2005 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index 5ddb2dca305c..7500a1c53e68 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Samsung S5H1409 VSB/QAM demodulator driver | 2 | Samsung S5H1409 VSB/QAM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2006 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2006 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -404,6 +404,7 @@ static int s5h1409_enable_modulation(struct dvb_frontend* fe, | |||
404 | break; | 404 | break; |
405 | case QAM_64: | 405 | case QAM_64: |
406 | case QAM_256: | 406 | case QAM_256: |
407 | case QAM_AUTO: | ||
407 | dprintk("%s() QAM_AUTO (64/256)\n", __func__); | 408 | dprintk("%s() QAM_AUTO (64/256)\n", __func__); |
408 | if (state->if_freq != S5H1409_QAM_IF_FREQ) | 409 | if (state->if_freq != S5H1409_QAM_IF_FREQ) |
409 | s5h1409_set_if_freq(fe, S5H1409_QAM_IF_FREQ); | 410 | s5h1409_set_if_freq(fe, S5H1409_QAM_IF_FREQ); |
diff --git a/drivers/media/dvb/frontends/s5h1409.h b/drivers/media/dvb/frontends/s5h1409.h index 59f4335964c6..d1a1d2eb8e11 100644 --- a/drivers/media/dvb/frontends/s5h1409.h +++ b/drivers/media/dvb/frontends/s5h1409.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Samsung S5H1409 VSB/QAM demodulator driver | 2 | Samsung S5H1409 VSB/QAM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2006 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2006 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/dvb/frontends/s5h1411.c b/drivers/media/dvb/frontends/s5h1411.c index cff360ce1ba3..2da1a3763de9 100644 --- a/drivers/media/dvb/frontends/s5h1411.c +++ b/drivers/media/dvb/frontends/s5h1411.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Samsung S5H1411 VSB/QAM demodulator driver | 2 | Samsung S5H1411 VSB/QAM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -488,6 +488,7 @@ static int s5h1411_enable_modulation(struct dvb_frontend *fe, | |||
488 | break; | 488 | break; |
489 | case QAM_64: | 489 | case QAM_64: |
490 | case QAM_256: | 490 | case QAM_256: |
491 | case QAM_AUTO: | ||
491 | dprintk("%s() QAM_AUTO (64/256)\n", __func__); | 492 | dprintk("%s() QAM_AUTO (64/256)\n", __func__); |
492 | s5h1411_set_if_freq(fe, state->config->qam_if); | 493 | s5h1411_set_if_freq(fe, state->config->qam_if); |
493 | s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x00, 0x0171); | 494 | s5h1411_writereg(state, S5H1411_I2C_TOP_ADDR, 0x00, 0x0171); |
diff --git a/drivers/media/dvb/frontends/s5h1411.h b/drivers/media/dvb/frontends/s5h1411.h index 1855f64ed4d8..7d542bc00c48 100644 --- a/drivers/media/dvb/frontends/s5h1411.h +++ b/drivers/media/dvb/frontends/s5h1411.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | Samsung S5H1411 VSB/QAM demodulator driver | 2 | Samsung S5H1411 VSB/QAM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c index 720ed9ff7c5f..747d3fa2e5e5 100644 --- a/drivers/media/dvb/frontends/s5h1420.c +++ b/drivers/media/dvb/frontends/s5h1420.c | |||
@@ -915,7 +915,8 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config, | |||
915 | state->frontend.demodulator_priv = state; | 915 | state->frontend.demodulator_priv = state; |
916 | 916 | ||
917 | /* create tuner i2c adapter */ | 917 | /* create tuner i2c adapter */ |
918 | strncpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", I2C_NAME_SIZE); | 918 | strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus", |
919 | sizeof(state->tuner_i2c_adapter.name)); | ||
919 | state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, | 920 | state->tuner_i2c_adapter.class = I2C_CLASS_TV_DIGITAL, |
920 | state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo; | 921 | state->tuner_i2c_adapter.algo = &s5h1420_tuner_i2c_algo; |
921 | state->tuner_i2c_adapter.algo_data = NULL; | 922 | state->tuner_i2c_adapter.algo_data = NULL; |
diff --git a/drivers/media/dvb/frontends/tda10048.c b/drivers/media/dvb/frontends/tda10048.c index 0ab8d86b3ae3..04e7f1cc1403 100644 --- a/drivers/media/dvb/frontends/tda10048.c +++ b/drivers/media/dvb/frontends/tda10048.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | NXP TDA10048HN DVB OFDM demodulator driver | 2 | NXP TDA10048HN DVB OFDM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
@@ -303,7 +303,7 @@ static int tda10048_firmware_upload(struct dvb_frontend *fe) | |||
303 | 303 | ||
304 | if (fw->size != TDA10048_DEFAULT_FIRMWARE_SIZE) { | 304 | if (fw->size != TDA10048_DEFAULT_FIRMWARE_SIZE) { |
305 | printk(KERN_ERR "%s: firmware incorrect size\n", __func__); | 305 | printk(KERN_ERR "%s: firmware incorrect size\n", __func__); |
306 | return -EIO; | 306 | ret = -EIO; |
307 | } else { | 307 | } else { |
308 | printk(KERN_INFO "%s: firmware uploading\n", __func__); | 308 | printk(KERN_INFO "%s: firmware uploading\n", __func__); |
309 | 309 | ||
diff --git a/drivers/media/dvb/frontends/tda10048.h b/drivers/media/dvb/frontends/tda10048.h index 2b5c78e62c86..0457b24601fa 100644 --- a/drivers/media/dvb/frontends/tda10048.h +++ b/drivers/media/dvb/frontends/tda10048.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | NXP TDA10048HN DVB OFDM demodulator driver | 2 | NXP TDA10048HN DVB OFDM demodulator driver |
3 | 3 | ||
4 | Copyright (C) 2008 Steven Toth <stoth@hauppauge.com> | 4 | Copyright (C) 2008 Steven Toth <stoth@linuxtv.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |