Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'media_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
[media] mantis_pci: remove asm/pgtable.h include
[media] tda829x: fix regression in probe functions
[media] mceusb: don't claim multifunction device non-IR parts
[media] nuvoton-cir: fix wake from suspend
[media] cx18: Add support for Hauppauge HVR-1600 models with s5h1411
[media] ivtv: Fix corrective action taken upon DMA ERR interrupt to avoid hang
[media] cx25840: fix probing of cx2583x chips
[media] cx23885: Remove unused 'err:' labels to quiet compiler warning
[media] cx23885: Revert "Check for slave nack on all transactions"
[media] DiB7000M: add pid filtering
[media] Fix sysfs rc protocol lookup for rc-5-sz
[media] au0828: fix VBI handling when in V4L2 streaming mode
[media] ir-raw: Properly initialize the IR event (BZ#27202)
[media] s2255drv: firmware re-loading changes
[media] Fix double free of video_device in mem2mem_testdev
[media] DM04/QQBOX memcpy to const char fix

+283 -63
+7 -7
drivers/media/common/tuners/tda8290.c
··· 658 658 #define TDA8290_ID 0x89 659 659 u8 reg = 0x1f, id; 660 660 struct i2c_msg msg_read[] = { 661 - { .addr = 0x4b, .flags = 0, .len = 1, .buf = &reg }, 662 - { .addr = 0x4b, .flags = I2C_M_RD, .len = 1, .buf = &id }, 661 + { .addr = i2c_props->addr, .flags = 0, .len = 1, .buf = &reg }, 662 + { .addr = i2c_props->addr, .flags = I2C_M_RD, .len = 1, .buf = &id }, 663 663 }; 664 664 665 665 /* detect tda8290 */ 666 666 if (i2c_transfer(i2c_props->adap, msg_read, 2) != 2) { 667 - printk(KERN_WARNING "%s: tda8290 couldn't read register 0x%02x\n", 667 + printk(KERN_WARNING "%s: couldn't read register 0x%02x\n", 668 668 __func__, reg); 669 669 return -ENODEV; 670 670 } ··· 685 685 #define TDA8295C2_ID 0x8b 686 686 u8 reg = 0x2f, id; 687 687 struct i2c_msg msg_read[] = { 688 - { .addr = 0x4b, .flags = 0, .len = 1, .buf = &reg }, 689 - { .addr = 0x4b, .flags = I2C_M_RD, .len = 1, .buf = &id }, 688 + { .addr = i2c_props->addr, .flags = 0, .len = 1, .buf = &reg }, 689 + { .addr = i2c_props->addr, .flags = I2C_M_RD, .len = 1, .buf = &id }, 690 690 }; 691 691 692 - /* detect tda8290 */ 692 + /* detect tda8295 */ 693 693 if (i2c_transfer(i2c_props->adap, msg_read, 2) != 2) { 694 - printk(KERN_WARNING "%s: tda8290 couldn't read register 0x%02x\n", 694 + printk(KERN_WARNING "%s: couldn't read register 0x%02x\n", 695 695 __func__, reg); 696 696 return -ENODEV; 697 697 }
+19 -2
drivers/media/dvb/dvb-usb/dib0700_devices.c
··· 870 870 return 0; 871 871 } 872 872 873 + static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index, 874 + u16 pid, int onoff) 875 + { 876 + struct dib0700_state *st = adapter->dev->priv; 877 + if (st->is_dib7000pc) 878 + return dib7000p_pid_filter(adapter->fe, index, pid, onoff); 879 + return dib7000m_pid_filter(adapter->fe, index, pid, onoff); 880 + } 881 + 882 + static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) 883 + { 884 + struct dib0700_state *st = adapter->dev->priv; 885 + if (st->is_dib7000pc) 886 + return dib7000p_pid_filter_ctrl(adapter->fe, onoff); 887 + return dib7000m_pid_filter_ctrl(adapter->fe, onoff); 888 + } 889 + 873 890 static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) 874 891 { 875 892 return dib7000p_pid_filter(adapter->fe, index, pid, onoff); ··· 1892 1875 { 1893 1876 .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, 1894 1877 .pid_filter_count = 32, 1895 - .pid_filter = stk70x0p_pid_filter, 1896 - .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, 1878 + .pid_filter = stk7700p_pid_filter, 1879 + .pid_filter_ctrl = stk7700p_pid_filter_ctrl, 1897 1880 .frontend_attach = stk7700p_frontend_attach, 1898 1881 .tuner_attach = stk7700p_tuner_attach, 1899 1882
+3 -3
drivers/media/dvb/dvb-usb/lmedm04.c
··· 659 659 } 660 660 661 661 /* Default firmware for LME2510C */ 662 - const char lme_firmware[50] = "dvb-usb-lme2510c-s7395.fw"; 662 + char lme_firmware[50] = "dvb-usb-lme2510c-s7395.fw"; 663 663 664 664 static void lme_coldreset(struct usb_device *dev) 665 665 { ··· 1006 1006 .caps = DVB_USB_IS_AN_I2C_ADAPTER, 1007 1007 .usb_ctrl = DEVICE_SPECIFIC, 1008 1008 .download_firmware = lme2510_download_firmware, 1009 - .firmware = lme_firmware, 1009 + .firmware = (const char *)&lme_firmware, 1010 1010 .size_of_priv = sizeof(struct lme2510_state), 1011 1011 .num_adapters = 1, 1012 1012 .adapter = { ··· 1109 1109 1110 1110 MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); 1111 1111 MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); 1112 - MODULE_VERSION("1.74"); 1112 + MODULE_VERSION("1.75"); 1113 1113 MODULE_LICENSE("GPL");
+19
drivers/media/dvb/frontends/dib7000m.c
··· 1285 1285 } 1286 1286 EXPORT_SYMBOL(dib7000m_get_i2c_master); 1287 1287 1288 + int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) 1289 + { 1290 + struct dib7000m_state *state = fe->demodulator_priv; 1291 + u16 val = dib7000m_read_word(state, 294 + state->reg_offs) & 0xffef; 1292 + val |= (onoff & 0x1) << 4; 1293 + dprintk("PID filter enabled %d", onoff); 1294 + return dib7000m_write_word(state, 294 + state->reg_offs, val); 1295 + } 1296 + EXPORT_SYMBOL(dib7000m_pid_filter_ctrl); 1297 + 1298 + int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) 1299 + { 1300 + struct dib7000m_state *state = fe->demodulator_priv; 1301 + dprintk("PID filter: index %x, PID %d, OnOff %d", id, pid, onoff); 1302 + return dib7000m_write_word(state, 300 + state->reg_offs + id, 1303 + onoff ? (1 << 13) | pid : 0); 1304 + } 1305 + EXPORT_SYMBOL(dib7000m_pid_filter); 1306 + 1288 1307 #if 0 1289 1308 /* used with some prototype boards */ 1290 1309 int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,
+15
drivers/media/dvb/frontends/dib7000m.h
··· 46 46 extern struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *, 47 47 enum dibx000_i2c_interface, 48 48 int); 49 + extern int dib7000m_pid_filter(struct dvb_frontend *, u8 id, u16 pid, u8 onoff); 50 + extern int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff); 49 51 #else 50 52 static inline 51 53 struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap, ··· 64 62 { 65 63 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 66 64 return NULL; 65 + } 66 + static inline int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, 67 + u16 pid, u8 onoff) 68 + { 69 + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 70 + return -ENODEV; 71 + } 72 + 73 + static inline int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, 74 + uint8_t onoff) 75 + { 76 + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 77 + return -ENODEV; 67 78 } 68 79 #endif 69 80
-1
drivers/media/dvb/mantis/mantis_pci.c
··· 22 22 #include <linux/moduleparam.h> 23 23 #include <linux/kernel.h> 24 24 #include <asm/io.h> 25 - #include <asm/pgtable.h> 26 25 #include <asm/page.h> 27 26 #include <linux/kmod.h> 28 27 #include <linux/vmalloc.h>
+1 -2
drivers/media/rc/ir-raw.c
··· 112 112 { 113 113 ktime_t now; 114 114 s64 delta; /* ns */ 115 - struct ir_raw_event ev; 115 + DEFINE_IR_RAW_EVENT(ev); 116 116 int rc = 0; 117 117 118 118 if (!dev->raw) ··· 125 125 * being called for the first time, note that delta can't 126 126 * possibly be negative. 127 127 */ 128 - ev.duration = 0; 129 128 if (delta > IR_MAX_DURATION || !dev->raw->last_type) 130 129 type |= IR_START_EVENT; 131 130 else
+15 -12
drivers/media/rc/mceusb.c
··· 148 148 MCE_GEN2_TX_INV, 149 149 POLARIS_EVK, 150 150 CX_HYBRID_TV, 151 + MULTIFUNCTION, 151 152 }; 152 153 153 154 struct mceusb_model { ··· 156 155 u32 mce_gen2:1; 157 156 u32 mce_gen3:1; 158 157 u32 tx_mask_normal:1; 159 - u32 is_polaris:1; 160 158 u32 no_tx:1; 159 + 160 + int ir_intfnum; 161 161 162 162 const char *rc_map; /* Allow specify a per-board map */ 163 163 const char *name; /* per-board name */ ··· 181 179 .tx_mask_normal = 1, 182 180 }, 183 181 [POLARIS_EVK] = { 184 - .is_polaris = 1, 185 182 /* 186 183 * In fact, the EVK is shipped without 187 184 * remotes, but we should have something handy, ··· 190 189 .name = "Conexant Hybrid TV (cx231xx) MCE IR", 191 190 }, 192 191 [CX_HYBRID_TV] = { 193 - .is_polaris = 1, 194 192 .no_tx = 1, /* tx isn't wired up at all */ 195 193 .name = "Conexant Hybrid TV (cx231xx) MCE IR", 194 + }, 195 + [MULTIFUNCTION] = { 196 + .mce_gen2 = 1, 197 + .ir_intfnum = 2, 196 198 }, 197 199 }; 198 200 ··· 220 216 { USB_DEVICE(VENDOR_PHILIPS, 0x206c) }, 221 217 /* Philips/Spinel plus IR transceiver for ASUS */ 222 218 { USB_DEVICE(VENDOR_PHILIPS, 0x2088) }, 223 - /* Realtek MCE IR Receiver */ 224 - { USB_DEVICE(VENDOR_REALTEK, 0x0161) }, 219 + /* Realtek MCE IR Receiver and card reader */ 220 + { USB_DEVICE(VENDOR_REALTEK, 0x0161), 221 + .driver_info = MULTIFUNCTION }, 225 222 /* SMK/Toshiba G83C0004D410 */ 226 223 { USB_DEVICE(VENDOR_SMK, 0x031d), 227 224 .driver_info = MCE_GEN2_TX_INV }, ··· 1106 1101 bool is_gen3; 1107 1102 bool is_microsoft_gen1; 1108 1103 bool tx_mask_normal; 1109 - bool is_polaris; 1104 + int ir_intfnum; 1110 1105 1111 1106 dev_dbg(&intf->dev, "%s called\n", __func__); 1112 1107 ··· 1115 1110 is_gen3 = mceusb_model[model].mce_gen3; 1116 1111 is_microsoft_gen1 = mceusb_model[model].mce_gen1; 1117 1112 tx_mask_normal = mceusb_model[model].tx_mask_normal; 1118 - is_polaris = mceusb_model[model].is_polaris; 1113 + ir_intfnum = mceusb_model[model].ir_intfnum; 1119 1114 1120 - if (is_polaris) { 1121 - /* Interface 0 is IR */ 1122 - if (idesc->desc.bInterfaceNumber) 1123 - return -ENODEV; 1124 - } 1115 + /* There are multi-function devices with non-IR interfaces */ 1116 + if (idesc->desc.bInterfaceNumber != ir_intfnum) 1117 + return -ENODEV; 1125 1118 1126 1119 /* step through the endpoints to find first bulk in and out endpoint */ 1127 1120 for (i = 0; i < idesc->desc.bNumEndpoints; ++i) {
+3 -2
drivers/media/rc/nuvoton-cir.c
··· 385 385 386 386 static void nvt_cir_wake_regs_init(struct nvt_dev *nvt) 387 387 { 388 - /* set number of bytes needed for wake key comparison (default 67) */ 389 - nvt_cir_wake_reg_write(nvt, CIR_WAKE_FIFO_LEN, CIR_WAKE_FIFO_CMP_DEEP); 388 + /* set number of bytes needed for wake from s3 (default 65) */ 389 + nvt_cir_wake_reg_write(nvt, CIR_WAKE_FIFO_CMP_BYTES, 390 + CIR_WAKE_FIFO_CMP_DEEP); 390 391 391 392 /* set tolerance/variance allowed per byte during wake compare */ 392 393 nvt_cir_wake_reg_write(nvt, CIR_WAKE_CMP_TOLERANCE,
+5 -2
drivers/media/rc/nuvoton-cir.h
··· 305 305 #define CIR_WAKE_IRFIFOSTS_RX_EMPTY 0x20 306 306 #define CIR_WAKE_IRFIFOSTS_RX_FULL 0x10 307 307 308 - /* CIR Wake FIFO buffer is 67 bytes long */ 309 - #define CIR_WAKE_FIFO_LEN 67 308 + /* 309 + * The CIR Wake FIFO buffer is 67 bytes long, but the stock remote wakes 310 + * the system comparing only 65 bytes (fails with this set to 67) 311 + */ 312 + #define CIR_WAKE_FIFO_CMP_BYTES 65 310 313 /* CIR Wake byte comparison tolerance */ 311 314 #define CIR_WAKE_CMP_TOLERANCE 5 312 315
+1 -1
drivers/media/rc/rc-main.c
··· 850 850 count++; 851 851 } else { 852 852 for (i = 0; i < ARRAY_SIZE(proto_names); i++) { 853 - if (!strncasecmp(tmp, proto_names[i].name, strlen(proto_names[i].name))) { 853 + if (!strcasecmp(tmp, proto_names[i].name)) { 854 854 tmp += strlen(proto_names[i].name); 855 855 mask = proto_names[i].type; 856 856 break;
+24 -4
drivers/media/video/au0828/au0828-video.c
··· 1758 1758 if (rc < 0) 1759 1759 return rc; 1760 1760 1761 - return videobuf_reqbufs(&fh->vb_vidq, rb); 1761 + if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) 1762 + rc = videobuf_reqbufs(&fh->vb_vidq, rb); 1763 + else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) 1764 + rc = videobuf_reqbufs(&fh->vb_vbiq, rb); 1765 + 1766 + return rc; 1762 1767 } 1763 1768 1764 1769 static int vidioc_querybuf(struct file *file, void *priv, ··· 1777 1772 if (rc < 0) 1778 1773 return rc; 1779 1774 1780 - return videobuf_querybuf(&fh->vb_vidq, b); 1775 + if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) 1776 + rc = videobuf_querybuf(&fh->vb_vidq, b); 1777 + else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) 1778 + rc = videobuf_querybuf(&fh->vb_vbiq, b); 1779 + 1780 + return rc; 1781 1781 } 1782 1782 1783 1783 static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b) ··· 1795 1785 if (rc < 0) 1796 1786 return rc; 1797 1787 1798 - return videobuf_qbuf(&fh->vb_vidq, b); 1788 + if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) 1789 + rc = videobuf_qbuf(&fh->vb_vidq, b); 1790 + else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) 1791 + rc = videobuf_qbuf(&fh->vb_vbiq, b); 1792 + 1793 + return rc; 1799 1794 } 1800 1795 1801 1796 static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b) ··· 1821 1806 dev->greenscreen_detected = 0; 1822 1807 } 1823 1808 1824 - return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK); 1809 + if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) 1810 + rc = videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK); 1811 + else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) 1812 + rc = videobuf_dqbuf(&fh->vb_vbiq, b, file->f_flags & O_NONBLOCK); 1813 + 1814 + return rc; 1825 1815 } 1826 1816 1827 1817 static struct v4l2_file_operations au0828_v4l_fops = {
+49 -1
drivers/media/video/cx18/cx18-cards.c
··· 95 95 .i2c = &cx18_i2c_std, 96 96 }; 97 97 98 + static const struct cx18_card cx18_card_hvr1600_s5h1411 = { 99 + .type = CX18_CARD_HVR_1600_S5H1411, 100 + .name = "Hauppauge HVR-1600", 101 + .comment = "Simultaneous Digital and Analog TV capture supported\n", 102 + .v4l2_capabilities = CX18_CAP_ENCODER, 103 + .hw_audio_ctrl = CX18_HW_418_AV, 104 + .hw_muxer = CX18_HW_CS5345, 105 + .hw_all = CX18_HW_TVEEPROM | CX18_HW_418_AV | CX18_HW_TUNER | 106 + CX18_HW_CS5345 | CX18_HW_DVB | CX18_HW_GPIO_RESET_CTRL | 107 + CX18_HW_Z8F0811_IR_HAUP, 108 + .video_inputs = { 109 + { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 }, 110 + { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 }, 111 + { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 }, 112 + { CX18_CARD_INPUT_SVIDEO2, 2, CX18_AV_SVIDEO2 }, 113 + { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE4 }, 114 + }, 115 + .audio_inputs = { 116 + { CX18_CARD_INPUT_AUD_TUNER, 117 + CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 118 + { CX18_CARD_INPUT_LINE_IN1, 119 + CX18_AV_AUDIO_SERIAL1, CS5345_IN_2 }, 120 + { CX18_CARD_INPUT_LINE_IN2, 121 + CX18_AV_AUDIO_SERIAL1, CS5345_IN_3 }, 122 + }, 123 + .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 124 + CX18_AV_AUDIO_SERIAL1, CS5345_IN_4 }, 125 + .ddr = { 126 + /* ESMT M13S128324A-5B memory */ 127 + .chip_config = 0x003, 128 + .refresh = 0x30c, 129 + .timing1 = 0x44220e82, 130 + .timing2 = 0x08, 131 + .tune_lane = 0, 132 + .initial_emrs = 0, 133 + }, 134 + .gpio_init.initial_value = 0x3001, 135 + .gpio_init.direction = 0x3001, 136 + .gpio_i2c_slave_reset = { 137 + .active_lo_mask = 0x3001, 138 + .msecs_asserted = 10, 139 + .msecs_recovery = 40, 140 + .ir_reset_mask = 0x0001, 141 + }, 142 + .i2c = &cx18_i2c_std, 143 + }; 144 + 98 145 static const struct cx18_card cx18_card_hvr1600_samsung = { 99 146 .type = CX18_CARD_HVR_1600_SAMSUNG, 100 147 .name = "Hauppauge HVR-1600 (Preproduction)", ··· 570 523 &cx18_card_toshiba_qosmio_dvbt, 571 524 &cx18_card_leadtek_pvr2100, 572 525 &cx18_card_leadtek_dvr3100h, 573 - &cx18_card_gotview_dvd3 526 + &cx18_card_gotview_dvd3, 527 + &cx18_card_hvr1600_s5h1411 574 528 }; 575 529 576 530 const struct cx18_card *cx18_get_card(u16 index)
+23 -2
drivers/media/video/cx18/cx18-driver.c
··· 157 157 "\t\t\t 7 = Leadtek WinFast PVR2100\n" 158 158 "\t\t\t 8 = Leadtek WinFast DVR3100 H\n" 159 159 "\t\t\t 9 = GoTView PCI DVD3 Hybrid\n" 160 + "\t\t\t 10 = Hauppauge HVR 1600 (S5H1411)\n" 160 161 "\t\t\t 0 = Autodetect (default)\n" 161 162 "\t\t\t-1 = Ignore this card\n\t\t"); 162 163 MODULE_PARM_DESC(pal, "Set PAL standard: B, G, H, D, K, I, M, N, Nc, 60"); ··· 338 337 switch (cx->card->type) { 339 338 case CX18_CARD_HVR_1600_ESMT: 340 339 case CX18_CARD_HVR_1600_SAMSUNG: 340 + case CX18_CARD_HVR_1600_S5H1411: 341 341 tveeprom_hauppauge_analog(&c, tv, eedata); 342 342 break; 343 343 case CX18_CARD_YUAN_MPC718: ··· 367 365 from the model number. Use the cardtype module option if you 368 366 have one of these preproduction models. */ 369 367 switch (tv.model) { 370 - case 74000 ... 74999: 368 + case 74301: /* Retail models */ 369 + case 74321: 370 + case 74351: /* OEM models */ 371 + case 74361: 372 + /* Digital side is s5h1411/tda18271 */ 373 + cx->card = cx18_get_card(CX18_CARD_HVR_1600_S5H1411); 374 + break; 375 + case 74021: /* Retail models */ 376 + case 74031: 377 + case 74041: 378 + case 74141: 379 + case 74541: /* OEM models */ 380 + case 74551: 381 + case 74591: 382 + case 74651: 383 + case 74691: 384 + case 74751: 385 + case 74891: 386 + /* Digital side is s5h1409/mxl5005s */ 371 387 cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT); 372 388 break; 373 389 case 0x718: ··· 397 377 CX18_ERR("Invalid EEPROM\n"); 398 378 return; 399 379 default: 400 - CX18_ERR("Unknown model %d, defaulting to HVR-1600\n", tv.model); 380 + CX18_ERR("Unknown model %d, defaulting to original HVR-1600 " 381 + "(cardtype=1)\n", tv.model); 401 382 cx->card = cx18_get_card(CX18_CARD_HVR_1600_ESMT); 402 383 break; 403 384 }
+2 -1
drivers/media/video/cx18/cx18-driver.h
··· 85 85 #define CX18_CARD_LEADTEK_PVR2100 6 /* Leadtek WinFast PVR2100 */ 86 86 #define CX18_CARD_LEADTEK_DVR3100H 7 /* Leadtek WinFast DVR3100 H */ 87 87 #define CX18_CARD_GOTVIEW_PCI_DVD3 8 /* GoTView PCI DVD3 Hybrid */ 88 - #define CX18_CARD_LAST 8 88 + #define CX18_CARD_HVR_1600_S5H1411 9 /* Hauppauge HVR 1600 s5h1411/tda18271*/ 89 + #define CX18_CARD_LAST 9 89 90 90 91 #define CX18_ENC_STREAM_TYPE_MPG 0 91 92 #define CX18_ENC_STREAM_TYPE_TS 1
+38
drivers/media/video/cx18/cx18-dvb.c
··· 29 29 #include "cx18-gpio.h" 30 30 #include "s5h1409.h" 31 31 #include "mxl5005s.h" 32 + #include "s5h1411.h" 33 + #include "tda18271.h" 32 34 #include "zl10353.h" 33 35 34 36 #include <linux/firmware.h> ··· 76 74 .status_mode = S5H1409_DEMODLOCKING, 77 75 .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, 78 76 .hvr1600_opt = S5H1409_HVR1600_OPTIMIZE 77 + }; 78 + 79 + /* 80 + * CX18_CARD_HVR_1600_S5H1411 81 + */ 82 + static struct s5h1411_config hcw_s5h1411_config = { 83 + .output_mode = S5H1411_SERIAL_OUTPUT, 84 + .gpio = S5H1411_GPIO_OFF, 85 + .vsb_if = S5H1411_IF_44000, 86 + .qam_if = S5H1411_IF_4000, 87 + .inversion = S5H1411_INVERSION_ON, 88 + .status_mode = S5H1411_DEMODLOCKING, 89 + .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, 90 + }; 91 + 92 + static struct tda18271_std_map hauppauge_tda18271_std_map = { 93 + .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3, 94 + .if_lvl = 6, .rfagc_top = 0x37 }, 95 + .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0, 96 + .if_lvl = 6, .rfagc_top = 0x37 }, 97 + }; 98 + 99 + static struct tda18271_config hauppauge_tda18271_config = { 100 + .std_map = &hauppauge_tda18271_std_map, 101 + .gate = TDA18271_GATE_DIGITAL, 102 + .output_opt = TDA18271_OUTPUT_LT_OFF, 79 103 }; 80 104 81 105 /* ··· 272 244 switch (cx->card->type) { 273 245 case CX18_CARD_HVR_1600_ESMT: 274 246 case CX18_CARD_HVR_1600_SAMSUNG: 247 + case CX18_CARD_HVR_1600_S5H1411: 275 248 v = cx18_read_reg(cx, CX18_REG_DMUX_NUM_PORT_0_CONTROL); 276 249 v |= 0x00400000; /* Serial Mode */ 277 250 v |= 0x00002000; /* Data Length - Byte */ ··· 483 454 &hauppauge_hvr1600_tuner); 484 455 ret = 0; 485 456 } 457 + break; 458 + case CX18_CARD_HVR_1600_S5H1411: 459 + dvb->fe = dvb_attach(s5h1411_attach, 460 + &hcw_s5h1411_config, 461 + &cx->i2c_adap[0]); 462 + if (dvb->fe != NULL) 463 + dvb_attach(tda18271_attach, dvb->fe, 464 + 0x60, &cx->i2c_adap[0], 465 + &hauppauge_tda18271_config); 486 466 break; 487 467 case CX18_CARD_LEADTEK_DVR3100H: 488 468 dvb->fe = dvb_attach(zl10353_attach,
-10
drivers/media/video/cx23885/cx23885-i2c.c
··· 122 122 123 123 if (!i2c_wait_done(i2c_adap)) 124 124 goto eio; 125 - if (!i2c_slave_did_ack(i2c_adap)) { 126 - retval = -ENXIO; 127 - goto err; 128 - } 129 125 if (i2c_debug) { 130 126 printk(" <W %02x %02x", msg->addr << 1, msg->buf[0]); 131 127 if (!(ctrl & I2C_NOSTOP)) ··· 154 158 155 159 eio: 156 160 retval = -EIO; 157 - err: 158 161 if (i2c_debug) 159 162 printk(KERN_ERR " ERR: %d\n", retval); 160 163 return retval; ··· 204 209 205 210 if (!i2c_wait_done(i2c_adap)) 206 211 goto eio; 207 - if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) { 208 - retval = -ENXIO; 209 - goto err; 210 - } 211 212 msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff; 212 213 if (i2c_debug) { 213 214 dprintk(1, " %02x", msg->buf[cnt]); ··· 215 224 216 225 eio: 217 226 retval = -EIO; 218 - err: 219 227 if (i2c_debug) 220 228 printk(KERN_ERR " ERR: %d\n", retval); 221 229 return retval;
+2 -1
drivers/media/video/cx25840/cx25840-core.c
··· 2015 2015 kfree(state); 2016 2016 return err; 2017 2017 } 2018 - v4l2_ctrl_cluster(2, &state->volume); 2018 + if (!is_cx2583x(state)) 2019 + v4l2_ctrl_cluster(2, &state->volume); 2019 2020 v4l2_ctrl_handler_setup(&state->hdl); 2020 2021 2021 2022 if (client->dev.platform_data) {
+51 -7
drivers/media/video/ivtv/ivtv-irq.c
··· 628 628 static void ivtv_irq_dma_err(struct ivtv *itv) 629 629 { 630 630 u32 data[CX2341X_MBOX_MAX_DATA]; 631 + u32 status; 631 632 632 633 del_timer(&itv->dma_timer); 634 + 633 635 ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data); 636 + status = read_reg(IVTV_REG_DMASTATUS); 634 637 IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1], 635 - read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream); 636 - write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); 638 + status, itv->cur_dma_stream); 639 + /* 640 + * We do *not* write back to the IVTV_REG_DMASTATUS register to 641 + * clear the error status, if either the encoder write (0x02) or 642 + * decoder read (0x01) bus master DMA operation do not indicate 643 + * completed. We can race with the DMA engine, which may have 644 + * transitioned to completed status *after* we read the register. 645 + * Setting a IVTV_REG_DMASTATUS flag back to "busy" status, after the 646 + * DMA engine has completed, will cause the DMA engine to stop working. 647 + */ 648 + status &= 0x3; 649 + if (status == 0x3) 650 + write_reg(status, IVTV_REG_DMASTATUS); 651 + 637 652 if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags) && 638 653 itv->cur_dma_stream >= 0 && itv->cur_dma_stream < IVTV_MAX_STREAMS) { 639 654 struct ivtv_stream *s = &itv->streams[itv->cur_dma_stream]; 640 655 641 - /* retry */ 642 - if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) 656 + if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) { 657 + /* retry */ 658 + /* 659 + * FIXME - handle cases of DMA error similar to 660 + * encoder below, except conditioned on status & 0x1 661 + */ 643 662 ivtv_dma_dec_start(s); 644 - else 645 - ivtv_dma_enc_start(s); 646 - return; 663 + return; 664 + } else { 665 + if ((status & 0x2) == 0) { 666 + /* 667 + * CX2341x Bus Master DMA write is ongoing. 668 + * Reset the timer and let it complete. 669 + */ 670 + itv->dma_timer.expires = 671 + jiffies + msecs_to_jiffies(600); 672 + add_timer(&itv->dma_timer); 673 + return; 674 + } 675 + 676 + if (itv->dma_retries < 3) { 677 + /* 678 + * CX2341x Bus Master DMA write has ended. 679 + * Retry the write, starting with the first 680 + * xfer segment. Just retrying the current 681 + * segment is not sufficient. 682 + */ 683 + s->sg_processed = 0; 684 + itv->dma_retries++; 685 + ivtv_dma_enc_start_xfer(s); 686 + return; 687 + } 688 + /* Too many retries, give up on this one */ 689 + } 690 + 647 691 } 648 692 if (test_bit(IVTV_F_I_UDMA, &itv->i_flags)) { 649 693 ivtv_udma_start(itv);
-1
drivers/media/video/mem2mem_testdev.c
··· 1011 1011 v4l2_m2m_release(dev->m2m_dev); 1012 1012 del_timer_sync(&dev->timer); 1013 1013 video_unregister_device(dev->vfd); 1014 - video_device_release(dev->vfd); 1015 1014 v4l2_device_unregister(&dev->v4l2_dev); 1016 1015 kfree(dev); 1017 1016
+6 -4
drivers/media/video/s2255drv.c
··· 57 57 #include <linux/usb.h> 58 58 59 59 #define S2255_MAJOR_VERSION 1 60 - #define S2255_MINOR_VERSION 20 60 + #define S2255_MINOR_VERSION 21 61 61 #define S2255_RELEASE 0 62 62 #define S2255_VERSION KERNEL_VERSION(S2255_MAJOR_VERSION, \ 63 63 S2255_MINOR_VERSION, \ ··· 312 312 }; 313 313 314 314 /* current cypress EEPROM firmware version */ 315 - #define S2255_CUR_USB_FWVER ((3 << 8) | 6) 315 + #define S2255_CUR_USB_FWVER ((3 << 8) | 11) 316 316 /* current DSP FW version */ 317 - #define S2255_CUR_DSP_FWVER 8 317 + #define S2255_CUR_DSP_FWVER 10102 318 318 /* Need DSP version 5+ for video status feature */ 319 319 #define S2255_MIN_DSP_STATUS 5 320 320 #define S2255_MIN_DSP_COLORFILTER 8 ··· 492 492 493 493 static void s2255_reset_dsppower(struct s2255_dev *dev) 494 494 { 495 - s2255_vendor_req(dev, 0x40, 0x0b0b, 0x0b0b, NULL, 0, 1); 495 + s2255_vendor_req(dev, 0x40, 0x0b0b, 0x0b01, NULL, 0, 1); 496 496 msleep(10); 497 497 s2255_vendor_req(dev, 0x50, 0x0000, 0x0000, NULL, 0, 1); 498 + msleep(600); 499 + s2255_vendor_req(dev, 0x10, 0x0000, 0x0000, NULL, 0, 1); 498 500 return; 499 501 } 500 502