diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index fcd25511209b..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" |
@@ -46,7 +48,6 @@ if (debug >= level) \ | |||
46 | } while (0) | 48 | } while (0) |
47 | 49 | ||
48 | #define EM28XX_DVB_NUM_BUFS 5 | 50 | #define EM28XX_DVB_NUM_BUFS 5 |
49 | #define EM28XX_DVB_MAX_PACKETSIZE 564 | ||
50 | #define EM28XX_DVB_MAX_PACKETS 64 | 51 | #define EM28XX_DVB_MAX_PACKETS 64 |
51 | 52 | ||
52 | struct em28xx_dvb { | 53 | struct em28xx_dvb { |
@@ -142,14 +143,17 @@ static int start_streaming(struct em28xx_dvb *dvb) | |||
142 | { | 143 | { |
143 | int rc; | 144 | int rc; |
144 | struct em28xx *dev = dvb->adapter.priv; | 145 | struct em28xx *dev = dvb->adapter.priv; |
146 | int max_dvb_packet_size; | ||
145 | 147 | ||
146 | usb_set_interface(dev->udev, 0, 1); | 148 | usb_set_interface(dev->udev, 0, 1); |
147 | rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); | 149 | rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); |
148 | if (rc < 0) | 150 | if (rc < 0) |
149 | return rc; | 151 | return rc; |
150 | 152 | ||
153 | max_dvb_packet_size = em28xx_isoc_dvb_max_packetsize(dev); | ||
154 | |||
151 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, | 155 | return em28xx_init_isoc(dev, EM28XX_DVB_MAX_PACKETS, |
152 | EM28XX_DVB_NUM_BUFS, EM28XX_DVB_MAX_PACKETSIZE, | 156 | EM28XX_DVB_NUM_BUFS, max_dvb_packet_size, |
153 | dvb_isoc_copy); | 157 | dvb_isoc_copy); |
154 | } | 158 | } |
155 | 159 | ||
@@ -431,6 +435,7 @@ static int dvb_init(struct em28xx *dev) | |||
431 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: | 435 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
432 | case EM2880_BOARD_TERRATEC_HYBRID_XS: | 436 | case EM2880_BOARD_TERRATEC_HYBRID_XS: |
433 | case EM2880_BOARD_KWORLD_DVB_310U: | 437 | case EM2880_BOARD_KWORLD_DVB_310U: |
438 | case EM2880_BOARD_EMPIRE_DUAL_TV: | ||
434 | dvb->frontend = dvb_attach(zl10353_attach, | 439 | dvb->frontend = dvb_attach(zl10353_attach, |
435 | &em28xx_zl10353_with_xc3028, | 440 | &em28xx_zl10353_with_xc3028, |
436 | &dev->i2c_adap); | 441 | &dev->i2c_adap); |
@@ -448,6 +453,18 @@ static int dvb_init(struct em28xx *dev) | |||
448 | goto out_free; | 453 | goto out_free; |
449 | } | 454 | } |
450 | 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; | ||
451 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: | 468 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
452 | #ifdef EM28XX_DRX397XD_SUPPORT | 469 | #ifdef EM28XX_DRX397XD_SUPPORT |
453 | /* We don't have the config structure properly populated, so | 470 | /* We don't have the config structure properly populated, so |