diff options
author | Antti Palosaari <crope@iki.fi> | 2012-03-18 17:09:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-19 21:22:53 -0400 |
commit | 3553085cb47b10762e77ca783683dbf8142f9762 (patch) | |
tree | 32b28149686ee7316fc146694bb90d50e36c9674 /drivers/media/video/em28xx | |
parent | 67de3311a0de1366cda1504b9a0a87dec885243a (diff) |
[media] em28xx: support for 1b80:e425 MaxMedia UB425-TC
Hardware is based of:
Empia EM2874B
Micronas DRX 3913KA2
NXP TDA18271HDC2
Only DVB-C supported currently since missing firmware.
According to my tests, DRX 3913KA2 demodulator requires firmware
in order to support DVB-T mode.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 24 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 29 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 1 |
3 files changed, 54 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index d328616519e7..70dfd3a7242d 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -353,6 +353,17 @@ static struct em28xx_reg_seq hauppauge_930c_digital[] = { | |||
353 | }; | 353 | }; |
354 | #endif | 354 | #endif |
355 | 355 | ||
356 | /* 1b80:e425 MaxMedia UB425-TC | ||
357 | * GPIO_6 - demod reset, 0=active | ||
358 | * GPIO_7 - LED, 0=active | ||
359 | */ | ||
360 | static struct em28xx_reg_seq maxmedia_ub425_tc[] = { | ||
361 | {EM2874_R80_GPIO, 0x83, 0xff, 100}, | ||
362 | {EM2874_R80_GPIO, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */ | ||
363 | {EM2874_R80_GPIO, 0x43, 0xff, 000}, /* GPIO_7 = 0 */ | ||
364 | {-1, -1, -1, -1}, | ||
365 | }; | ||
366 | |||
356 | /* | 367 | /* |
357 | * Board definitions | 368 | * Board definitions |
358 | */ | 369 | */ |
@@ -1908,6 +1919,17 @@ struct em28xx_board em28xx_boards[] = { | |||
1908 | .amux = EM28XX_AMUX_LINE_IN, | 1919 | .amux = EM28XX_AMUX_LINE_IN, |
1909 | } }, | 1920 | } }, |
1910 | }, | 1921 | }, |
1922 | /* 1b80:e425 MaxMedia UB425-TC | ||
1923 | * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */ | ||
1924 | [EM2874_BOARD_MAXMEDIA_UB425_TC] = { | ||
1925 | .name = "MaxMedia UB425-TC", | ||
1926 | .tuner_type = TUNER_ABSENT, | ||
1927 | .tuner_gpio = maxmedia_ub425_tc, | ||
1928 | .has_dvb = 1, | ||
1929 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | | ||
1930 | EM28XX_I2C_CLK_WAIT_ENABLE | | ||
1931 | EM28XX_I2C_FREQ_400_KHZ, | ||
1932 | }, | ||
1911 | }; | 1933 | }; |
1912 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); | 1934 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
1913 | 1935 | ||
@@ -2059,6 +2081,8 @@ struct usb_device_id em28xx_id_table[] = { | |||
2059 | .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 }, | 2081 | .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 }, |
2060 | { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */ | 2082 | { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */ |
2061 | .driver_info = EM2860_BOARD_EASYCAP }, | 2083 | .driver_info = EM2860_BOARD_EASYCAP }, |
2084 | { USB_DEVICE(0x1b80, 0xe425), | ||
2085 | .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC }, | ||
2062 | { }, | 2086 | { }, |
2063 | }; | 2087 | }; |
2064 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); | 2088 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index fbd90104323d..0b3e301adde9 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -325,6 +325,12 @@ struct drxk_config hauppauge_930c_drxk = { | |||
325 | .chunk_size = 56, | 325 | .chunk_size = 56, |
326 | }; | 326 | }; |
327 | 327 | ||
328 | struct drxk_config maxmedia_ub425_tc_drxk = { | ||
329 | .adr = 0x29, | ||
330 | .single_master = 1, | ||
331 | .no_i2c_bridge = 1, | ||
332 | }; | ||
333 | |||
328 | static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) | 334 | static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) |
329 | { | 335 | { |
330 | struct em28xx_dvb *dvb = fe->sec_priv; | 336 | struct em28xx_dvb *dvb = fe->sec_priv; |
@@ -936,6 +942,29 @@ static int em28xx_dvb_init(struct em28xx *dev) | |||
936 | dvb_attach(a8293_attach, dvb->fe[0], &dev->i2c_adap, | 942 | dvb_attach(a8293_attach, dvb->fe[0], &dev->i2c_adap, |
937 | &em28xx_a8293_config); | 943 | &em28xx_a8293_config); |
938 | break; | 944 | break; |
945 | case EM2874_BOARD_MAXMEDIA_UB425_TC: | ||
946 | /* attach demodulator */ | ||
947 | dvb->fe[0] = dvb_attach(drxk_attach, &maxmedia_ub425_tc_drxk, | ||
948 | &dev->i2c_adap); | ||
949 | |||
950 | if (dvb->fe[0]) { | ||
951 | /* disable I2C-gate */ | ||
952 | dvb->fe[0]->ops.i2c_gate_ctrl = NULL; | ||
953 | |||
954 | /* attach tuner */ | ||
955 | if (!dvb_attach(tda18271c2dd_attach, dvb->fe[0], | ||
956 | &dev->i2c_adap, 0x60)) { | ||
957 | dvb_frontend_detach(dvb->fe[0]); | ||
958 | result = -EINVAL; | ||
959 | goto out_free; | ||
960 | } | ||
961 | } | ||
962 | |||
963 | /* TODO: we need drx-3913k firmware in order to support DVB-T */ | ||
964 | em28xx_info("MaxMedia UB425-TC: only DVB-C supported by that " \ | ||
965 | "driver version\n"); | ||
966 | |||
967 | break; | ||
939 | default: | 968 | default: |
940 | em28xx_errdev("/2: The frontend of your DVB/ATSC card" | 969 | em28xx_errdev("/2: The frontend of your DVB/ATSC card" |
941 | " isn't supported yet\n"); | 970 | " isn't supported yet\n"); |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 6a27e6109b87..ca90a4dcc93f 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #define EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C 81 | 125 | #define EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C 81 |
126 | #define EM2884_BOARD_CINERGY_HTC_STICK 82 | 126 | #define EM2884_BOARD_CINERGY_HTC_STICK 82 |
127 | #define EM2860_BOARD_HT_VIDBOX_NW03 83 | 127 | #define EM2860_BOARD_HT_VIDBOX_NW03 83 |
128 | #define EM2874_BOARD_MAXMEDIA_UB425_TC 84 | ||
128 | 129 | ||
129 | /* Limits minimum and default number of buffers */ | 130 | /* Limits minimum and default number of buffers */ |
130 | #define EM28XX_MIN_BUF 4 | 131 | #define EM28XX_MIN_BUF 4 |