diff options
author | Franklin Meng <fmeng2002@yahoo.com> | 2009-06-06 16:05:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 18:07:45 -0400 |
commit | d7de5d8ff74efd01916b01af875a0e87419a3599 (patch) | |
tree | 2d119ef78e22dad435b95a65b5822375fa3fa415 /drivers/media | |
parent | ae3340cbf59ea362c2016eea762456cc0969fd9e (diff) |
V4L/DVB (11977): em28xx: Add Kworld 315 entry
Added an entry for Kworld 315 (for while, dvb only)
Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 69 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 14 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 1 |
3 files changed, 84 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index d3b0eb3bdf61..00cc791a9e44 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -109,6 +109,24 @@ static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | |||
109 | /* Board - EM2870 Kworld 355u | 109 | /* Board - EM2870 Kworld 355u |
110 | Analog - No input analog */ | 110 | Analog - No input analog */ |
111 | 111 | ||
112 | /* Board - EM2882 Kworld 315U digital */ | ||
113 | static struct em28xx_reg_seq em2882_kworld_315u_digital[] = { | ||
114 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, | ||
115 | {EM28XX_R08_GPIO, 0xfe, 0xff, 10}, | ||
116 | {EM2880_R04_GPO, 0x04, 0xff, 10}, | ||
117 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | ||
118 | {EM28XX_R08_GPIO, 0x7e, 0xff, 10}, | ||
119 | { -1, -1, -1, -1}, | ||
120 | }; | ||
121 | |||
122 | static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = { | ||
123 | {EM2880_R04_GPO, 0x08, 0xff, 10}, | ||
124 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | ||
125 | {EM2880_R04_GPO, 0x08, 0xff, 10}, | ||
126 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | ||
127 | { -1, -1, -1, -1}, | ||
128 | }; | ||
129 | |||
112 | static struct em28xx_reg_seq kworld_330u_analog[] = { | 130 | static struct em28xx_reg_seq kworld_330u_analog[] = { |
113 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, | 131 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, |
114 | {EM2880_R04_GPO, 0x00, 0xff, 10}, | 132 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
@@ -1111,6 +1129,38 @@ struct em28xx_board em28xx_boards[] = { | |||
1111 | .gpio = default_analog, | 1129 | .gpio = default_analog, |
1112 | } }, | 1130 | } }, |
1113 | }, | 1131 | }, |
1132 | [EM2882_BOARD_KWORLD_ATSC_315U] = { | ||
1133 | .name = "KWorld ATSC 315U HDTV TV Box", | ||
1134 | .valid = EM28XX_BOARD_NOT_VALIDATED, | ||
1135 | .tuner_type = TUNER_THOMSON_DTT761X, | ||
1136 | .tuner_gpio = em2882_kworld_315u_tuner_gpio, | ||
1137 | .tda9887_conf = TDA9887_PRESENT, | ||
1138 | .decoder = EM28XX_SAA711X, | ||
1139 | .has_dvb = 1, | ||
1140 | .dvb_gpio = em2882_kworld_315u_digital, | ||
1141 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | ||
1142 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, | ||
1143 | /* Analog mode - still not ready */ | ||
1144 | /*.input = { { | ||
1145 | .type = EM28XX_VMUX_TELEVISION, | ||
1146 | .vmux = SAA7115_COMPOSITE2, | ||
1147 | .amux = EM28XX_AMUX_VIDEO, | ||
1148 | .gpio = em2882_kworld_315u_analog, | ||
1149 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | ||
1150 | }, { | ||
1151 | .type = EM28XX_VMUX_COMPOSITE1, | ||
1152 | .vmux = SAA7115_COMPOSITE0, | ||
1153 | .amux = EM28XX_AMUX_LINE_IN, | ||
1154 | .gpio = em2882_kworld_315u_analog1, | ||
1155 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | ||
1156 | }, { | ||
1157 | .type = EM28XX_VMUX_SVIDEO, | ||
1158 | .vmux = SAA7115_SVIDEO3, | ||
1159 | .amux = EM28XX_AMUX_LINE_IN, | ||
1160 | .gpio = em2882_kworld_315u_analog1, | ||
1161 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | ||
1162 | } }, */ | ||
1163 | }, | ||
1114 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { | 1164 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { |
1115 | .name = "Empire dual TV", | 1165 | .name = "Empire dual TV", |
1116 | .tuner_type = TUNER_XC2028, | 1166 | .tuner_type = TUNER_XC2028, |
@@ -1432,6 +1482,8 @@ struct usb_device_id em28xx_id_table[] = { | |||
1432 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, | 1482 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, |
1433 | { USB_DEVICE(0xeb1a, 0xe310), | 1483 | { USB_DEVICE(0xeb1a, 0xe310), |
1434 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, | 1484 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, |
1485 | { USB_DEVICE(0xeb1a, 0xa313), | ||
1486 | .driver_info = EM2882_BOARD_KWORLD_ATSC_315U }, | ||
1435 | { USB_DEVICE(0xeb1a, 0xa316), | 1487 | { USB_DEVICE(0xeb1a, 0xa316), |
1436 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, | 1488 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
1437 | { USB_DEVICE(0xeb1a, 0xe320), | 1489 | { USB_DEVICE(0xeb1a, 0xe320), |
@@ -1701,6 +1753,17 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1701 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); | 1753 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
1702 | break; | 1754 | break; |
1703 | 1755 | ||
1756 | case EM2882_BOARD_KWORLD_ATSC_315U: | ||
1757 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff); | ||
1758 | msleep(10); | ||
1759 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); | ||
1760 | msleep(10); | ||
1761 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); | ||
1762 | msleep(10); | ||
1763 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x08); | ||
1764 | msleep(10); | ||
1765 | break; | ||
1766 | |||
1704 | case EM2860_BOARD_KAIOMY_TVNPC_U2: | 1767 | case EM2860_BOARD_KAIOMY_TVNPC_U2: |
1705 | em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1); | 1768 | em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1); |
1706 | em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); | 1769 | em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); |
@@ -2010,6 +2073,12 @@ void em28xx_card_setup(struct em28xx *dev) | |||
2010 | #endif | 2073 | #endif |
2011 | break; | 2074 | break; |
2012 | } | 2075 | } |
2076 | case EM2882_BOARD_KWORLD_ATSC_315U: | ||
2077 | em28xx_write_reg(dev, 0x0d, 0x42); | ||
2078 | msleep(10); | ||
2079 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); | ||
2080 | msleep(10); | ||
2081 | break; | ||
2013 | case EM2820_BOARD_KWORLD_PVRTV2800RF: | 2082 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
2014 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ | 2083 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ |
2015 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf9); | 2084 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf9); |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index e0438acf1224..563dd2b1c8e9 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include "em28xx.h" | 25 | #include "em28xx.h" |
26 | #include <media/v4l2-common.h> | 26 | #include <media/v4l2-common.h> |
27 | #include <media/videobuf-vmalloc.h> | 27 | #include <media/videobuf-vmalloc.h> |
28 | #include <media/tuner.h> | ||
29 | #include "tuner-simple.h" | ||
28 | 30 | ||
29 | #include "lgdt330x.h" | 31 | #include "lgdt330x.h" |
30 | #include "zl10353.h" | 32 | #include "zl10353.h" |
@@ -451,6 +453,18 @@ static int dvb_init(struct em28xx *dev) | |||
451 | goto out_free; | 453 | goto out_free; |
452 | } | 454 | } |
453 | break; | 455 | break; |
456 | case EM2882_BOARD_KWORLD_ATSC_315U: | ||
457 | dvb->frontend = dvb_attach(lgdt330x_attach, | ||
458 | &em2880_lgdt3303_dev, | ||
459 | &dev->i2c_adap); | ||
460 | if (dvb->frontend != NULL) { | ||
461 | if (!dvb_attach(simple_tuner_attach, dvb->frontend, | ||
462 | &dev->i2c_adap, 0x61, TUNER_THOMSON_DTT761X)) { | ||
463 | result = -EINVAL; | ||
464 | goto out_free; | ||
465 | } | ||
466 | } | ||
467 | break; | ||
454 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: | 468 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
455 | #ifdef EM28XX_DRX397XD_SUPPORT | 469 | #ifdef EM28XX_DRX397XD_SUPPORT |
456 | /* We don't have the config structure properly populated, so | 470 | /* We don't have the config structure properly populated, so |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 2ddd59d21096..8bf81be1da61 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -105,6 +105,7 @@ | |||
105 | #define EM2880_BOARD_EMPIRE_DUAL_TV 66 | 105 | #define EM2880_BOARD_EMPIRE_DUAL_TV 66 |
106 | #define EM2860_BOARD_TERRATEC_GRABBY 67 | 106 | #define EM2860_BOARD_TERRATEC_GRABBY 67 |
107 | #define EM2860_BOARD_TERRATEC_AV350 68 | 107 | #define EM2860_BOARD_TERRATEC_AV350 68 |
108 | #define EM2882_BOARD_KWORLD_ATSC_315U 69 | ||
108 | 109 | ||
109 | /* Limits minimum and default number of buffers */ | 110 | /* Limits minimum and default number of buffers */ |
110 | #define EM28XX_MIN_BUF 4 | 111 | #define EM28XX_MIN_BUF 4 |