diff options
author | Andy Walls <awalls@radix.net> | 2008-11-23 17:16:44 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:39:08 -0500 |
commit | 50b86bac6ae6dda00faa14f7d73ae2412eacc240 (patch) | |
tree | a34b376d559982e6ce97ddb7e0899e90ad371235 /drivers/media/video/cx18/cx18-controls.c | |
parent | f6b181ac3bda7aab227e9ee3148bc9b7f1889c57 (diff) |
V4L/DVB (9894): cx18: Use a known open task handle when setting stream CX2341x parameters
cx18: Use a known open task handle when setting stream CX2341x parameters
Sometimes, we might only have VBI or YUV stream open instead of an MPEG stream.
Let's make sure we use a valid task handle to perform the CX2341x control
settings.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-controls.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-controls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c index f46c7e5ed747..17edf305d649 100644 --- a/drivers/media/video/cx18/cx18-controls.c +++ b/drivers/media/video/cx18/cx18-controls.c | |||
@@ -259,6 +259,7 @@ int cx18_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c) | |||
259 | return err; | 259 | return err; |
260 | } | 260 | } |
261 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { | 261 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { |
262 | struct cx18_api_func_private priv; | ||
262 | struct cx2341x_mpeg_params p = cx->params; | 263 | struct cx2341x_mpeg_params p = cx->params; |
263 | int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing), | 264 | int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing), |
264 | c, VIDIOC_S_EXT_CTRLS); | 265 | c, VIDIOC_S_EXT_CTRLS); |
@@ -278,7 +279,9 @@ int cx18_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c) | |||
278 | fmt.fmt.pix.height = cx->params.height; | 279 | fmt.fmt.pix.height = cx->params.height; |
279 | cx18_av_cmd(cx, VIDIOC_S_FMT, &fmt); | 280 | cx18_av_cmd(cx, VIDIOC_S_FMT, &fmt); |
280 | } | 281 | } |
281 | err = cx2341x_update(cx, cx18_api_func, &cx->params, &p); | 282 | priv.cx = cx; |
283 | priv.s = &cx->streams[id->type]; | ||
284 | err = cx2341x_update(&priv, cx18_api_func, &cx->params, &p); | ||
282 | if (!err && cx->params.stream_vbi_fmt != p.stream_vbi_fmt) | 285 | if (!err && cx->params.stream_vbi_fmt != p.stream_vbi_fmt) |
283 | err = cx18_setup_vbi_fmt(cx, p.stream_vbi_fmt); | 286 | err = cx18_setup_vbi_fmt(cx, p.stream_vbi_fmt); |
284 | cx->params = p; | 287 | cx->params = p; |