diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index f5b289ef4103..3d0013bdd1fd 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -575,8 +575,11 @@ static int ivtv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *f | |||
575 | { | 575 | { |
576 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; | 576 | struct ivtv *itv = ((struct ivtv_open_id *)fh)->itv; |
577 | 577 | ||
578 | if (!ivtv_raw_vbi(itv) && atomic_read(&itv->capturing) > 0) | ||
579 | return -EBUSY; | ||
578 | itv->vbi.sliced_in->service_set = 0; | 580 | itv->vbi.sliced_in->service_set = 0; |
579 | itv->video_dec_func(itv, VIDIOC_S_FMT, &itv->vbi.in); | 581 | itv->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE; |
582 | itv->video_dec_func(itv, VIDIOC_S_FMT, fmt); | ||
580 | return ivtv_g_fmt_vbi_cap(file, fh, fmt); | 583 | return ivtv_g_fmt_vbi_cap(file, fh, fmt); |
581 | } | 584 | } |
582 | 585 | ||
@@ -591,8 +594,9 @@ static int ivtv_s_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_fo | |||
591 | return ret; | 594 | return ret; |
592 | 595 | ||
593 | check_service_set(vbifmt, itv->is_50hz); | 596 | check_service_set(vbifmt, itv->is_50hz); |
594 | if (atomic_read(&itv->capturing) > 0) | 597 | if (ivtv_raw_vbi(itv) && atomic_read(&itv->capturing) > 0) |
595 | return -EBUSY; | 598 | return -EBUSY; |
599 | itv->vbi.in.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; | ||
596 | itv->video_dec_func(itv, VIDIOC_S_FMT, fmt); | 600 | itv->video_dec_func(itv, VIDIOC_S_FMT, fmt); |
597 | memcpy(itv->vbi.sliced_in, vbifmt, sizeof(*itv->vbi.sliced_in)); | 601 | memcpy(itv->vbi.sliced_in, vbifmt, sizeof(*itv->vbi.sliced_in)); |
598 | return 0; | 602 | return 0; |