diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-21 17:32:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:06:42 -0400 |
commit | 01f1e44fe8455b6c6c557a62119b8622fb99f5f2 (patch) | |
tree | e1bf62f369561d52aa913a60a75302dff3beb9a6 /drivers/media/video/ivtv | |
parent | ea115d54bc963eb2eb0dc223795f3bd6c689ff99 (diff) |
V4L/DVB (6088): cx2341x: some controls can't be changed while the device is busy
The driver should now pass the 'busy' state of the device to the cx2341x
module whenever controls are set or tried. -EBUSY will be returned if
the device is busy and the user attempts to modify certain 'dangerous'
controls. It concerns controls that change the audio or video
compression mode and bitrates.
The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy)
to the cx2341x, effectively keeping the old behavior for now.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-controls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/video/ivtv/ivtv-controls.c index 7a876c3e5b19..0005ea46f208 100644 --- a/drivers/media/video/ivtv/ivtv-controls.c +++ b/drivers/media/video/ivtv/ivtv-controls.c | |||
@@ -232,7 +232,7 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) | |||
232 | IVTV_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); | 232 | IVTV_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); |
233 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { | 233 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { |
234 | struct cx2341x_mpeg_params p = itv->params; | 234 | struct cx2341x_mpeg_params p = itv->params; |
235 | int err = cx2341x_ext_ctrls(&p, arg, cmd); | 235 | int err = cx2341x_ext_ctrls(&p, atomic_read(&itv->capturing), arg, cmd); |
236 | 236 | ||
237 | if (err) | 237 | if (err) |
238 | return err; | 238 | return err; |
@@ -282,7 +282,7 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) | |||
282 | } | 282 | } |
283 | IVTV_DEBUG_IOCTL("VIDIOC_G_EXT_CTRLS\n"); | 283 | IVTV_DEBUG_IOCTL("VIDIOC_G_EXT_CTRLS\n"); |
284 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) | 284 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) |
285 | return cx2341x_ext_ctrls(&itv->params, arg, cmd); | 285 | return cx2341x_ext_ctrls(&itv->params, 0, arg, cmd); |
286 | return -EINVAL; | 286 | return -EINVAL; |
287 | } | 287 | } |
288 | 288 | ||
@@ -292,7 +292,7 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) | |||
292 | 292 | ||
293 | IVTV_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); | 293 | IVTV_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); |
294 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) | 294 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) |
295 | return cx2341x_ext_ctrls(&itv->params, arg, cmd); | 295 | return cx2341x_ext_ctrls(&itv->params, atomic_read(&itv->capturing), arg, cmd); |
296 | return -EINVAL; | 296 | return -EINVAL; |
297 | } | 297 | } |
298 | 298 | ||