Merge branch 'patchwork' into v4l_for_linus
* patchwork: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ... Conflicts: Documentation/DocBook/media/v4l/compat.xml
This commit is contained in:
@@ -435,7 +435,10 @@ static inline void finish_buffer(struct em28xx *dev,
|
||||
em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->top_field);
|
||||
|
||||
buf->vb.v4l2_buf.sequence = dev->v4l2->field_count++;
|
||||
buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED;
|
||||
if (dev->v4l2->progressive)
|
||||
buf->vb.v4l2_buf.field = V4L2_FIELD_NONE;
|
||||
else
|
||||
buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED;
|
||||
v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
|
||||
|
||||
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);
|
||||
@@ -478,7 +481,7 @@ static void em28xx_copy_video(struct em28xx *dev,
|
||||
lencopy = lencopy > remain ? remain : lencopy;
|
||||
|
||||
if ((char *)startwrite + lencopy > (char *)buf->vb_buf + buf->length) {
|
||||
em28xx_isocdbg("Overflow of %zi bytes past buffer end (1)\n",
|
||||
em28xx_isocdbg("Overflow of %zu bytes past buffer end (1)\n",
|
||||
((char *)startwrite + lencopy) -
|
||||
((char *)buf->vb_buf + buf->length));
|
||||
remain = (char *)buf->vb_buf + buf->length -
|
||||
@@ -504,7 +507,7 @@ static void em28xx_copy_video(struct em28xx *dev,
|
||||
|
||||
if ((char *)startwrite + lencopy > (char *)buf->vb_buf +
|
||||
buf->length) {
|
||||
em28xx_isocdbg("Overflow of %zi bytes past buffer end"
|
||||
em28xx_isocdbg("Overflow of %zu bytes past buffer end"
|
||||
"(2)\n",
|
||||
((char *)startwrite + lencopy) -
|
||||
((char *)buf->vb_buf + buf->length));
|
||||
@@ -718,7 +721,7 @@ static inline void process_frame_data_em25xx(struct em28xx *dev,
|
||||
struct em28xx_buffer *buf = dev->usb_ctl.vid_buf;
|
||||
struct em28xx_dmaqueue *dmaq = &dev->vidq;
|
||||
struct em28xx_v4l2 *v4l2 = dev->v4l2;
|
||||
bool frame_end = 0;
|
||||
bool frame_end = false;
|
||||
|
||||
/* Check for header */
|
||||
/* NOTE: at least with bulk transfers, only the first packet
|
||||
@@ -994,13 +997,16 @@ static void em28xx_stop_streaming(struct vb2_queue *vq)
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&dev->slock, flags);
|
||||
if (dev->usb_ctl.vid_buf != NULL) {
|
||||
vb2_buffer_done(&dev->usb_ctl.vid_buf->vb, VB2_BUF_STATE_ERROR);
|
||||
dev->usb_ctl.vid_buf = NULL;
|
||||
}
|
||||
while (!list_empty(&vidq->active)) {
|
||||
struct em28xx_buffer *buf;
|
||||
buf = list_entry(vidq->active.next, struct em28xx_buffer, list);
|
||||
list_del(&buf->list);
|
||||
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
|
||||
}
|
||||
dev->usb_ctl.vid_buf = NULL;
|
||||
spin_unlock_irqrestore(&dev->slock, flags);
|
||||
}
|
||||
|
||||
@@ -1021,13 +1027,16 @@ void em28xx_stop_vbi_streaming(struct vb2_queue *vq)
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&dev->slock, flags);
|
||||
if (dev->usb_ctl.vbi_buf != NULL) {
|
||||
vb2_buffer_done(&dev->usb_ctl.vbi_buf->vb, VB2_BUF_STATE_ERROR);
|
||||
dev->usb_ctl.vbi_buf = NULL;
|
||||
}
|
||||
while (!list_empty(&vbiq->active)) {
|
||||
struct em28xx_buffer *buf;
|
||||
buf = list_entry(vbiq->active.next, struct em28xx_buffer, list);
|
||||
list_del(&buf->list);
|
||||
vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
|
||||
}
|
||||
dev->usb_ctl.vbi_buf = NULL;
|
||||
spin_unlock_irqrestore(&dev->slock, flags);
|
||||
}
|
||||
|
||||
@@ -1711,7 +1720,7 @@ static int vidioc_querycap(struct file *file, void *priv,
|
||||
else
|
||||
cap->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
|
||||
|
||||
if (dev->audio_mode.has_audio)
|
||||
if (dev->int_audio_type != EM28XX_INT_AUDIO_NONE)
|
||||
cap->device_caps |= V4L2_CAP_AUDIO;
|
||||
|
||||
if (dev->tuner_type != TUNER_ABSENT)
|
||||
@@ -2296,7 +2305,7 @@ static int em28xx_v4l2_init(struct em28xx *dev)
|
||||
v4l2->v4l2_dev.ctrl_handler = hdl;
|
||||
|
||||
if (dev->board.is_webcam)
|
||||
v4l2->progressive = 1;
|
||||
v4l2->progressive = true;
|
||||
|
||||
/*
|
||||
* Default format, used for tvp5150 or saa711x output formats
|
||||
@@ -2502,7 +2511,7 @@ static int em28xx_v4l2_init(struct em28xx *dev)
|
||||
v4l2_disable_ioctl(v4l2->vdev, VIDIOC_G_FREQUENCY);
|
||||
v4l2_disable_ioctl(v4l2->vdev, VIDIOC_S_FREQUENCY);
|
||||
}
|
||||
if (!dev->audio_mode.has_audio) {
|
||||
if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE) {
|
||||
v4l2_disable_ioctl(v4l2->vdev, VIDIOC_G_AUDIO);
|
||||
v4l2_disable_ioctl(v4l2->vdev, VIDIOC_S_AUDIO);
|
||||
}
|
||||
@@ -2532,7 +2541,7 @@ static int em28xx_v4l2_init(struct em28xx *dev)
|
||||
v4l2_disable_ioctl(v4l2->vbi_dev, VIDIOC_G_FREQUENCY);
|
||||
v4l2_disable_ioctl(v4l2->vbi_dev, VIDIOC_S_FREQUENCY);
|
||||
}
|
||||
if (!dev->audio_mode.has_audio) {
|
||||
if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE) {
|
||||
v4l2_disable_ioctl(v4l2->vbi_dev, VIDIOC_G_AUDIO);
|
||||
v4l2_disable_ioctl(v4l2->vbi_dev, VIDIOC_S_AUDIO);
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user