Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37337
b: refs/heads/master
c: 094ddbe
h: refs/heads/master
i:
  37335: e331f4a
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent de71f03 commit c185c2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89ebd63fdddc83fabb5cc751d0e59a1350c1627c
refs/heads/master: 094ddbe9506706187b58df91d64695547a807916
30 changes: 30 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,30 @@ static int ctrl_freq_set(struct pvr2_ctrl *cptr,int m,int v)
return 0;
}

#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
static int ctrl_hres_max_get(struct pvr2_ctrl *cptr,int *vp)
{
/* If we're dealing with a 24xxx device, force the horizontal
maximum to be 720 no matter what, since we can't get the device
to work properly with any other value. Otherwise just return
the normal value. */
*vp = cptr->info->def.type_int.max_value;
if (cptr->hdw->hdw_type == PVR2_HDW_TYPE_24XXX) *vp = 720;
return 0;
}

static int ctrl_hres_min_get(struct pvr2_ctrl *cptr,int *vp)
{
/* If we're dealing with a 24xxx device, force the horizontal
minimum to be 720 no matter what, since we can't get the device
to work properly with any other value. Otherwise just return
the normal value. */
*vp = cptr->info->def.type_int.min_value;
if (cptr->hdw->hdw_type == PVR2_HDW_TYPE_24XXX) *vp = 720;
return 0;
}
#endif

static int ctrl_cx2341x_is_dirty(struct pvr2_ctrl *cptr)
{
return cptr->hdw->enc_stale != 0;
Expand Down Expand Up @@ -721,6 +745,12 @@ static const struct pvr2_ctl_info control_defs[] = {
.default_value = 720,
DEFREF(res_hor),
DEFINT(320,720),
#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
/* Hook in check for clamp on horizontal resolution in
order to avoid unsolved problem involving cx25840. */
.get_max_value = ctrl_hres_max_get,
.get_min_value = ctrl_hres_min_get,
#endif
},{
.desc = "Vertical capture resolution",
.name = "resolution_ver",
Expand Down

0 comments on commit c185c2c

Please sign in to comment.