diff options
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-cards.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-cards.c | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c index 6c8438311d3b..71c829f31d3b 100644 --- a/drivers/media/usb/em28xx/em28xx-cards.c +++ b/drivers/media/usb/em28xx/em28xx-cards.c @@ -543,7 +543,7 @@ static const struct em28xx_reg_seq hauppauge_dualhd_dvb[] = { {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */ {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, - {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50}, + {EM2874_R5F_TS_ENABLE, 0x00, 0xff, 50}, /* disable TS filters */ {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50}, {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50}, {-1, -1, -1, -1}, @@ -2688,8 +2688,6 @@ struct usb_device_id em28xx_id_table[] = { .driver_info = EM28178_BOARD_PCTV_292E }, { USB_DEVICE(0x2040, 0x8268), /* Hauppauge Retail WinTV-soloHD Bulk */ .driver_info = EM28178_BOARD_PCTV_292E }, - { USB_DEVICE(0x2040, 0x8268), /* Hauppauge WinTV-soloHD alt. PID */ - .driver_info = EM28178_BOARD_PCTV_292E }, { USB_DEVICE(0x0413, 0x6f07), .driver_info = EM2861_BOARD_LEADTEK_VC100 }, { USB_DEVICE(0xeb1a, 0x8179), @@ -2854,13 +2852,13 @@ static void em28xx_pre_card_setup(struct em28xx *dev) em28xx_write_reg(dev, EM2880_R04_GPO, 0x01); usleep_range(10000, 11000); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xdc); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); - mdelay(70); + msleep(70); break; case EM2870_BOARD_TERRATEC_XS_MT2060: /* @@ -2868,11 +2866,11 @@ static void em28xx_pre_card_setup(struct em28xx *dev) * demod work */ em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); - mdelay(70); + msleep(70); break; case EM2870_BOARD_PINNACLE_PCTV_DVB: /* @@ -2880,11 +2878,11 @@ static void em28xx_pre_card_setup(struct em28xx *dev) * DVB-T demod work */ em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); - mdelay(70); + msleep(70); em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); - mdelay(70); + msleep(70); break; case EM2820_BOARD_GADMEI_UTV310: case EM2820_BOARD_MSI_VOX_USB_2: @@ -3376,7 +3374,9 @@ void em28xx_free_device(struct kref *ref) if (!dev->disconnected) em28xx_release_resources(dev); - kfree(dev->alt_max_pkt_size_isoc); + if (dev->ts == PRIMARY_TS) + kfree(dev->alt_max_pkt_size_isoc); + kfree(dev); } EXPORT_SYMBOL_GPL(em28xx_free_device); @@ -3861,6 +3861,17 @@ static int em28xx_usb_probe(struct usb_interface *intf, dev->has_video = false; } + if (dev->board.has_dual_ts && + (dev->tuner_type != TUNER_ABSENT || INPUT(0)->type)) { + /* + * The logic with sets alternate is not ready for dual-tuners + * which analog modes. + */ + dev_err(&intf->dev, + "We currently don't support analog TV or stream capture on dual tuners.\n"); + has_video = false; + } + /* Select USB transfer types to use */ if (has_video) { if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) |