summaryrefslogtreecommitdiff
path: root/v4l_experimental
diff options
context:
space:
mode:
authorMike Isely <devnull@localhost>2006-01-09 06:45:51 +0000
committerMike Isely <devnull@localhost>2006-01-09 06:45:51 +0000
commit4c4fffc05ca33429a5927f46a66e4569a11c9ad8 (patch)
treee3509ee6c119844ef7e30aedfd2814c96aa807bf /v4l_experimental
parent2d393c98a1b0a64bd87ca69735ac58de396cf86c (diff)
downloadmediapointer-dvb-s2-4c4fffc05ca33429a5927f46a66e4569a11c9ad8.tar.gz
mediapointer-dvb-s2-4c4fffc05ca33429a5927f46a66e4569a11c9ad8.tar.bz2
Optimize control changes in pvrusb2 when it doesn't really change
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'v4l_experimental')
-rw-r--r--v4l_experimental/pvrusb2/pvrusb2-hdw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/v4l_experimental/pvrusb2/pvrusb2-hdw.c b/v4l_experimental/pvrusb2/pvrusb2-hdw.c
index 396c25c78..15969ac46 100644
--- a/v4l_experimental/pvrusb2/pvrusb2-hdw.c
+++ b/v4l_experimental/pvrusb2/pvrusb2-hdw.c
@@ -1,6 +1,6 @@
/*
*
- * $Id: pvrusb2-hdw.c,v 1.8 2006/01/09 06:37:48 mcisely Exp $
+ * $Id: pvrusb2-hdw.c,v 1.9 2006/01/09 06:45:51 mcisely Exp $
*
* Copyright (C) 2005 Mike Isely <isely@pobox.com>
*
@@ -40,10 +40,13 @@ DECLARE_MUTEX(pvr2_unit_sem);
static int hfull = 1;
static int width = 720;
+static int ctlchg = 0;
static int initusbreset = 1;
static int procreload = 0;
static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 };
+module_param(ctlchg, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value");
module_param(initusbreset, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(initusbreset, "Do USB reset device on probe");
module_param(procreload, int, S_IRUGO|S_IWUSR);
@@ -1337,8 +1340,10 @@ int pvr2_hdw_set_ctl_value_internal(struct pvr2_hdw *hdw,
function, then treat this as a read-only value. */
return -EINVAL;
}
- hdw->controls[ctl_id].value = value;
- hdw->controls[ctl_id].dirty = !0;
+ if ((hdw->controls[ctl_id].value != value) || (ctlchg != 0)) {
+ hdw->controls[ctl_id].value = value;
+ hdw->controls[ctl_id].dirty = !0;
+ }
return 0;
}