aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2011-08-12 17:29:46 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-07 07:26:57 -0500
commit608add85decc7a13194072fbb0c6aadc89d394e5 (patch)
tree18928114b8a7d7271d95fc8f6b4753cbcce5424e
parentb682ad1d178d1686a4db07535d1e611342cde012 (diff)
[media] anysee: add support for Anysee E7 T2C
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig1
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.c69
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.h1
3 files changed, 70 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index 58257165761e..3e316f2f7de1 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -311,6 +311,7 @@ config DVB_USB_ANYSEE
311 select DVB_STV0900 if !DVB_FE_CUSTOMISE 311 select DVB_STV0900 if !DVB_FE_CUSTOMISE
312 select DVB_STV6110 if !DVB_FE_CUSTOMISE 312 select DVB_STV6110 if !DVB_FE_CUSTOMISE
313 select DVB_ISL6423 if !DVB_FE_CUSTOMISE 313 select DVB_ISL6423 if !DVB_FE_CUSTOMISE
314 select DVB_CXD2820R if !DVB_FE_CUSTOMISE
314 help 315 help
315 Say Y here to support the Anysee E30, Anysee E30 Plus or 316 Say Y here to support the Anysee E30, Anysee E30 Plus or
316 Anysee E30 C Plus DVB USB2.0 receiver. 317 Anysee E30 C Plus DVB USB2.0 receiver.
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index 5f2278b73ee9..9c1ed3b2da8b 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -41,6 +41,7 @@
41#include "stv0900.h" 41#include "stv0900.h"
42#include "stv6110.h" 42#include "stv6110.h"
43#include "isl6423.h" 43#include "isl6423.h"
44#include "cxd2820r.h"
44 45
45/* debug */ 46/* debug */
46static int dvb_usb_anysee_debug; 47static int dvb_usb_anysee_debug;
@@ -309,6 +310,17 @@ static struct tda18212_config anysee_tda18212_config = {
309 .if_dvbc = 5000, 310 .if_dvbc = 5000,
310}; 311};
311 312
313static struct tda18212_config anysee_tda18212_config2 = {
314 .i2c_address = 0x60 /* (0xc0 >> 1) */,
315 .if_dvbt_6 = 3550,
316 .if_dvbt_7 = 3700,
317 .if_dvbt_8 = 4150,
318 .if_dvbt2_6 = 3250,
319 .if_dvbt2_7 = 4000,
320 .if_dvbt2_8 = 4000,
321 .if_dvbc = 5000,
322};
323
312static struct cx24116_config anysee_cx24116_config = { 324static struct cx24116_config anysee_cx24116_config = {
313 .demod_address = (0xaa >> 1), 325 .demod_address = (0xaa >> 1),
314 .mpg_clk_pos_pol = 0x00, 326 .mpg_clk_pos_pol = 0x00,
@@ -339,6 +351,18 @@ static struct isl6423_config anysee_isl6423_config = {
339 .addr = (0x10 >> 1), 351 .addr = (0x10 >> 1),
340}; 352};
341 353
354static struct cxd2820r_config anysee_cxd2820r_config = {
355 .i2c_address = 0x6d, /* (0xda >> 1) */
356 .ts_mode = 0x38,
357 .if_dvbt_6 = 3550,
358 .if_dvbt_7 = 3700,
359 .if_dvbt_8 = 4150,
360 .if_dvbt2_6 = 3250,
361 .if_dvbt2_7 = 4000,
362 .if_dvbt2_8 = 4000,
363 .if_dvbc = 5000,
364};
365
342/* 366/*
343 * New USB device strings: Mfr=1, Product=2, SerialNumber=0 367 * New USB device strings: Mfr=1, Product=2, SerialNumber=0
344 * Manufacturer: AMT.CO.KR 368 * Manufacturer: AMT.CO.KR
@@ -421,6 +445,14 @@ static struct isl6423_config anysee_isl6423_config = {
421 * IOA[7] TS 1=enabled 445 * IOA[7] TS 1=enabled
422 * IOE[5] STV0903 1=enabled 446 * IOE[5] STV0903 1=enabled
423 * 447 *
448 * E7 T2C VID=1c73 PID=861f HW=20 FW=0.1 AMTCI=0.5 "anysee-E7T2C(LP)"
449 * PCB: 508T2C (rev0.3)
450 * parts: DNOQ44QCH106A(CXD2820R, TDA18212), TDA8024
451 * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff
452 * IOA=4d IOB=00 IOC=cc IOD=48 IOE=e4
453 * IOA[7] TS 1=enabled
454 * IOE[5] CXD2820R 1=enabled
455 *
424 * E7 PTC VID=1c73 PID=861f HW=21 FW=0.1 AMTCI=?? "anysee-E7PTC(LP)" 456 * E7 PTC VID=1c73 PID=861f HW=21 FW=0.1 AMTCI=?? "anysee-E7PTC(LP)"
425 * PCB: 508PTC (rev0.5) 457 * PCB: 508PTC (rev0.5)
426 * parts: ZL10353, TDA10023, DNOD44CDH086A(TDA18212) 458 * parts: ZL10353, TDA10023, DNOD44CDH086A(TDA18212)
@@ -437,7 +469,7 @@ static struct isl6423_config anysee_isl6423_config = {
437 * IOD[6] ZL10353 1=enabled 469 * IOD[6] ZL10353 1=enabled
438 * IOE[0] IF 0=enabled 470 * IOE[0] IF 0=enabled
439 * 471 *
440 * E7 S2 VID=1c73 PID=861f HW=22 FW=0.1 AMTCI=?? "anysee-E7PS2(LP)" 472 * E7 PS2 VID=1c73 PID=861f HW=22 FW=0.1 AMTCI=?? "anysee-E7PS2(LP)"
441 * PCB: 508PS2 (rev0.4) 473 * PCB: 508PS2 (rev0.4)
442 * parts: DNBU10512IST(STV0903, STV6110), ISL6423 474 * parts: DNBU10512IST(STV0903, STV6110), ISL6423
443 * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff 475 * OEA=80 OEB=00 OEC=03 OED=f7 OEE=ff
@@ -818,6 +850,32 @@ static int anysee_frontend_attach(struct dvb_usb_adapter *adap)
818 &adap->dev->i2c_adap, 0); 850 &adap->dev->i2c_adap, 0);
819 851
820 break; 852 break;
853 case ANYSEE_HW_508T2C: /* 20 */
854 /* E7 T2C */
855
856 /* enable transport stream on IOA[7] */
857 ret = anysee_wr_reg_mask(adap->dev, REG_IOA, (1 << 7), 0x80);
858 if (ret)
859 goto error;
860
861 /* enable DVB-T/T2/C demod on IOE[5] */
862 ret = anysee_wr_reg_mask(adap->dev, REG_IOE, (1 << 5), 0x20);
863 if (ret)
864 goto error;
865
866 if (state->fe_id == 0) {
867 /* DVB-T/T2 */
868 adap->fe[0] = dvb_attach(cxd2820r_attach,
869 &anysee_cxd2820r_config,
870 &adap->dev->i2c_adap, NULL);
871 } else {
872 /* DVB-C */
873 adap->fe[1] = dvb_attach(cxd2820r_attach,
874 &anysee_cxd2820r_config,
875 &adap->dev->i2c_adap, adap->fe[0]);
876 }
877
878 break;
821 } 879 }
822 880
823 if (!adap->fe_adap[0].fe) { 881 if (!adap->fe_adap[0].fe) {
@@ -930,6 +988,15 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap)
930 } 988 }
931 989
932 break; 990 break;
991
992 case ANYSEE_HW_508T2C: /* 20 */
993 /* E7 T2C */
994
995 /* attach tuner */
996 fe = dvb_attach(tda18212_attach, adap->fe[state->fe_id],
997 &adap->dev->i2c_adap, &anysee_tda18212_config2);
998
999 break;
933 default: 1000 default:
934 fe = NULL; 1001 fe = NULL;
935 } 1002 }
diff --git a/drivers/media/dvb/dvb-usb/anysee.h b/drivers/media/dvb/dvb-usb/anysee.h
index 57ee500b8c0e..da323507b504 100644
--- a/drivers/media/dvb/dvb-usb/anysee.h
+++ b/drivers/media/dvb/dvb-usb/anysee.h
@@ -69,6 +69,7 @@ struct anysee_state {
69#define ANYSEE_HW_507FA 15 /* E30 Combo Plus / E30 C Plus */ 69#define ANYSEE_HW_507FA 15 /* E30 Combo Plus / E30 C Plus */
70#define ANYSEE_HW_508TC 18 /* E7 TC */ 70#define ANYSEE_HW_508TC 18 /* E7 TC */
71#define ANYSEE_HW_508S2 19 /* E7 S2 */ 71#define ANYSEE_HW_508S2 19 /* E7 S2 */
72#define ANYSEE_HW_508T2C 20 /* E7 T2C */
72#define ANYSEE_HW_508PTC 21 /* E7 PTC Plus */ 73#define ANYSEE_HW_508PTC 21 /* E7 PTC Plus */
73#define ANYSEE_HW_508PS2 22 /* E7 PS2 Plus */ 74#define ANYSEE_HW_508PS2 22 /* E7 PS2 Plus */
74 75