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://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] hdpvr: update picture controls to support firmware versions > 0.15
[media] wl128x: fix build errors when GPIOLIB is not enabled
[media] hdpvr: fix race conditon during start of streaming
[media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes
[media] imon: don't wedge hardware after early callbacks

+75 -24
+2 -2
drivers/media/radio/wl128x/Kconfig
··· 4 4 menu "Texas Instruments WL128x FM driver (ST based)" 5 5 config RADIO_WL128X 6 6 tristate "Texas Instruments WL128x FM Radio" 7 - depends on VIDEO_V4L2 && RFKILL 8 - select TI_ST if NET && GPIOLIB 7 + depends on VIDEO_V4L2 && RFKILL && GPIOLIB 8 + select TI_ST if NET 9 9 help 10 10 Choose Y here if you have this FM radio chip. 11 11
+22 -4
drivers/media/rc/imon.c
··· 47 47 #define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>" 48 48 #define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" 49 49 #define MOD_NAME "imon" 50 - #define MOD_VERSION "0.9.3" 50 + #define MOD_VERSION "0.9.4" 51 51 52 52 #define DISPLAY_MINOR_BASE 144 53 53 #define DEVICE_NAME "lcd%d" ··· 1658 1658 return; 1659 1659 1660 1660 ictx = (struct imon_context *)urb->context; 1661 - if (!ictx || !ictx->dev_present_intf0) 1661 + if (!ictx) 1662 1662 return; 1663 + 1664 + /* 1665 + * if we get a callback before we're done configuring the hardware, we 1666 + * can't yet process the data, as there's nowhere to send it, but we 1667 + * still need to submit a new rx URB to avoid wedging the hardware 1668 + */ 1669 + if (!ictx->dev_present_intf0) 1670 + goto out; 1663 1671 1664 1672 switch (urb->status) { 1665 1673 case -ENOENT: /* usbcore unlink successful! */ ··· 1686 1678 break; 1687 1679 } 1688 1680 1681 + out: 1689 1682 usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); 1690 1683 } 1691 1684 ··· 1699 1690 return; 1700 1691 1701 1692 ictx = (struct imon_context *)urb->context; 1702 - if (!ictx || !ictx->dev_present_intf1) 1693 + if (!ictx) 1703 1694 return; 1695 + 1696 + /* 1697 + * if we get a callback before we're done configuring the hardware, we 1698 + * can't yet process the data, as there's nowhere to send it, but we 1699 + * still need to submit a new rx URB to avoid wedging the hardware 1700 + */ 1701 + if (!ictx->dev_present_intf1) 1702 + goto out; 1704 1703 1705 1704 switch (urb->status) { 1706 1705 case -ENOENT: /* usbcore unlink successful! */ ··· 1727 1710 break; 1728 1711 } 1729 1712 1713 + out: 1730 1714 usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); 1731 1715 } 1732 1716 ··· 2260 2242 mutex_unlock(&ictx->lock); 2261 2243 usb_free_urb(rx_urb); 2262 2244 rx_urb_alloc_failed: 2263 - dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); 2245 + dev_err(ictx->dev, "unable to initialize intf1, err %d\n", ret); 2264 2246 2265 2247 return NULL; 2266 2248 }
+16 -4
drivers/media/video/hdpvr/hdpvr-core.c
··· 154 154 } 155 155 #endif 156 156 157 - v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", 158 - dev->usbc_buf[1], &dev->usbc_buf[2]); 157 + dev->fw_ver = dev->usbc_buf[1]; 159 158 160 - switch (dev->usbc_buf[1]) { 159 + v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", 160 + dev->fw_ver, &dev->usbc_buf[2]); 161 + 162 + if (dev->fw_ver > 0x15) { 163 + dev->options.brightness = 0x80; 164 + dev->options.contrast = 0x40; 165 + dev->options.hue = 0xf; 166 + dev->options.saturation = 0x40; 167 + dev->options.sharpness = 0x80; 168 + } 169 + 170 + switch (dev->fw_ver) { 161 171 case HDPVR_FIRMWARE_VERSION: 162 172 dev->flags &= ~HDPVR_FLAG_AC3_CAP; 163 173 break; ··· 179 169 default: 180 170 v4l2_info(&dev->v4l2_dev, "untested firmware, the driver might" 181 171 " not work.\n"); 182 - if (dev->usbc_buf[1] >= HDPVR_FIRMWARE_VERSION_AC3) 172 + if (dev->fw_ver >= HDPVR_FIRMWARE_VERSION_AC3) 183 173 dev->flags |= HDPVR_FLAG_AC3_CAP; 184 174 else 185 175 dev->flags &= ~HDPVR_FLAG_AC3_CAP; ··· 280 270 .bitrate_mode = HDPVR_CONSTANT, 281 271 .gop_mode = HDPVR_SIMPLE_IDR_GOP, 282 272 .audio_codec = V4L2_MPEG_AUDIO_ENCODING_AAC, 273 + /* original picture controls for firmware version <= 0x15 */ 274 + /* updated in device_authorization() for newer firmware */ 283 275 .brightness = 0x86, 284 276 .contrast = 0x80, 285 277 .hue = 0x80,
+33 -13
drivers/media/video/hdpvr/hdpvr-video.c
··· 283 283 284 284 hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); 285 285 286 + dev->status = STATUS_STREAMING; 287 + 286 288 INIT_WORK(&dev->worker, hdpvr_transmit_buffers); 287 289 queue_work(dev->workqueue, &dev->worker); 288 290 289 291 v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, 290 292 "streaming started\n"); 291 - dev->status = STATUS_STREAMING; 292 293 293 294 return 0; 294 295 } ··· 723 722 }; 724 723 725 724 static int fill_queryctrl(struct hdpvr_options *opt, struct v4l2_queryctrl *qc, 726 - int ac3) 725 + int ac3, int fw_ver) 727 726 { 728 727 int err; 729 728 729 + if (fw_ver > 0x15) { 730 + switch (qc->id) { 731 + case V4L2_CID_BRIGHTNESS: 732 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 733 + case V4L2_CID_CONTRAST: 734 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); 735 + case V4L2_CID_SATURATION: 736 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x40); 737 + case V4L2_CID_HUE: 738 + return v4l2_ctrl_query_fill(qc, 0x0, 0x1e, 1, 0xf); 739 + case V4L2_CID_SHARPNESS: 740 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 741 + } 742 + } else { 743 + switch (qc->id) { 744 + case V4L2_CID_BRIGHTNESS: 745 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); 746 + case V4L2_CID_CONTRAST: 747 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 748 + case V4L2_CID_SATURATION: 749 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 750 + case V4L2_CID_HUE: 751 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 752 + case V4L2_CID_SHARPNESS: 753 + return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 754 + } 755 + } 756 + 730 757 switch (qc->id) { 731 - case V4L2_CID_BRIGHTNESS: 732 - return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x86); 733 - case V4L2_CID_CONTRAST: 734 - return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 735 - case V4L2_CID_SATURATION: 736 - return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 737 - case V4L2_CID_HUE: 738 - return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 739 - case V4L2_CID_SHARPNESS: 740 - return v4l2_ctrl_query_fill(qc, 0x0, 0xff, 1, 0x80); 741 758 case V4L2_CID_MPEG_AUDIO_ENCODING: 742 759 return v4l2_ctrl_query_fill( 743 760 qc, V4L2_MPEG_AUDIO_ENCODING_AAC, ··· 813 794 814 795 if (qc->id == supported_v4l2_ctrls[i]) 815 796 return fill_queryctrl(&dev->options, qc, 816 - dev->flags & HDPVR_FLAG_AC3_CAP); 797 + dev->flags & HDPVR_FLAG_AC3_CAP, 798 + dev->fw_ver); 817 799 818 800 if (qc->id < supported_v4l2_ctrls[i]) 819 801 break;
+1
drivers/media/video/hdpvr/hdpvr.h
··· 113 113 /* usb control transfer buffer and lock */ 114 114 struct mutex usbc_mutex; 115 115 u8 *usbc_buf; 116 + u8 fw_ver; 116 117 }; 117 118 118 119 static inline struct hdpvr_device *to_hdpvr_dev(struct v4l2_device *v4l2_dev)
+1 -1
drivers/media/video/omap3isp/ispccdc.c
··· 1407 1407 static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc) 1408 1408 { 1409 1409 struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); 1410 - struct video_device *vdev = &ccdc->subdev.devnode; 1410 + struct video_device *vdev = ccdc->subdev.devnode; 1411 1411 struct v4l2_event event; 1412 1412 1413 1413 memset(&event, 0, sizeof(event));