aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c12
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c55
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c9
3 files changed, 44 insertions, 32 deletions
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 3c006103c1eb..ac3292d7646c 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -117,10 +117,10 @@ static void em28xx_audio_isocirq(struct urb *urb)
117 117
118 if (oldptr + length >= runtime->buffer_size) { 118 if (oldptr + length >= runtime->buffer_size) {
119 unsigned int cnt = 119 unsigned int cnt =
120 runtime->buffer_size - oldptr - 1; 120 runtime->buffer_size - oldptr;
121 memcpy(runtime->dma_area + oldptr * stride, cp, 121 memcpy(runtime->dma_area + oldptr * stride, cp,
122 cnt * stride); 122 cnt * stride);
123 memcpy(runtime->dma_area, cp + cnt, 123 memcpy(runtime->dma_area, cp + cnt * stride,
124 length * stride - cnt * stride); 124 length * stride - cnt * stride);
125 } else { 125 } else {
126 memcpy(runtime->dma_area + oldptr * stride, cp, 126 memcpy(runtime->dma_area + oldptr * stride, cp,
@@ -161,8 +161,14 @@ static int em28xx_init_audio_isoc(struct em28xx *dev)
161 161
162 memset(dev->adev->transfer_buffer[i], 0x80, sb_size); 162 memset(dev->adev->transfer_buffer[i], 0x80, sb_size);
163 urb = usb_alloc_urb(EM28XX_NUM_AUDIO_PACKETS, GFP_ATOMIC); 163 urb = usb_alloc_urb(EM28XX_NUM_AUDIO_PACKETS, GFP_ATOMIC);
164 if (!urb) 164 if (!urb) {
165 em28xx_errdev("usb_alloc_urb failed!\n");
166 for (j = 0; j < i; j++) {
167 usb_free_urb(dev->adev->urb[j]);
168 kfree(dev->adev->transfer_buffer[j]);
169 }
165 return -ENOMEM; 170 return -ENOMEM;
171 }
166 172
167 urb->dev = dev->udev; 173 urb->dev = dev->udev;
168 urb->context = dev; 174 urb->context = dev;
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 452da70e719f..de943cf6c169 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -93,28 +93,6 @@ struct em28xx_board em28xx_boards[] = {
93 .amux = 0, 93 .amux = 0,
94 } }, 94 } },
95 }, 95 },
96 [EM2800_BOARD_KWORLD_USB2800] = {
97 .name = "Kworld USB2800",
98 .valid = EM28XX_BOARD_NOT_VALIDATED,
99 .is_em2800 = 1,
100 .vchannels = 3,
101 .tuner_type = TUNER_PHILIPS_FCV1236D,
102 .tda9887_conf = TDA9887_PRESENT,
103 .decoder = EM28XX_SAA7113,
104 .input = { {
105 .type = EM28XX_VMUX_TELEVISION,
106 .vmux = SAA7115_COMPOSITE2,
107 .amux = 0,
108 }, {
109 .type = EM28XX_VMUX_COMPOSITE1,
110 .vmux = SAA7115_COMPOSITE0,
111 .amux = 1,
112 }, {
113 .type = EM28XX_VMUX_SVIDEO,
114 .vmux = SAA7115_SVIDEO3,
115 .amux = 1,
116 } },
117 },
118 [EM2820_BOARD_KWORLD_PVRTV2800RF] = { 96 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
119 .name = "Kworld PVR TV 2800 RF", 97 .name = "Kworld PVR TV 2800 RF",
120 .is_em2800 = 0, 98 .is_em2800 = 0,
@@ -599,7 +577,7 @@ struct em28xx_board em28xx_boards[] = {
599 }, { 577 }, {
600 .type = EM28XX_VMUX_COMPOSITE1, 578 .type = EM28XX_VMUX_COMPOSITE1,
601 .vmux = TVP5150_COMPOSITE1, 579 .vmux = TVP5150_COMPOSITE1,
602 .amux = 1, 580 .amux = 3,
603 }, { 581 }, {
604 .type = EM28XX_VMUX_SVIDEO, 582 .type = EM28XX_VMUX_SVIDEO,
605 .vmux = TVP5150_SVIDEO, 583 .vmux = TVP5150_SVIDEO,
@@ -952,22 +930,23 @@ struct em28xx_board em28xx_boards[] = {
952 }, 930 },
953 [EM2880_BOARD_KWORLD_DVB_310U] = { 931 [EM2880_BOARD_KWORLD_DVB_310U] = {
954 .name = "KWorld DVB-T 310U", 932 .name = "KWorld DVB-T 310U",
955 .valid = EM28XX_BOARD_NOT_VALIDATED,
956 .vchannels = 3, 933 .vchannels = 3,
957 .tuner_type = TUNER_XC2028, 934 .tuner_type = TUNER_XC2028,
935 .has_dvb = 1,
936 .mts_firmware = 1,
958 .decoder = EM28XX_TVP5150, 937 .decoder = EM28XX_TVP5150,
959 .input = { { 938 .input = { {
960 .type = EM28XX_VMUX_TELEVISION, 939 .type = EM28XX_VMUX_TELEVISION,
961 .vmux = TVP5150_COMPOSITE0, 940 .vmux = TVP5150_COMPOSITE0,
962 .amux = 0, 941 .amux = EM28XX_AMUX_VIDEO,
963 }, { 942 }, {
964 .type = EM28XX_VMUX_COMPOSITE1, 943 .type = EM28XX_VMUX_COMPOSITE1,
965 .vmux = TVP5150_COMPOSITE1, 944 .vmux = TVP5150_COMPOSITE1,
966 .amux = 1, 945 .amux = EM28XX_AMUX_AC97_LINE_IN,
967 }, { 946 }, { /* S-video has not been tested yet */
968 .type = EM28XX_VMUX_SVIDEO, 947 .type = EM28XX_VMUX_SVIDEO,
969 .vmux = TVP5150_SVIDEO, 948 .vmux = TVP5150_SVIDEO,
970 .amux = 1, 949 .amux = EM28XX_AMUX_AC97_LINE_IN,
971 } }, 950 } },
972 }, 951 },
973 [EM2881_BOARD_DNT_DA2_HYBRID] = { 952 [EM2881_BOARD_DNT_DA2_HYBRID] = {
@@ -1282,6 +1261,7 @@ static struct em28xx_reg_seq em2882_terratec_hybrid_xs_digital[] = {
1282static struct em28xx_hash_table em28xx_eeprom_hash [] = { 1261static struct em28xx_hash_table em28xx_eeprom_hash [] = {
1283 /* P/N: SA 60002070465 Tuner: TVF7533-MF */ 1262 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
1284 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, 1263 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
1264 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
1285}; 1265};
1286 1266
1287/* I2C devicelist hash table for devices with generic USB IDs */ 1267/* I2C devicelist hash table for devices with generic USB IDs */
@@ -1552,9 +1532,12 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
1552 /* djh - Not sure which demod we need here */ 1532 /* djh - Not sure which demod we need here */
1553 ctl->demod = XC3028_FE_DEFAULT; 1533 ctl->demod = XC3028_FE_DEFAULT;
1554 break; 1534 break;
1535 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
1536 ctl->demod = XC3028_FE_DEFAULT;
1537 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
1538 break;
1555 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: 1539 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
1556 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 1540 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
1557 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
1558 /* FIXME: Better to specify the needed IF */ 1541 /* FIXME: Better to specify the needed IF */
1559 ctl->demod = XC3028_FE_DEFAULT; 1542 ctl->demod = XC3028_FE_DEFAULT;
1560 break; 1543 break;
@@ -1764,6 +1747,20 @@ void em28xx_card_setup(struct em28xx *dev)
1764 break; 1747 break;
1765 case EM2820_BOARD_UNKNOWN: 1748 case EM2820_BOARD_UNKNOWN:
1766 case EM2800_BOARD_UNKNOWN: 1749 case EM2800_BOARD_UNKNOWN:
1750 /*
1751 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
1752 *
1753 * This occurs because they share identical USB vendor and
1754 * product IDs.
1755 *
1756 * What we do here is look up the EEPROM hash of the K-WORLD
1757 * and if it is found then we decide that we do not have
1758 * a DIGIVOX and reset the device to the K-WORLD instead.
1759 *
1760 * This solution is only valid if they do not share eeprom
1761 * hash identities which has not been determined as yet.
1762 */
1763 case EM2880_BOARD_MSI_DIGIVOX_AD:
1767 if (!em28xx_hint_board(dev)) 1764 if (!em28xx_hint_board(dev))
1768 em28xx_set_model(dev); 1765 em28xx_set_model(dev);
1769 break; 1766 break;
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 4b992bc0083c..d2b1a1a52689 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -452,6 +452,15 @@ static int dvb_init(struct em28xx *dev)
452 goto out_free; 452 goto out_free;
453 } 453 }
454 break; 454 break;
455 case EM2880_BOARD_KWORLD_DVB_310U:
456 dvb->frontend = dvb_attach(zl10353_attach,
457 &em28xx_zl10353_with_xc3028,
458 &dev->i2c_adap);
459 if (attach_xc3028(0x61, dev) < 0) {
460 result = -EINVAL;
461 goto out_free;
462 }
463 break;
455 default: 464 default:
456 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" 465 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
457 " isn't supported yet\n", 466 " isn't supported yet\n",