diff options
-rw-r--r-- | drivers/media/usb/cx231xx/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-cards.c | 29 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 70 | ||||
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx.h | 1 |
4 files changed, 101 insertions, 0 deletions
diff --git a/drivers/media/usb/cx231xx/Kconfig b/drivers/media/usb/cx231xx/Kconfig index 0cced3e5b040..58de80bff4c7 100644 --- a/drivers/media/usb/cx231xx/Kconfig +++ b/drivers/media/usb/cx231xx/Kconfig | |||
@@ -50,6 +50,7 @@ config VIDEO_CX231XX_DVB | |||
50 | select DVB_LGDT3306A if MEDIA_SUBDRV_AUTOSELECT | 50 | select DVB_LGDT3306A if MEDIA_SUBDRV_AUTOSELECT |
51 | select DVB_TDA18271C2DD if MEDIA_SUBDRV_AUTOSELECT | 51 | select DVB_TDA18271C2DD if MEDIA_SUBDRV_AUTOSELECT |
52 | select DVB_SI2165 if MEDIA_SUBDRV_AUTOSELECT | 52 | select DVB_SI2165 if MEDIA_SUBDRV_AUTOSELECT |
53 | select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT | ||
53 | select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT | 54 | select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT |
54 | 55 | ||
55 | ---help--- | 56 | ---help--- |
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 36bc25494319..f730fdbc9156 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c | |||
@@ -841,6 +841,33 @@ struct cx231xx_board cx231xx_boards[] = { | |||
841 | .gpio = NULL, | 841 | .gpio = NULL, |
842 | } }, | 842 | } }, |
843 | }, | 843 | }, |
844 | [CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD] = { | ||
845 | .name = "Evromedia USB Full Hybrid Full HD", | ||
846 | .tuner_type = TUNER_ABSENT, | ||
847 | .demod_addr = 0x64, /* 0xc8 >> 1 */ | ||
848 | .demod_i2c_master = I2C_1_MUX_3, | ||
849 | .has_dvb = 1, | ||
850 | .ir_i2c_master = I2C_0, | ||
851 | .norm = V4L2_STD_PAL, | ||
852 | .output_mode = OUT_MODE_VIP11, | ||
853 | .tuner_addr = 0x60, /* 0xc0 >> 1 */ | ||
854 | .tuner_i2c_master = I2C_2, | ||
855 | .input = {{ | ||
856 | .type = CX231XX_VMUX_TELEVISION, | ||
857 | .vmux = 0, | ||
858 | .amux = CX231XX_AMUX_VIDEO, | ||
859 | }, { | ||
860 | .type = CX231XX_VMUX_COMPOSITE1, | ||
861 | .vmux = CX231XX_VIN_2_1, | ||
862 | .amux = CX231XX_AMUX_LINE_IN, | ||
863 | }, { | ||
864 | .type = CX231XX_VMUX_SVIDEO, | ||
865 | .vmux = CX231XX_VIN_1_1 | | ||
866 | (CX231XX_VIN_1_2 << 8) | | ||
867 | CX25840_SVIDEO_ON, | ||
868 | .amux = CX231XX_AMUX_LINE_IN, | ||
869 | } }, | ||
870 | }, | ||
844 | }; | 871 | }; |
845 | const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); | 872 | const unsigned int cx231xx_bcount = ARRAY_SIZE(cx231xx_boards); |
846 | 873 | ||
@@ -908,6 +935,8 @@ struct usb_device_id cx231xx_id_table[] = { | |||
908 | .driver_info = CX231XX_BOARD_OTG102}, | 935 | .driver_info = CX231XX_BOARD_OTG102}, |
909 | {USB_DEVICE(USB_VID_TERRATEC, 0x00a6), | 936 | {USB_DEVICE(USB_VID_TERRATEC, 0x00a6), |
910 | .driver_info = CX231XX_BOARD_TERRATEC_GRABBY}, | 937 | .driver_info = CX231XX_BOARD_TERRATEC_GRABBY}, |
938 | {USB_DEVICE(0x1b80, 0xd3b2), | ||
939 | .driver_info = CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD}, | ||
911 | {}, | 940 | {}, |
912 | }; | 941 | }; |
913 | 942 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 2868546999ca..46427fd3b220 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "s5h1411.h" | 33 | #include "s5h1411.h" |
34 | #include "lgdt3305.h" | 34 | #include "lgdt3305.h" |
35 | #include "si2165.h" | 35 | #include "si2165.h" |
36 | #include "si2168.h" | ||
36 | #include "mb86a20s.h" | 37 | #include "mb86a20s.h" |
37 | #include "si2157.h" | 38 | #include "si2157.h" |
38 | #include "lgdt3306a.h" | 39 | #include "lgdt3306a.h" |
@@ -949,6 +950,75 @@ static int dvb_init(struct cx231xx *dev) | |||
949 | &pv_tda18271_config); | 950 | &pv_tda18271_config); |
950 | break; | 951 | break; |
951 | 952 | ||
953 | case CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD: | ||
954 | { | ||
955 | struct si2157_config si2157_config = {}; | ||
956 | struct si2168_config si2168_config = {}; | ||
957 | struct i2c_board_info info = {}; | ||
958 | struct i2c_client *client; | ||
959 | struct i2c_adapter *adapter; | ||
960 | |||
961 | /* attach demodulator chip */ | ||
962 | si2168_config.ts_mode = SI2168_TS_SERIAL; /* from *.inf file */ | ||
963 | si2168_config.fe = &dev->dvb->frontend; | ||
964 | si2168_config.i2c_adapter = &adapter; | ||
965 | si2168_config.ts_clock_inv = true; | ||
966 | |||
967 | strlcpy(info.type, "si2168", sizeof(info.type)); | ||
968 | info.addr = dev->board.demod_addr; | ||
969 | info.platform_data = &si2168_config; | ||
970 | |||
971 | request_module(info.type); | ||
972 | client = i2c_new_device(demod_i2c, &info); | ||
973 | |||
974 | if (client == NULL || client->dev.driver == NULL) { | ||
975 | result = -ENODEV; | ||
976 | goto out_free; | ||
977 | } | ||
978 | |||
979 | if (!try_module_get(client->dev.driver->owner)) { | ||
980 | i2c_unregister_device(client); | ||
981 | result = -ENODEV; | ||
982 | goto out_free; | ||
983 | } | ||
984 | |||
985 | dvb->i2c_client_demod = client; | ||
986 | |||
987 | /* attach tuner chip */ | ||
988 | si2157_config.fe = dev->dvb->frontend; | ||
989 | #ifdef CONFIG_MEDIA_CONTROLLER_DVB | ||
990 | si2157_config.mdev = dev->media_dev; | ||
991 | #endif | ||
992 | si2157_config.if_port = 1; | ||
993 | si2157_config.inversion = false; | ||
994 | |||
995 | memset(&info, 0, sizeof(info)); | ||
996 | strlcpy(info.type, "si2157", sizeof(info.type)); | ||
997 | info.addr = dev->board.tuner_addr; | ||
998 | info.platform_data = &si2157_config; | ||
999 | |||
1000 | request_module(info.type); | ||
1001 | client = i2c_new_device(tuner_i2c, &info); | ||
1002 | |||
1003 | if (client == NULL || client->dev.driver == NULL) { | ||
1004 | module_put(dvb->i2c_client_demod->dev.driver->owner); | ||
1005 | i2c_unregister_device(dvb->i2c_client_demod); | ||
1006 | result = -ENODEV; | ||
1007 | goto out_free; | ||
1008 | } | ||
1009 | |||
1010 | if (!try_module_get(client->dev.driver->owner)) { | ||
1011 | i2c_unregister_device(client); | ||
1012 | module_put(dvb->i2c_client_demod->dev.driver->owner); | ||
1013 | i2c_unregister_device(dvb->i2c_client_demod); | ||
1014 | result = -ENODEV; | ||
1015 | goto out_free; | ||
1016 | } | ||
1017 | |||
1018 | dev->cx231xx_reset_analog_tuner = NULL; | ||
1019 | dev->dvb->i2c_client_tuner = client; | ||
1020 | break; | ||
1021 | } | ||
952 | default: | 1022 | default: |
953 | dev_err(dev->dev, | 1023 | dev_err(dev->dev, |
954 | "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 1024 | "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index 90c867683076..d9792ea4bbc6 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -78,6 +78,7 @@ | |||
78 | #define CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx 20 | 78 | #define CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx 20 |
79 | #define CX231XX_BOARD_HAUPPAUGE_955Q 21 | 79 | #define CX231XX_BOARD_HAUPPAUGE_955Q 21 |
80 | #define CX231XX_BOARD_TERRATEC_GRABBY 22 | 80 | #define CX231XX_BOARD_TERRATEC_GRABBY 22 |
81 | #define CX231XX_BOARD_EVROMEDIA_FULL_HYBRID_FULLHD 23 | ||
81 | 82 | ||
82 | /* Limits minimum and default number of buffers */ | 83 | /* Limits minimum and default number of buffers */ |
83 | #define CX231XX_MIN_BUF 4 | 84 | #define CX231XX_MIN_BUF 4 |