diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-06-16 16:02:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:24:10 -0400 |
commit | 47fd3ba9fc62d23a985f4969719c3091438d21c5 (patch) | |
tree | 3655a1c1c90cbd6940398094cd79dc06f9dc4e28 | |
parent | 27b5a3957a205bcaa07952ed27981f69b2b2f764 (diff) |
V4L/DVB (5769): Ivtv: fix broken VBI output support
The old service_set_out setting was still tested, even though it no longer
was ever set and was in fact obsolete. This meant that everything that was
written to /dev/vbi16 was ignored. Removed the service_set_out variable
altogether and now it works again.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.h | 1 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-vbi.c | 31 |
2 files changed, 11 insertions, 21 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h index e6e56f175f3f..48afd4270cbf 100644 --- a/drivers/media/video/ivtv/ivtv-driver.h +++ b/drivers/media/video/ivtv/ivtv-driver.h | |||
@@ -650,7 +650,6 @@ struct vbi_info { | |||
650 | /* convenience pointer to sliced struct in vbi_in union */ | 650 | /* convenience pointer to sliced struct in vbi_in union */ |
651 | struct v4l2_sliced_vbi_format *sliced_in; | 651 | struct v4l2_sliced_vbi_format *sliced_in; |
652 | u32 service_set_in; | 652 | u32 service_set_in; |
653 | u32 service_set_out; | ||
654 | int insert_mpeg; | 653 | int insert_mpeg; |
655 | 654 | ||
656 | /* Buffer for the maximum of 2 * 18 * packet_size sliced VBI lines. | 655 | /* Buffer for the maximum of 2 * 18 * packet_size sliced VBI lines. |
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index 3ba46e07ea1f..a7282a91bd97 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/drivers/media/video/ivtv/ivtv-vbi.c | |||
@@ -219,31 +219,23 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count) | |||
219 | int found_cc = 0; | 219 | int found_cc = 0; |
220 | int cc_pos = itv->vbi.cc_pos; | 220 | int cc_pos = itv->vbi.cc_pos; |
221 | 221 | ||
222 | if (itv->vbi.service_set_out == 0) | ||
223 | return -EPERM; | ||
224 | |||
225 | while (count >= sizeof(struct v4l2_sliced_vbi_data)) { | 222 | while (count >= sizeof(struct v4l2_sliced_vbi_data)) { |
226 | switch (p->id) { | 223 | switch (p->id) { |
227 | case V4L2_SLICED_CAPTION_525: | 224 | case V4L2_SLICED_CAPTION_525: |
228 | if (p->id == V4L2_SLICED_CAPTION_525 && | 225 | if (p->line == 21) { |
229 | p->line == 21 && | 226 | found_cc = 1; |
230 | (itv->vbi.service_set_out & | 227 | if (p->field) { |
231 | V4L2_SLICED_CAPTION_525) == 0) { | 228 | cc[2] = p->data[0]; |
232 | break; | 229 | cc[3] = p->data[1]; |
233 | } | 230 | } else { |
234 | found_cc = 1; | 231 | cc[0] = p->data[0]; |
235 | if (p->field) { | 232 | cc[1] = p->data[1]; |
236 | cc[2] = p->data[0]; | 233 | } |
237 | cc[3] = p->data[1]; | ||
238 | } else { | ||
239 | cc[0] = p->data[0]; | ||
240 | cc[1] = p->data[1]; | ||
241 | } | 234 | } |
242 | break; | 235 | break; |
243 | 236 | ||
244 | case V4L2_SLICED_VPS: | 237 | case V4L2_SLICED_VPS: |
245 | if (p->line == 16 && p->field == 0 && | 238 | if (p->line == 16 && p->field == 0) { |
246 | (itv->vbi.service_set_out & V4L2_SLICED_VPS)) { | ||
247 | itv->vbi.vps[0] = p->data[2]; | 239 | itv->vbi.vps[0] = p->data[2]; |
248 | itv->vbi.vps[1] = p->data[8]; | 240 | itv->vbi.vps[1] = p->data[8]; |
249 | itv->vbi.vps[2] = p->data[9]; | 241 | itv->vbi.vps[2] = p->data[9]; |
@@ -255,8 +247,7 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count) | |||
255 | break; | 247 | break; |
256 | 248 | ||
257 | case V4L2_SLICED_WSS_625: | 249 | case V4L2_SLICED_WSS_625: |
258 | if (p->line == 23 && p->field == 0 && | 250 | if (p->line == 23 && p->field == 0) { |
259 | (itv->vbi.service_set_out & V4L2_SLICED_WSS_625)) { | ||
260 | /* No lock needed for WSS */ | 251 | /* No lock needed for WSS */ |
261 | itv->vbi.wss = p->data[0] | (p->data[1] << 8); | 252 | itv->vbi.wss = p->data[0] | (p->data[1] << 8); |
262 | itv->vbi.wss_found = 1; | 253 | itv->vbi.wss_found = 1; |