diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-ioctl.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-ioctl.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c index f0ca50f5fdde..e6087486f889 100644 --- a/drivers/media/video/cx18/cx18-ioctl.c +++ b/drivers/media/video/cx18/cx18-ioctl.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Derived from ivtv-ioctl.c | 4 | * Derived from ivtv-ioctl.c |
5 | * | 5 | * |
6 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> | 6 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> |
7 | * Copyright (C) 2008 Andy Walls <awalls@radix.net> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
@@ -237,13 +238,12 @@ static int cx18_s_fmt_vbi_cap(struct file *file, void *fh, | |||
237 | if (ret) | 238 | if (ret) |
238 | return ret; | 239 | return ret; |
239 | 240 | ||
240 | if (id->type == CX18_ENC_STREAM_TYPE_VBI && | 241 | if (!cx18_raw_vbi(cx) && atomic_read(&cx->ana_capturing) > 0) |
241 | cx->vbi.sliced_in->service_set && | ||
242 | atomic_read(&cx->ana_capturing) > 0) | ||
243 | return -EBUSY; | 242 | return -EBUSY; |
244 | 243 | ||
245 | cx->vbi.sliced_in->service_set = 0; | 244 | cx->vbi.sliced_in->service_set = 0; |
246 | cx18_av_cmd(cx, VIDIOC_S_FMT, &cx->vbi.in); | 245 | cx->vbi.in.type = V4L2_BUF_TYPE_VBI_CAPTURE; |
246 | cx18_av_cmd(cx, VIDIOC_S_FMT, fmt); | ||
247 | return cx18_g_fmt_vbi_cap(file, fh, fmt); | 247 | return cx18_g_fmt_vbi_cap(file, fh, fmt); |
248 | } | 248 | } |
249 | 249 | ||
@@ -745,14 +745,12 @@ static int cx18_log_status(struct file *file, void *fh) | |||
745 | continue; | 745 | continue; |
746 | CX18_INFO("Stream %s: status 0x%04lx, %d%% of %d KiB (%d buffers) in use\n", | 746 | CX18_INFO("Stream %s: status 0x%04lx, %d%% of %d KiB (%d buffers) in use\n", |
747 | s->name, s->s_flags, | 747 | s->name, s->s_flags, |
748 | (s->buffers - atomic_read(&s->q_free.buffers)) | 748 | atomic_read(&s->q_full.buffers) * 100 / s->buffers, |
749 | * 100 / s->buffers, | ||
750 | (s->buffers * s->buf_size) / 1024, s->buffers); | 749 | (s->buffers * s->buf_size) / 1024, s->buffers); |
751 | } | 750 | } |
752 | CX18_INFO("Read MPEG/VBI: %lld/%lld bytes\n", | 751 | CX18_INFO("Read MPEG/VBI: %lld/%lld bytes\n", |
753 | (long long)cx->mpg_data_received, | 752 | (long long)cx->mpg_data_received, |
754 | (long long)cx->vbi_data_inserted); | 753 | (long long)cx->vbi_data_inserted); |
755 | cx18_log_statistics(cx); | ||
756 | CX18_INFO("================== END STATUS CARD #%d ==================\n", cx->num); | 754 | CX18_INFO("================== END STATUS CARD #%d ==================\n", cx->num); |
757 | return 0; | 755 | return 0; |
758 | } | 756 | } |