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 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus

* 'v4l_for_linus' of git://linuxtv.org/mchehab/for_linus:
[media] vp7045: fix buffer setup
[media] nuvoton-cir: simplify raw IR sample handling
[media] [Resend] viacam: Don't explode if pci_find_bus() returns NULL
[media] v4l2: Fix documentation of the codec device controls
[media] gspca - sonixj: Fix the darkness of sensor om6802 in 320x240
[media] gspca - sonixj: Fix wrong register mask for sensor om6802
[media] gspca - ov519: Fix LED inversion of some ov519 webcams
[media] pwc: precedence bug in pwc_init_controls()

+49 -93
+19 -19
Documentation/DocBook/media/v4l/controls.xml
··· 1455 1455 </row> 1456 1456 1457 1457 <row><entry></entry></row> 1458 - <row> 1458 + <row id="v4l2-mpeg-video-h264-vui-sar-idc"> 1459 1459 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant>&nbsp;</entry> 1460 1460 <entry>enum&nbsp;v4l2_mpeg_video_h264_vui_sar_idc</entry> 1461 1461 </row> ··· 1561 1561 </row> 1562 1562 1563 1563 <row><entry></entry></row> 1564 - <row> 1564 + <row id="v4l2-mpeg-video-h264-level"> 1565 1565 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant>&nbsp;</entry> 1566 1566 <entry>enum&nbsp;v4l2_mpeg_video_h264_level</entry> 1567 1567 </row> ··· 1641 1641 </row> 1642 1642 1643 1643 <row><entry></entry></row> 1644 - <row> 1644 + <row id="v4l2-mpeg-video-mpeg4-level"> 1645 1645 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant>&nbsp;</entry> 1646 1646 <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_level</entry> 1647 1647 </row> ··· 1689 1689 </row> 1690 1690 1691 1691 <row><entry></entry></row> 1692 - <row> 1692 + <row id="v4l2-mpeg-video-h264-profile"> 1693 1693 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant>&nbsp;</entry> 1694 - <entry>enum&nbsp;v4l2_mpeg_h264_profile</entry> 1694 + <entry>enum&nbsp;v4l2_mpeg_video_h264_profile</entry> 1695 1695 </row> 1696 1696 <row><entry spanname="descr">The profile information for H264. 1697 1697 Applicable to the H264 encoder. ··· 1774 1774 </row> 1775 1775 1776 1776 <row><entry></entry></row> 1777 - <row> 1777 + <row id="v4l2-mpeg-video-mpeg4-profile"> 1778 1778 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant>&nbsp;</entry> 1779 - <entry>enum&nbsp;v4l2_mpeg_mpeg4_profile</entry> 1779 + <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_profile</entry> 1780 1780 </row> 1781 1781 <row><entry spanname="descr">The profile information for MPEG4. 1782 1782 Applicable to the MPEG4 encoder. ··· 1820 1820 </row> 1821 1821 1822 1822 <row><entry></entry></row> 1823 - <row> 1823 + <row id="v4l2-mpeg-video-multi-slice-mode"> 1824 1824 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant>&nbsp;</entry> 1825 - <entry>enum&nbsp;v4l2_mpeg_multi_slice_mode</entry> 1825 + <entry>enum&nbsp;v4l2_mpeg_video_multi_slice_mode</entry> 1826 1826 </row> 1827 1827 <row><entry spanname="descr">Determines how the encoder should handle division of frame into slices. 1828 1828 Applicable to the encoder. ··· 1868 1868 </row> 1869 1869 1870 1870 <row><entry></entry></row> 1871 - <row> 1871 + <row id="v4l2-mpeg-video-h264-loop-filter-mode"> 1872 1872 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant>&nbsp;</entry> 1873 - <entry>enum&nbsp;v4l2_mpeg_h264_loop_filter_mode</entry> 1873 + <entry>enum&nbsp;v4l2_mpeg_video_h264_loop_filter_mode</entry> 1874 1874 </row> 1875 1875 <row><entry spanname="descr">Loop filter mode for H264 encoder. 1876 1876 Possible values are:</entry> ··· 1913 1913 </row> 1914 1914 1915 1915 <row><entry></entry></row> 1916 - <row> 1916 + <row id="v4l2-mpeg-video-h264-entropy-mode"> 1917 1917 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant>&nbsp;</entry> 1918 - <entry>enum&nbsp;v4l2_mpeg_h264_symbol_mode</entry> 1918 + <entry>enum&nbsp;v4l2_mpeg_video_h264_entropy_mode</entry> 1919 1919 </row> 1920 1920 <row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC. 1921 1921 Applicable to the H264 encoder. ··· 2140 2140 </row> 2141 2141 2142 2142 <row><entry></entry></row> 2143 - <row> 2143 + <row id="v4l2-mpeg-video-header-mode"> 2144 2144 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant>&nbsp;</entry> 2145 - <entry>enum&nbsp;v4l2_mpeg_header_mode</entry> 2145 + <entry>enum&nbsp;v4l2_mpeg_video_header_mode</entry> 2146 2146 </row> 2147 2147 <row><entry spanname="descr">Determines whether the header is returned as the first buffer or is 2148 2148 it returned together with the first frame. Applicable to encoders. ··· 2320 2320 Applicable to the H264 encoder.</entry> 2321 2321 </row> 2322 2322 <row><entry></entry></row> 2323 - <row> 2323 + <row id="v4l2-mpeg-mfc51-video-frame-skip-mode"> 2324 2324 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant>&nbsp;</entry> 2325 - <entry>enum&nbsp;v4l2_mpeg_mfc51_frame_skip_mode</entry> 2325 + <entry>enum&nbsp;v4l2_mpeg_mfc51_video_frame_skip_mode</entry> 2326 2326 </row> 2327 2327 <row><entry spanname="descr"> 2328 2328 Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then ··· 2361 2361 </entry> 2362 2362 </row> 2363 2363 <row><entry></entry></row> 2364 - <row> 2364 + <row id="v4l2-mpeg-mfc51-video-force-frame-type"> 2365 2365 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant>&nbsp;</entry> 2366 - <entry>enum&nbsp;v4l2_mpeg_mfc51_force_frame_type</entry> 2366 + <entry>enum&nbsp;v4l2_mpeg_mfc51_video_force_frame_type</entry> 2367 2367 </row> 2368 2368 <row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders. 2369 2369 Possible values are:</entry>
+4 -22
drivers/media/dvb/dvb-usb/vp7045.c
··· 224 224 static int vp7045_usb_probe(struct usb_interface *intf, 225 225 const struct usb_device_id *id) 226 226 { 227 - struct dvb_usb_device *d; 228 - int ret = dvb_usb_device_init(intf, &vp7045_properties, 229 - THIS_MODULE, &d, adapter_nr); 230 - if (ret) 231 - return ret; 232 - 233 - d->priv = kmalloc(20, GFP_KERNEL); 234 - if (!d->priv) { 235 - dvb_usb_device_exit(intf); 236 - return -ENOMEM; 237 - } 238 - 239 - return ret; 240 - } 241 - 242 - static void vp7045_usb_disconnect(struct usb_interface *intf) 243 - { 244 - struct dvb_usb_device *d = usb_get_intfdata(intf); 245 - kfree(d->priv); 246 - dvb_usb_device_exit(intf); 227 + return dvb_usb_device_init(intf, &vp7045_properties, 228 + THIS_MODULE, NULL, adapter_nr); 247 229 } 248 230 249 231 static struct usb_device_id vp7045_usb_table [] = { ··· 240 258 static struct dvb_usb_device_properties vp7045_properties = { 241 259 .usb_ctrl = CYPRESS_FX2, 242 260 .firmware = "dvb-usb-vp7045-01.fw", 243 - .size_of_priv = sizeof(u8 *), 261 + .size_of_priv = 20, 244 262 245 263 .num_adapters = 1, 246 264 .adapter = { ··· 287 305 static struct usb_driver vp7045_usb_driver = { 288 306 .name = "dvb_usb_vp7045", 289 307 .probe = vp7045_usb_probe, 290 - .disconnect = vp7045_usb_disconnect, 308 + .disconnect = dvb_usb_device_exit, 291 309 .id_table = vp7045_usb_table, 292 310 }; 293 311
+8 -37
drivers/media/rc/nuvoton-cir.c
··· 618 618 static void nvt_process_rx_ir_data(struct nvt_dev *nvt) 619 619 { 620 620 DEFINE_IR_RAW_EVENT(rawir); 621 - unsigned int count; 622 621 u32 carrier; 623 622 u8 sample; 624 623 int i; ··· 630 631 if (nvt->carrier_detect_enabled) 631 632 carrier = nvt_rx_carrier_detect(nvt); 632 633 633 - count = nvt->pkts; 634 - nvt_dbg_verbose("Processing buffer of len %d", count); 634 + nvt_dbg_verbose("Processing buffer of len %d", nvt->pkts); 635 635 636 636 init_ir_raw_event(&rawir); 637 637 638 - for (i = 0; i < count; i++) { 639 - nvt->pkts--; 638 + for (i = 0; i < nvt->pkts; i++) { 640 639 sample = nvt->buf[i]; 641 640 642 641 rawir.pulse = ((sample & BUF_PULSE_BIT) != 0); 643 642 rawir.duration = US_TO_NS((sample & BUF_LEN_MASK) 644 643 * SAMPLE_PERIOD); 645 644 646 - if ((sample & BUF_LEN_MASK) == BUF_LEN_MASK) { 647 - if (nvt->rawir.pulse == rawir.pulse) 648 - nvt->rawir.duration += rawir.duration; 649 - else { 650 - nvt->rawir.duration = rawir.duration; 651 - nvt->rawir.pulse = rawir.pulse; 652 - } 653 - continue; 654 - } 645 + nvt_dbg("Storing %s with duration %d", 646 + rawir.pulse ? "pulse" : "space", rawir.duration); 655 647 656 - rawir.duration += nvt->rawir.duration; 657 - 658 - init_ir_raw_event(&nvt->rawir); 659 - nvt->rawir.duration = 0; 660 - nvt->rawir.pulse = rawir.pulse; 661 - 662 - if (sample == BUF_PULSE_BIT) 663 - rawir.pulse = false; 664 - 665 - if (rawir.duration) { 666 - nvt_dbg("Storing %s with duration %d", 667 - rawir.pulse ? "pulse" : "space", 668 - rawir.duration); 669 - 670 - ir_raw_event_store_with_filter(nvt->rdev, &rawir); 671 - } 648 + ir_raw_event_store_with_filter(nvt->rdev, &rawir); 672 649 673 650 /* 674 651 * BUF_PULSE_BIT indicates end of IR data, BUF_REPEAT_BYTE 675 652 * indicates end of IR signal, but new data incoming. In both 676 653 * cases, it means we're ready to call ir_raw_event_handle 677 654 */ 678 - if ((sample == BUF_PULSE_BIT) && nvt->pkts) { 655 + if ((sample == BUF_PULSE_BIT) && (i + 1 < nvt->pkts)) { 679 656 nvt_dbg("Calling ir_raw_event_handle (signal end)\n"); 680 657 ir_raw_event_handle(nvt->rdev); 681 658 } 682 659 } 683 660 661 + nvt->pkts = 0; 662 + 684 663 nvt_dbg("Calling ir_raw_event_handle (buffer empty)\n"); 685 664 ir_raw_event_handle(nvt->rdev); 686 - 687 - if (nvt->pkts) { 688 - nvt_dbg("Odd, pkts should be 0 now... (its %u)", nvt->pkts); 689 - nvt->pkts = 0; 690 - } 691 665 692 666 nvt_dbg_verbose("%s done", __func__); 693 667 } ··· 1020 1048 1021 1049 spin_lock_init(&nvt->nvt_lock); 1022 1050 spin_lock_init(&nvt->tx.lock); 1023 - init_ir_raw_event(&nvt->rawir); 1024 1051 1025 1052 ret = -EBUSY; 1026 1053 /* now claim resources */
-1
drivers/media/rc/nuvoton-cir.h
··· 67 67 struct nvt_dev { 68 68 struct pnp_dev *pdev; 69 69 struct rc_dev *rdev; 70 - struct ir_raw_event rawir; 71 70 72 71 spinlock_t nvt_lock; 73 72
+10 -12
drivers/media/video/gspca/ov519.c
··· 2858 2858 case 0x60: 2859 2859 PDEBUG(D_PROBE, "Sensor is a OV7660"); 2860 2860 sd->sensor = SEN_OV7660; 2861 - sd->invert_led = 0; 2862 2861 break; 2863 2862 default: 2864 2863 PDEBUG(D_PROBE, "Unknown sensor: 0x76%x", low); ··· 3336 3337 case BRIDGE_OV519: 3337 3338 cam->cam_mode = ov519_vga_mode; 3338 3339 cam->nmodes = ARRAY_SIZE(ov519_vga_mode); 3339 - sd->invert_led = !sd->invert_led; 3340 3340 break; 3341 3341 case BRIDGE_OVFX2: 3342 3342 cam->cam_mode = ov519_vga_mode; ··· 5003 5005 /* -- module initialisation -- */ 5004 5006 static const struct usb_device_id device_table[] = { 5005 5007 {USB_DEVICE(0x041e, 0x4003), .driver_info = BRIDGE_W9968CF }, 5006 - {USB_DEVICE(0x041e, 0x4052), .driver_info = BRIDGE_OV519 }, 5007 - {USB_DEVICE(0x041e, 0x405f), 5008 + {USB_DEVICE(0x041e, 0x4052), 5008 5009 .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5010 + {USB_DEVICE(0x041e, 0x405f), .driver_info = BRIDGE_OV519 }, 5009 5011 {USB_DEVICE(0x041e, 0x4060), .driver_info = BRIDGE_OV519 }, 5010 5012 {USB_DEVICE(0x041e, 0x4061), .driver_info = BRIDGE_OV519 }, 5011 - {USB_DEVICE(0x041e, 0x4064), 5012 - .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5013 + {USB_DEVICE(0x041e, 0x4064), .driver_info = BRIDGE_OV519 }, 5013 5014 {USB_DEVICE(0x041e, 0x4067), .driver_info = BRIDGE_OV519 }, 5014 - {USB_DEVICE(0x041e, 0x4068), 5015 + {USB_DEVICE(0x041e, 0x4068), .driver_info = BRIDGE_OV519 }, 5016 + {USB_DEVICE(0x045e, 0x028c), 5015 5017 .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5016 - {USB_DEVICE(0x045e, 0x028c), .driver_info = BRIDGE_OV519 }, 5017 5018 {USB_DEVICE(0x054c, 0x0154), .driver_info = BRIDGE_OV519 }, 5018 - {USB_DEVICE(0x054c, 0x0155), 5019 - .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5019 + {USB_DEVICE(0x054c, 0x0155), .driver_info = BRIDGE_OV519 }, 5020 5020 {USB_DEVICE(0x05a9, 0x0511), .driver_info = BRIDGE_OV511 }, 5021 5021 {USB_DEVICE(0x05a9, 0x0518), .driver_info = BRIDGE_OV518 }, 5022 - {USB_DEVICE(0x05a9, 0x0519), .driver_info = BRIDGE_OV519 }, 5023 - {USB_DEVICE(0x05a9, 0x0530), .driver_info = BRIDGE_OV519 }, 5022 + {USB_DEVICE(0x05a9, 0x0519), 5023 + .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5024 + {USB_DEVICE(0x05a9, 0x0530), 5025 + .driver_info = BRIDGE_OV519 | BRIDGE_INVERT_LED }, 5024 5026 {USB_DEVICE(0x05a9, 0x2800), .driver_info = BRIDGE_OVFX2 }, 5025 5027 {USB_DEVICE(0x05a9, 0x4519), .driver_info = BRIDGE_OV519 }, 5026 5028 {USB_DEVICE(0x05a9, 0x8519), .driver_info = BRIDGE_OV519 },
+5 -1
drivers/media/video/gspca/sonixj.c
··· 2386 2386 reg_w1(gspca_dev, 0x01, 0x22); 2387 2387 msleep(100); 2388 2388 reg01 = SCL_SEL_OD | S_PDN_INV; 2389 - reg17 &= MCK_SIZE_MASK; 2389 + reg17 &= ~MCK_SIZE_MASK; 2390 2390 reg17 |= 0x04; /* clock / 4 */ 2391 2391 break; 2392 2392 } ··· 2532 2532 if (!mode) { /* if 640x480 */ 2533 2533 reg17 &= ~MCK_SIZE_MASK; 2534 2534 reg17 |= 0x04; /* clock / 4 */ 2535 + } else { 2536 + reg01 &= ~SYS_SEL_48M; /* clk 24Mz */ 2537 + reg17 &= ~MCK_SIZE_MASK; 2538 + reg17 |= 0x02; /* clock / 2 */ 2535 2539 } 2536 2540 break; 2537 2541 case SENSOR_OV7630:
+1 -1
drivers/media/video/pwc/pwc-v4l.c
··· 338 338 if (pdev->restore_factory) 339 339 pdev->restore_factory->flags = V4L2_CTRL_FLAG_UPDATE; 340 340 341 - if (!pdev->features & FEATURE_MOTOR_PANTILT) 341 + if (!(pdev->features & FEATURE_MOTOR_PANTILT)) 342 342 return hdl->error; 343 343 344 344 /* Motor pan / tilt / reset */
+2
drivers/media/video/via-camera.c
··· 1332 1332 struct pci_bus *pbus = pci_find_bus(0, 0); 1333 1333 u8 cbyte; 1334 1334 1335 + if (!pbus) 1336 + return false; 1335 1337 pci_bus_read_config_byte(pbus, VIACAM_SERIAL_DEVFN, 1336 1338 VIACAM_SERIAL_CREG, &cbyte); 1337 1339 if ((cbyte & VIACAM_SERIAL_BIT) == 0)