Commit 47fd3ba9 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 27b5a395
...@@ -650,7 +650,6 @@ struct vbi_info { ...@@ -650,7 +650,6 @@ struct vbi_info {
/* convenience pointer to sliced struct in vbi_in union */ /* convenience pointer to sliced struct in vbi_in union */
struct v4l2_sliced_vbi_format *sliced_in; struct v4l2_sliced_vbi_format *sliced_in;
u32 service_set_in; u32 service_set_in;
u32 service_set_out;
int insert_mpeg; int insert_mpeg;
/* Buffer for the maximum of 2 * 18 * packet_size sliced VBI lines. /* Buffer for the maximum of 2 * 18 * packet_size sliced VBI lines.
......
...@@ -219,18 +219,10 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count) ...@@ -219,18 +219,10 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
int found_cc = 0; int found_cc = 0;
int cc_pos = itv->vbi.cc_pos; int cc_pos = itv->vbi.cc_pos;
if (itv->vbi.service_set_out == 0)
return -EPERM;
while (count >= sizeof(struct v4l2_sliced_vbi_data)) { while (count >= sizeof(struct v4l2_sliced_vbi_data)) {
switch (p->id) { switch (p->id) {
case V4L2_SLICED_CAPTION_525: case V4L2_SLICED_CAPTION_525:
if (p->id == V4L2_SLICED_CAPTION_525 && if (p->line == 21) {
p->line == 21 &&
(itv->vbi.service_set_out &
V4L2_SLICED_CAPTION_525) == 0) {
break;
}
found_cc = 1; found_cc = 1;
if (p->field) { if (p->field) {
cc[2] = p->data[0]; cc[2] = p->data[0];
...@@ -239,11 +231,11 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count) ...@@ -239,11 +231,11 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
cc[0] = p->data[0]; cc[0] = p->data[0];
cc[1] = p->data[1]; cc[1] = p->data[1];
} }
}
break; break;
case V4L2_SLICED_VPS: case V4L2_SLICED_VPS:
if (p->line == 16 && p->field == 0 && if (p->line == 16 && p->field == 0) {
(itv->vbi.service_set_out & V4L2_SLICED_VPS)) {
itv->vbi.vps[0] = p->data[2]; itv->vbi.vps[0] = p->data[2];
itv->vbi.vps[1] = p->data[8]; itv->vbi.vps[1] = p->data[8];
itv->vbi.vps[2] = p->data[9]; 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,8 +247,7 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
break; break;
case V4L2_SLICED_WSS_625: case V4L2_SLICED_WSS_625:
if (p->line == 23 && p->field == 0 && if (p->line == 23 && p->field == 0) {
(itv->vbi.service_set_out & V4L2_SLICED_WSS_625)) {
/* No lock needed for WSS */ /* No lock needed for WSS */
itv->vbi.wss = p->data[0] | (p->data[1] << 8); itv->vbi.wss = p->data[0] | (p->data[1] << 8);
itv->vbi.wss_found = 1; itv->vbi.wss_found = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment