aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-21 17:32:42 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 21:06:42 -0400
commit01f1e44fe8455b6c6c557a62119b8622fb99f5f2 (patch)
treee1bf62f369561d52aa913a60a75302dff3beb9a6 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parentea115d54bc963eb2eb0dc223795f3bd6c689ff99 (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/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 1311891e7ee3..2d5be5cfbccf 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -492,7 +492,7 @@ static int ctrl_cx2341x_get(struct pvr2_ctrl *cptr,int *vp)
492 cs.controls = &c1; 492 cs.controls = &c1;
493 cs.count = 1; 493 cs.count = 1;
494 c1.id = cptr->info->v4l_id; 494 c1.id = cptr->info->v4l_id;
495 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state,&cs, 495 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state, 0, &cs,
496 VIDIOC_G_EXT_CTRLS); 496 VIDIOC_G_EXT_CTRLS);
497 if (ret) return ret; 497 if (ret) return ret;
498 *vp = c1.value; 498 *vp = c1.value;
@@ -510,7 +510,7 @@ static int ctrl_cx2341x_set(struct pvr2_ctrl *cptr,int m,int v)
510 cs.count = 1; 510 cs.count = 1;
511 c1.id = cptr->info->v4l_id; 511 c1.id = cptr->info->v4l_id;
512 c1.value = v; 512 c1.value = v;
513 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state,&cs, 513 ret = cx2341x_ext_ctrls(&cptr->hdw->enc_ctl_state, 0, &cs,
514 VIDIOC_S_EXT_CTRLS); 514 VIDIOC_S_EXT_CTRLS);
515 if (ret) return ret; 515 if (ret) return ret;
516 cptr->hdw->enc_stale = !0; 516 cptr->hdw->enc_stale = !0;
@@ -2478,7 +2478,7 @@ static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw)
2478 cs.count = 1; 2478 cs.count = 1;
2479 c1.id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ; 2479 c1.id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ;
2480 c1.value = hdw->srate_val; 2480 c1.value = hdw->srate_val;
2481 cx2341x_ext_ctrls(&hdw->enc_ctl_state,&cs,VIDIOC_S_EXT_CTRLS); 2481 cx2341x_ext_ctrls(&hdw->enc_ctl_state, 0, &cs,VIDIOC_S_EXT_CTRLS);
2482 } 2482 }
2483 2483
2484 /* Scan i2c core at this point - before we clear all the dirty 2484 /* Scan i2c core at this point - before we clear all the dirty