diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 20:37:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:41 -0400 |
commit | 227ad4ab9058ef2624934183e8083886cf64bf56 (patch) | |
tree | 8cc10b3cc1ea7b23c54411c007581e5cd9ec6217 /drivers | |
parent | ee6e3a865a469c78daa93a1e6cdbaca3a102f9c8 (diff) |
V4L/DVB (7596): em28xx-dvb: Add support for HVR950
This patch adds DVB support for Hauppauge HVR950.
Thanks to Michael Krufky <mkrufky@linuxtv.org> for getting those values.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/em28xx/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 29 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 17 |
3 files changed, 45 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/Kconfig b/drivers/media/video/em28xx/Kconfig index 2b47a9bd0b65..4818cda38913 100644 --- a/drivers/media/video/em28xx/Kconfig +++ b/drivers/media/video/em28xx/Kconfig | |||
@@ -31,6 +31,7 @@ config VIDEO_EM28XX_ALSA | |||
31 | config VIDEO_EM28XX_DVB | 31 | config VIDEO_EM28XX_DVB |
32 | tristate "DVB/ATSC Support for em28xx based TV cards" | 32 | tristate "DVB/ATSC Support for em28xx based TV cards" |
33 | depends on VIDEO_EM28XX && DVB_CORE | 33 | depends on VIDEO_EM28XX && DVB_CORE |
34 | select DVB_LGDT330X if !DVB_FE_CUSTOMISE | ||
34 | select VIDEOBUF_DVB | 35 | select VIDEOBUF_DVB |
35 | select FW_LOADER | 36 | select FW_LOADER |
36 | ---help--- | 37 | ---help--- |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index c907d6a5a056..710f110b6e8a 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -180,6 +180,7 @@ struct em28xx_board em28xx_boards[] = { | |||
180 | .tuner_type = TUNER_XC2028, | 180 | .tuner_type = TUNER_XC2028, |
181 | .mts_firmware = 1, | 181 | .mts_firmware = 1, |
182 | .has_12mhz_i2s = 1, | 182 | .has_12mhz_i2s = 1, |
183 | .has_dvb = 1, | ||
183 | .decoder = EM28XX_TVP5150, | 184 | .decoder = EM28XX_TVP5150, |
184 | .input = { { | 185 | .input = { { |
185 | .type = EM28XX_VMUX_TELEVISION, | 186 | .type = EM28XX_VMUX_TELEVISION, |
@@ -194,6 +195,32 @@ struct em28xx_board em28xx_boards[] = { | |||
194 | .vmux = TVP5150_SVIDEO, | 195 | .vmux = TVP5150_SVIDEO, |
195 | .amux = 1, | 196 | .amux = 1, |
196 | } }, | 197 | } }, |
198 | .analog_gpio = { | ||
199 | { /* xc3028 reset seq */ | ||
200 | .reg = 0x08, | ||
201 | .val = 0x3d, | ||
202 | .rst = 0x2d, | ||
203 | .t1 = 5, | ||
204 | .t2 = 10, | ||
205 | .t3 = 5, | ||
206 | }, | ||
207 | }, | ||
208 | .digital_gpio = { | ||
209 | { /* xc3028 reset seq */ | ||
210 | .reg = 0x08, | ||
211 | .val = 0x3e, | ||
212 | .rst = 0x2e, | ||
213 | .t1 = 6, | ||
214 | .t2 = 6, | ||
215 | .t3 = 6, | ||
216 | }, { /* demod reset seq */ | ||
217 | .reg = 0x04, | ||
218 | .val = 0x0c, | ||
219 | .rst = 0x04, | ||
220 | .t2 = 10, | ||
221 | .t3 = 10, | ||
222 | } | ||
223 | }, | ||
197 | }, | 224 | }, |
198 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { | 225 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
199 | .name = "Terratec Hybrid XS", | 226 | .name = "Terratec Hybrid XS", |
@@ -521,7 +548,7 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
521 | 548 | ||
522 | /* Put xc2028 tuners and demods into a sane state */ | 549 | /* Put xc2028 tuners and demods into a sane state */ |
523 | if (dev->tuner_type == TUNER_XC2028) { | 550 | if (dev->tuner_type == TUNER_XC2028) { |
524 | dev->mode = EM28XX_DIGITAL_MODE; | 551 | dev->mode = EM28XX_ANALOG_MODE; |
525 | em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0); | 552 | em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0); |
526 | }; | 553 | }; |
527 | } | 554 | } |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index 1ffe64f62095..1645021191a8 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -58,7 +58,10 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size) | |||
58 | 58 | ||
59 | /* ------------------------------------------------------------------ */ | 59 | /* ------------------------------------------------------------------ */ |
60 | 60 | ||
61 | /* Add demods here */ | 61 | static struct lgdt330x_config em2880_lgdt3303_dev = { |
62 | .demod_address = 0x0e, | ||
63 | .demod_chip = LGDT3303, | ||
64 | }; | ||
62 | 65 | ||
63 | /* ------------------------------------------------------------------ */ | 66 | /* ------------------------------------------------------------------ */ |
64 | 67 | ||
@@ -70,6 +73,7 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) | |||
70 | .i2c_adap = &dev->i2c_adap, | 73 | .i2c_adap = &dev->i2c_adap, |
71 | .i2c_addr = addr, | 74 | .i2c_addr = addr, |
72 | .ctrl = &ctl, | 75 | .ctrl = &ctl, |
76 | .callback = em28xx_tuner_callback, | ||
73 | }; | 77 | }; |
74 | 78 | ||
75 | if (!dev->dvb.frontend) { | 79 | if (!dev->dvb.frontend) { |
@@ -109,6 +113,17 @@ static int dvb_init(struct em28xx *dev) | |||
109 | 113 | ||
110 | /* init frontend */ | 114 | /* init frontend */ |
111 | switch (dev->model) { | 115 | switch (dev->model) { |
116 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: | ||
117 | /* Enable lgdt330x */ | ||
118 | dev->mode = EM28XX_ANALOG_MODE; | ||
119 | em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0); | ||
120 | |||
121 | dev->dvb.frontend = dvb_attach(lgdt330x_attach, | ||
122 | &em2880_lgdt3303_dev, | ||
123 | &dev->i2c_adap); | ||
124 | if (attach_xc3028(0x61, dev) < 0) | ||
125 | return -EINVAL; | ||
126 | break; | ||
112 | default: | 127 | default: |
113 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" | 128 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" |
114 | " isn't supported yet\n", | 129 | " isn't supported yet\n", |