PRIVATE MESSAGE

2013-11-23 Thread OSBORNES SOLICITORS LLP
-- 
This is to inform you that an inheritance was bequeathed in your
favour. Letters were posted to you to this regards, but returned
undelivered. Kindly contact me once you recieve this email for more
information.

Sincerely
Barr Mark Freedman
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv2 dvb-apps] Silence last warnings in dvbscan.c

2013-11-23 Thread Hans Verkuil
Hi Mike,

This is the revised version of the patch I mailed earlier. As you requested
I now use #if 0 instead of commenting out line to silence the warnings.

Regards,

Hans

Signed-off-by: Hans Verkuil hans.verk...@cisco.com

diff -r 7161fa4a3e33 util/dvbscan/dvbscan.c
--- a/util/dvbscan/dvbscan.cThu Nov 14 16:45:24 2013 -0500
+++ b/util/dvbscan/dvbscan.cSat Nov 23 11:54:53 2013 +0100
@@ -74,8 +74,8 @@
   Dual LO, 
H:5150MHz, V:5750MHz.\n
* One of the sec definitions from the 
secfile if supplied\n
 -satpos positionSpecify DISEQC switch position for 
DVB-S.\n
--inversion on|off|auto Specify inversion (default: auto).\n
--uk-ordering  Use UK DVB-T channel ordering if 
present.\n
+-inversion on|off|auto Specify inversion (default: auto) 
(note: this option is ignored).\n
+-uk-ordering  Use UK DVB-T channel ordering if 
present (note: this option is ignored).\n
 -timeout secs   Specify filter timeout to use (standard 
specced values will be used by default)\n
 -filter filter  Specify service filter, a comma 
seperated list of the following tokens:\n
(If no filter is supplied, all 
services will be output)\n
@@ -83,10 +83,11 @@
* radio - Output radio channels\n
* other - Output other channels\n
* encrypted - Output encrypted 
channels\n
--out raw filename|-  Output in raw format to filename or 
stdout\n
+-out raw filename|- Output in raw format to filename or 
stdout\n
  channels filename|-  Output in channels.conf format to 
filename or stdout.\n
  vdr12 filename|- Output in vdr 1.2.x format to 
filename or stdout.\n
  vdr13 filename|- Output in vdr 1.3.x format to 
filename or stdout.\n
+  Note: this option is ignored.\n
 initial scan file\n;
fprintf(stderr, %s\n, _usage);
 
@@ -121,15 +122,17 @@
char *secfile = NULL;
char *secid = NULL;
int satpos = 0;
-   enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
int service_filter = -1;
-   int uk_ordering = 0;
int timeout = 5;
-   int output_type = OUTPUT_TYPE_RAW;
-   char *output_filename = NULL;
char *scan_filename = NULL;
struct dvbsec_config sec;
int valid_sec = 0;
+#if 0
+   char *output_filename = NULL;
+   enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
+   int output_type = OUTPUT_TYPE_RAW;
+   int uk_ordering = 0;
+#endif
 
while(argpos != argc) {
if (!strcmp(argv[argpos], -h)) {
@@ -171,6 +174,7 @@
} else if (!strcmp(argv[argpos], -inversion)) {
if ((argc - argpos)  2)
usage();
+#if 0
if (!strcmp(argv[argpos+1], off)) {
inversion = DVBFE_INVERSION_OFF;
} else if (!strcmp(argv[argpos+1], on)) {
@@ -180,11 +184,14 @@
} else {
usage();
}
+#endif
argpos+=2;
} else if (!strcmp(argv[argpos], -uk-ordering)) {
if ((argc - argpos)  1)
usage();
+#if 0
uk_ordering = 1;
+#endif
} else if (!strcmp(argv[argpos], -timeout)) {
if ((argc - argpos)  2)
usage();
@@ -211,6 +218,7 @@
} else if (!strcmp(argv[argpos], -out)) {
if ((argc - argpos)  3)
usage();
+#if 0
if (!strcmp(argv[argpos+1], raw)) {
output_type = OUTPUT_TYPE_RAW;
} else if (!strcmp(argv[argpos+1], channels)) {
@@ -225,6 +233,7 @@
output_filename = argv[argpos+2];
if (!strcmp(output_filename, -))
output_filename = NULL;
+#endif
} else {
if ((argc - argpos) != 1)
usage();
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 dvb-apps] Silence last warnings in dvbscan.c

2013-11-23 Thread Manu Abraham
On Sat, Nov 23, 2013 at 4:25 PM, Hans Verkuil hverk...@xs4all.nl wrote:
 Hi Mike,

 This is the revised version of the patch I mailed earlier. As you requested
 I now use #if 0 instead of commenting out line to silence the warnings.

 Regards,

 Hans

 Signed-off-by: Hans Verkuil hans.verk...@cisco.com

 diff -r 7161fa4a3e33 util/dvbscan/dvbscan.c
 --- a/util/dvbscan/dvbscan.cThu Nov 14 16:45:24 2013 -0500
 +++ b/util/dvbscan/dvbscan.cSat Nov 23 11:54:53 2013 +0100
 @@ -74,8 +74,8 @@
Dual LO, 
 H:5150MHz, V:5750MHz.\n
 * One of the sec definitions from 
 the secfile if supplied\n
  -satpos positionSpecify DISEQC switch position for 
 DVB-S.\n
 --inversion on|off|auto Specify inversion (default: 
 auto).\n
 --uk-ordering  Use UK DVB-T channel ordering if 
 present.\n
 +-inversion on|off|auto Specify inversion (default: auto) 
 (note: this option is ignored).\n
 +-uk-ordering  Use UK DVB-T channel ordering if 
 present (note: this option is ignored).\n
  -timeout secs   Specify filter timeout to use 
 (standard specced values will be used by default)\n
  -filter filter  Specify service filter, a comma 
 seperated list of the following tokens:\n
 (If no filter is supplied, all 
 services will be output)\n
 @@ -83,10 +83,11 @@
 * radio - Output radio channels\n
 * other - Output other channels\n
 * encrypted - Output encrypted 
 channels\n
 --out raw filename|-  Output in raw format to filename 
 or stdout\n
 +-out raw filename|- Output in raw format to filename or 
 stdout\n
   channels filename|-  Output in channels.conf format 
 to filename or stdout.\n
   vdr12 filename|- Output in vdr 1.2.x format to 
 filename or stdout.\n
   vdr13 filename|- Output in vdr 1.3.x format to 
 filename or stdout.\n
 +  Note: this option is ignored.\n
  initial scan file\n;
 fprintf(stderr, %s\n, _usage);

 @@ -121,15 +122,17 @@
 char *secfile = NULL;
 char *secid = NULL;
 int satpos = 0;
 -   enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
 int service_filter = -1;
 -   int uk_ordering = 0;
 int timeout = 5;
 -   int output_type = OUTPUT_TYPE_RAW;
 -   char *output_filename = NULL;
 char *scan_filename = NULL;
 struct dvbsec_config sec;
 int valid_sec = 0;
 +#if 0
 +   char *output_filename = NULL;
 +   enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
 +   int output_type = OUTPUT_TYPE_RAW;
 +   int uk_ordering = 0;
 +#endif

 while(argpos != argc) {
 if (!strcmp(argv[argpos], -h)) {
 @@ -171,6 +174,7 @@
 } else if (!strcmp(argv[argpos], -inversion)) {
 if ((argc - argpos)  2)
 usage();
 +#if 0
 if (!strcmp(argv[argpos+1], off)) {
 inversion = DVBFE_INVERSION_OFF;
 } else if (!strcmp(argv[argpos+1], on)) {
 @@ -180,11 +184,14 @@
 } else {
 usage();
 }
 +#endif
 argpos+=2;
 } else if (!strcmp(argv[argpos], -uk-ordering)) {
 if ((argc - argpos)  1)
 usage();
 +#if 0
 uk_ordering = 1;
 +#endif
 } else if (!strcmp(argv[argpos], -timeout)) {
 if ((argc - argpos)  2)
 usage();
 @@ -211,6 +218,7 @@
 } else if (!strcmp(argv[argpos], -out)) {
 if ((argc - argpos)  3)
 usage();
 +#if 0
 if (!strcmp(argv[argpos+1], raw)) {
 output_type = OUTPUT_TYPE_RAW;
 } else if (!strcmp(argv[argpos+1], channels)) {
 @@ -225,6 +233,7 @@
 output_filename = argv[argpos+2];
 if (!strcmp(output_filename, -))
 output_filename = NULL;
 +#endif
 } else {
 if ((argc - argpos) != 1)
 usage();
 --

Sorry, I missed you earlier patch.

Please remove the obsolete flags and the #if 0. Those are pointless.

Regards,

Manu
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to 

Re: [PATCH] v4l2-dev: Add tracepoints for QBUF and DQBUF

2013-11-23 Thread Hans Verkuil
Hi Wade,

On 11/22/2013 08:48 PM, Wade Farnsworth wrote:
 Add tracepoints to the QBUF and DQBUF ioctls to enable rudimentary
 performance measurements using standard kernel tracers.
 
 Signed-off-by: Wade Farnsworth wade_farnswo...@mentor.com
 ---
 
 This is the update to the RFC patch I posted a few weeks back.  I've added 
 several bits of metadata to the tracepoint output per Mauro's suggestion.

I don't like this. All v4l2 ioctls can already be traced by doing e.g.
echo 1 (or echo 2) /sys/class/video4linux/video0/debug.

So this code basically duplicates that functionality. It would be nice to be 
able
to tie in the existing tracing code (v4l2-ioctl.c) into tracepoints.

Regards,

Hans

 
  drivers/media/v4l2-core/v4l2-dev.c |9 ++
  include/trace/events/v4l2.h|  157 
 
  2 files changed, 166 insertions(+), 0 deletions(-)
  create mode 100644 include/trace/events/v4l2.h
 
 diff --git a/drivers/media/v4l2-core/v4l2-dev.c 
 b/drivers/media/v4l2-core/v4l2-dev.c
 index b5c..1cc1749 100644
 --- a/drivers/media/v4l2-core/v4l2-dev.c
 +++ b/drivers/media/v4l2-core/v4l2-dev.c
 @@ -31,6 +31,10 @@
  #include media/v4l2-device.h
  #include media/v4l2-ioctl.h
  
 +
 +#define CREATE_TRACE_POINTS
 +#include trace/events/v4l2.h
 +
  #define VIDEO_NUM_DEVICES256
  #define VIDEO_NAME  video4linux
  
 @@ -391,6 +395,11 @@ static long v4l2_ioctl(struct file *filp, unsigned int 
 cmd, unsigned long arg)
   } else
   ret = -ENOTTY;
  
 + if (cmd == VIDIOC_DQBUF)
 + trace_v4l2_dqbuf(vdev-minor, (struct v4l2_buffer *)arg);
 + else if (cmd == VIDIOC_QBUF)
 + trace_v4l2_qbuf(vdev-minor, (struct v4l2_buffer *)arg);
 +
   return ret;
  }
  
 diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h
 new file mode 100644
 index 000..0b7d6cb
 --- /dev/null
 +++ b/include/trace/events/v4l2.h
 @@ -0,0 +1,157 @@
 +#undef TRACE_SYSTEM
 +#define TRACE_SYSTEM v4l2
 +
 +#if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ)
 +#define _TRACE_V4L2_H
 +
 +#include linux/tracepoint.h
 +
 +#define show_type(type)  
\
 + __print_symbolic(type, \
 + { V4L2_BUF_TYPE_VIDEO_CAPTURE,VIDEO_CAPTURE },   \
 + { V4L2_BUF_TYPE_VIDEO_OUTPUT, VIDEO_OUTPUT },\
 + { V4L2_BUF_TYPE_VIDEO_OVERLAY,VIDEO_OVERLAY },   \
 + { V4L2_BUF_TYPE_VBI_CAPTURE,  VBI_CAPTURE }, \
 + { V4L2_BUF_TYPE_VBI_OUTPUT,   VBI_OUTPUT },  \
 + { V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,   SLICED_VBI_CAPTURE },  \
 + { V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,SLICED_VBI_OUTPUT },   \
 + { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, VIDEO_OUTPUT_OVERLAY },\
 + { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, VIDEO_CAPTURE_MPLANE },\
 + { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,  VIDEO_OUTPUT_MPLANE }, \
 + { V4L2_BUF_TYPE_PRIVATE,  PRIVATE })
 +
 +#define show_field(field)\
 + __print_symbolic(field, \
 + { V4L2_FIELD_ANY,   ANY },\
 + { V4L2_FIELD_NONE,  NONE },   \
 + { V4L2_FIELD_TOP,   TOP },\
 + { V4L2_FIELD_BOTTOM,BOTTOM }, \
 + { V4L2_FIELD_INTERLACED,INTERLACED }, \
 + { V4L2_FIELD_SEQ_TB,SEQ_TB }, \
 + { V4L2_FIELD_SEQ_BT,SEQ_BT }, \
 + { V4L2_FIELD_ALTERNATE, ALTERNATE },  \
 + { V4L2_FIELD_INTERLACED_TB, INTERLACED_TB },  \
 + { V4L2_FIELD_INTERLACED_BT, INTERLACED_BT })
 +
 +#define show_timecode_type(type) \
 + __print_symbolic(type,  \
 + { V4L2_TC_TYPE_24FPS,   24FPS },  \
 + { V4L2_TC_TYPE_25FPS,   25FPS },  \
 + { V4L2_TC_TYPE_30FPS,   30FPS },  \
 + { V4L2_TC_TYPE_50FPS,   50FPS },  \
 + { V4L2_TC_TYPE_60FPS,   60FPS })
 +
 +#define show_flags(flags)  \
 + __print_flags(flags, |, \
 + { V4L2_BUF_FLAG_MAPPED,  MAPPED },  \
 + { V4L2_BUF_FLAG_QUEUED,  QUEUED },  \
 + { V4L2_BUF_FLAG_DONE,DONE },\
 + { V4L2_BUF_FLAG_KEYFRAME,KEYFRAME },\
 + { V4L2_BUF_FLAG_PFRAME, 

[PATCH] input:keyboard: keycode KEY_MAX changes some keycode value.

2013-11-23 Thread andrew . liu200917
From: Andrew Liu andrew.liu200...@gmail.com

For exmaple, keycode: KEY_OK(0x160) is changed by and operation with
KEY_MAX(0x2ff) to KEY_KPENTER(96).

Signed-off-by: Andrew Liu andrew.liu200...@gmail.com
---
 drivers/input/keyboard/adp5588-keys.c |8 ++--
 drivers/input/keyboard/adp5589-keys.c |8 ++--
 drivers/input/keyboard/bf54x-keys.c   |8 ++--
 drivers/input/misc/pcf8574_keypad.c   |6 +-
 drivers/media/pci/ttpci/av7110_ir.c   |1 +
 5 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/drivers/input/keyboard/adp5588-keys.c 
b/drivers/input/keyboard/adp5588-keys.c
index dbd2047..1ce559e 100644
--- a/drivers/input/keyboard/adp5588-keys.c
+++ b/drivers/input/keyboard/adp5588-keys.c
@@ -535,8 +535,12 @@ static int adp5588_probe(struct i2c_client *client,
if (pdata-repeat)
__set_bit(EV_REP, input-evbit);
 
-   for (i = 0; i  input-keycodemax; i++)
-   __set_bit(kpad-keycode[i]  KEY_MAX, input-keybit);
+   for (i = 0; i  input-keycodemax; i++) {
+   if (kpad-keycode[i]  KEY_MAX)
+   kpad-keycode[i] = 0;
+   else if (kpad-keycode[i]  KEY_RESERVED)
+   __set_bit(kpad-keycode[i], input-keybit);
+   }
__clear_bit(KEY_RESERVED, input-keybit);
 
if (kpad-gpimapsize)
diff --git a/drivers/input/keyboard/adp5589-keys.c 
b/drivers/input/keyboard/adp5589-keys.c
index 67d12b3..22ca2a5 100644
--- a/drivers/input/keyboard/adp5589-keys.c
+++ b/drivers/input/keyboard/adp5589-keys.c
@@ -991,8 +991,12 @@ static int adp5589_probe(struct i2c_client *client,
if (pdata-repeat)
__set_bit(EV_REP, input-evbit);
 
-   for (i = 0; i  input-keycodemax; i++)
-   __set_bit(kpad-keycode[i]  KEY_MAX, input-keybit);
+   for (i = 0; i  input-keycodemax; i++) {
+   if (kpad-keycode[i]  KEY_MAX)
+   kpad-keycode[i] = 0;
+   else if (kpad-keycode[i]  KEY_RESERVED)
+   __set_bit(kpad-keycode[i], input-keybit);
+   }
__clear_bit(KEY_RESERVED, input-keybit);
 
if (kpad-gpimapsize)
diff --git a/drivers/input/keyboard/bf54x-keys.c 
b/drivers/input/keyboard/bf54x-keys.c
index fc88fb4..96f54e7 100644
--- a/drivers/input/keyboard/bf54x-keys.c
+++ b/drivers/input/keyboard/bf54x-keys.c
@@ -288,8 +288,12 @@ static int bfin_kpad_probe(struct platform_device *pdev)
if (pdata-repeat)
__set_bit(EV_REP, input-evbit);
 
-   for (i = 0; i  input-keycodemax; i++)
-   __set_bit(bf54x_kpad-keycode[i]  KEY_MAX, input-keybit);
+   for (i = 0; i  input-keycodemax; i++) {
+   if (bf54x_kpad-keycode[i]  KEY_MAX)
+   bf54x_kpad-keycode[i] = 0;
+   else if (bf54x_kpad-keycode[i]  KEY_RESERVED)
+   __set_bit(bf54x_kpad-keycode[i], input-keybit);
+   }
__clear_bit(KEY_RESERVED, input-keybit);
 
error = input_register_device(input);
diff --git a/drivers/input/misc/pcf8574_keypad.c 
b/drivers/input/misc/pcf8574_keypad.c
index e373929..48829f3 100644
--- a/drivers/input/misc/pcf8574_keypad.c
+++ b/drivers/input/misc/pcf8574_keypad.c
@@ -114,8 +114,12 @@ static int pcf8574_kp_probe(struct i2c_client *client, 
const struct i2c_device_i
 
for (i = 0; i  ARRAY_SIZE(pcf8574_kp_btncode); i++) {
lp-btncode[i] = pcf8574_kp_btncode[i];
-   __set_bit(lp-btncode[i]  KEY_MAX, idev-keybit);
+   if (lp-btncode[i]  KEY_MAX)
+   lp-btncode[i] = 0;
+   else if (lp-btncode[i]  KEY_RESERVED)
+   __set_bit(lp-btncode[i], idev-keybit);
}
+   __clear_bit(KEY_RESERVED, idev-keybit);
 
sprintf(lp-name, DRV_NAME);
sprintf(lp-phys, kp_data/input0);
diff --git a/drivers/media/pci/ttpci/av7110_ir.c 
b/drivers/media/pci/ttpci/av7110_ir.c
index 0e763a7..7fdac45 100644
--- a/drivers/media/pci/ttpci/av7110_ir.c
+++ b/drivers/media/pci/ttpci/av7110_ir.c
@@ -201,6 +201,7 @@ static void input_register_keys(struct infrared *ir)
else if (ir-key_map[i]  KEY_RESERVED)
set_bit(ir-key_map[i], ir-input_dev-keybit);
}
+   __clear_bit(KEY_RESERVED, ir-input_dev-keybit);
 
ir-input_dev-keycode = ir-key_map;
ir-input_dev-keycodesize = sizeof(ir-key_map[0]);
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCHv3 dvb-apps] Silence last warnings in dvbscan.c

2013-11-23 Thread Hans Verkuil
Hi Manu, Mike,

This is the third version of this patch with the #if 0 stuff removed in order to
silence the last warnings in dvb-apps. Mike, I like this better as well: after 
all,
that's why you have a revision control system in order resurrect old deleted 
code
should that be necessary.

Regards,

Hans

Signed-off-by: Hans Verkuil hans.verk...@cisco.com

diff -r 7161fa4a3e33 util/dvbscan/dvbscan.c
--- a/util/dvbscan/dvbscan.cThu Nov 14 16:45:24 2013 -0500
+++ b/util/dvbscan/dvbscan.cSat Nov 23 14:45:24 2013 +0100
@@ -74,8 +74,8 @@
   Dual LO, 
H:5150MHz, V:5750MHz.\n
* One of the sec definitions from the 
secfile if supplied\n
 -satpos positionSpecify DISEQC switch position for 
DVB-S.\n
--inversion on|off|auto Specify inversion (default: auto).\n
--uk-ordering  Use UK DVB-T channel ordering if 
present.\n
+-inversion on|off|auto Specify inversion (default: auto) 
(note: this option is ignored).\n
+-uk-ordering  Use UK DVB-T channel ordering if 
present (note: this option is ignored).\n
 -timeout secs   Specify filter timeout to use (standard 
specced values will be used by default)\n
 -filter filter  Specify service filter, a comma 
seperated list of the following tokens:\n
(If no filter is supplied, all 
services will be output)\n
@@ -83,10 +83,11 @@
* radio - Output radio channels\n
* other - Output other channels\n
* encrypted - Output encrypted 
channels\n
--out raw filename|-  Output in raw format to filename or 
stdout\n
+-out raw filename|- Output in raw format to filename or 
stdout\n
  channels filename|-  Output in channels.conf format to 
filename or stdout.\n
  vdr12 filename|- Output in vdr 1.2.x format to 
filename or stdout.\n
  vdr13 filename|- Output in vdr 1.3.x format to 
filename or stdout.\n
+  Note: this option is ignored.\n
 initial scan file\n;
fprintf(stderr, %s\n, _usage);
 
@@ -121,12 +122,8 @@
char *secfile = NULL;
char *secid = NULL;
int satpos = 0;
-   enum dvbfe_spectral_inversion inversion = DVBFE_INVERSION_AUTO;
int service_filter = -1;
-   int uk_ordering = 0;
int timeout = 5;
-   int output_type = OUTPUT_TYPE_RAW;
-   char *output_filename = NULL;
char *scan_filename = NULL;
struct dvbsec_config sec;
int valid_sec = 0;
@@ -171,20 +168,10 @@
} else if (!strcmp(argv[argpos], -inversion)) {
if ((argc - argpos)  2)
usage();
-   if (!strcmp(argv[argpos+1], off)) {
-   inversion = DVBFE_INVERSION_OFF;
-   } else if (!strcmp(argv[argpos+1], on)) {
-   inversion = DVBFE_INVERSION_ON;
-   } else if (!strcmp(argv[argpos+1], auto)) {
-   inversion = DVBFE_INVERSION_AUTO;
-   } else {
-   usage();
-   }
argpos+=2;
} else if (!strcmp(argv[argpos], -uk-ordering)) {
if ((argc - argpos)  1)
usage();
-   uk_ordering = 1;
} else if (!strcmp(argv[argpos], -timeout)) {
if ((argc - argpos)  2)
usage();
@@ -211,20 +198,6 @@
} else if (!strcmp(argv[argpos], -out)) {
if ((argc - argpos)  3)
usage();
-   if (!strcmp(argv[argpos+1], raw)) {
-   output_type = OUTPUT_TYPE_RAW;
-   } else if (!strcmp(argv[argpos+1], channels)) {
-   output_type = OUTPUT_TYPE_CHANNELS;
-   } else if (!strcmp(argv[argpos+1], vdr12)) {
-   output_type = OUTPUT_TYPE_VDR12;
-   } else if (!strcmp(argv[argpos+1], vdr13)) {
-   output_type = OUTPUT_TYPE_VDR13;
-   } else {
-   usage();
-   }
-   output_filename = argv[argpos+2];
-   if (!strcmp(output_filename, -))
-   output_filename = NULL;
} else {
if ((argc - argpos) != 1)
usage();
--
To unsubscribe from 

Re: RFC: Properties, Configuration Storage, Selections and Matrices

2013-11-23 Thread Hans Verkuil
Another update:

While attempting to add fake 'shadow register' support to vivi I realized that
the API to set up configuration stores didn't quite work out. Supporting
shadow registers is one of the main goals of the configuration storage idea, so
this should work smoothly.

In the original proposal a configuration store is set by VIDIOC_S_EXT_CTRLS and
any controls not in the control list will also be absent from the configuration
store. That makes no sense for shadow registers: i.e. you will always have N
sets of X registers and when switching from one set to another you switch them
all.

So the API has been changed a bit: all the driver-defined configuration stores
are always there and you can enumerate, get and set all the controls in each 
store.

If controls are implemented as shadow registers, then the driver will tell the
framework which of the configuration stores is the current store (i.e. which
store maps to the currently selected shadow register) and switching from one
configuration store to another will just update the current store of a control
to the new one.

If controls are not implemented as a shadow register and you really just want
to apply the new values from a configuration store, then that will actually
involve copying the values from the selected store to the current control 
values.

This approach made implementing fake shadow registers in vivi a trivial
exercise and worked out much better. In addition, internal data structures
became simpler as well (always a good sign).

My next step will be to add selection support as properties and see if I can
add per-frame crop/compose support to vivi.

Regards,

Hans

On 11/19/2013 09:10 AM, Hans Verkuil wrote:
 Just a quick update:
 
 I've been working on this for the past four days and I am now in the process
 of testing this. Adding matrix support to the control framework was actually
 the hardest part, particularly since I wanted it to be efficient. The code is
 still a bit too complex for my liking, but once testing verifies that 
 everything
 is working I plan to clean things up some more.
 
 I hope to be able to post a first version during or just after the weekend.
 
 Please review this RFC: other than some small changes this is pretty much how
 it will turn out.
 
 Some of the changes are:
 
 - The property bit is 26, not 27. Bit 27 clashes with the PRIVATE_BASE define 
 so
 it can't be used.
 
 - Any control/property type can be changed into a matrix by setting bit 15 in
 the type. E.g. V4l2_PROP_TYPE_MATRIX | V4L2_CTRL_TYPE_INTEGER. When passing 
 the
 data of a matrix the data is always preceded by a struct v4l2_rect which tells
 the driver which subset of the matrix the application wants to set/get.
 
 - We definitely need a V4L2_CTRL_FLAG_CAN_STORE flag. Stores take memory and 
 you
 only want to allocate that for those controls that actually need to be stored.
 
 - Regarding implementing stores for matrices: I store it in the internal 
 format,
 but with additional information regarding the parts of the matrix that need to
 be updated. Basically the best of both worlds. With some careful tweaking of
 data structure this turned out to be fairly easy to do. This systems allows
 you to update only parts of a matrix in a config store efficiently without
 having to convert from one format to another.
 
 Regards,
 
   Hans
 
 On 11/15/2013 03:19 PM, Hans Verkuil wrote:
 Properties, Configuration Storage, Selections and Matrices
 ==

 This proposal is an attempt to solve multiple issues with one single 
 solution.

 There have been various discussions in the past regarding a property-based
 API. Basically similar to the way controls are handled but without having
 to deal with the GUI-related aspects of controls and with more flexibility
 with regards to supported types.

 Another discussion is about how to atomically set certain pipeline 
 configurations,
 selections in particular. And for Android's camera3 library we also need to
 switch configuration on a per-buffer or per-frame basis, so we need some
 sort of configuration store.

 Also, I proposed an API extension for matrices:

 http://www.spinics.net/lists/linux-media/msg67326.html

 This would fit better in a property-based API.

 Recent discussions regarding multi-selection also ran into the same atomicity
 problems and unhappiness about the impact of the API changes necessary to
 support multi-selection.

 It is quite easy to extend the control framework to support pretty much all
 of the requirements stated above. It already satisfies the atomicity 
 requirements
 (by far the hardest to implement), and extending it to support compound,
 array and matrix types isn't hard either. Neither is implementing a 
 configuration
 store.

 One important observation regarding configuration stores: the information it
 can contain should be information that can change while streaming. If it
 can't be changed while 

Re: [PATCH] v4l2-dev: Add tracepoints for QBUF and DQBUF

2013-11-23 Thread Sylwester Nawrocki

Hi,

On 11/23/2013 12:25 PM, Hans Verkuil wrote:

Hi Wade,

On 11/22/2013 08:48 PM, Wade Farnsworth wrote:

Add tracepoints to the QBUF and DQBUF ioctls to enable rudimentary
performance measurements using standard kernel tracers.

Signed-off-by: Wade Farnsworthwade_farnswo...@mentor.com
---

This is the update to the RFC patch I posted a few weeks back.  I've added
several bits of metadata to the tracepoint output per Mauro's suggestion.


I don't like this. All v4l2 ioctls can already be traced by doing e.g.
echo 1 (or echo 2)/sys/class/video4linux/video0/debug.

So this code basically duplicates that functionality. It would be nice to be 
able
to tie in the existing tracing code (v4l2-ioctl.c) into tracepoints.


I think it would be really nice to have this kind of support for standard
traces at the v4l2 subsystem. Presumably it could even gradually replace
the v4l2 custom debug infrastructure.

If I understand things correctly, the current tracing/profiling 
infrastructure
is much less invasive than inserting printks all over, which may cause 
changes
in control flow. I doubt the system could be reliably profiled by 
enabling all

those debug prints.

So my vote would be to add support for standard tracers, like in other
subsystems in the kernel.

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] v4l2-dev: Add tracepoints for QBUF and DQBUF

2013-11-23 Thread Hans Verkuil
On 11/23/2013 05:30 PM, Sylwester Nawrocki wrote:
 Hi,
 
 On 11/23/2013 12:25 PM, Hans Verkuil wrote:
 Hi Wade,

 On 11/22/2013 08:48 PM, Wade Farnsworth wrote:
 Add tracepoints to the QBUF and DQBUF ioctls to enable rudimentary
 performance measurements using standard kernel tracers.

 Signed-off-by: Wade Farnsworthwade_farnswo...@mentor.com
 ---

 This is the update to the RFC patch I posted a few weeks back.  I've added
 several bits of metadata to the tracepoint output per Mauro's suggestion.

 I don't like this. All v4l2 ioctls can already be traced by doing e.g.
 echo 1 (or echo 2)/sys/class/video4linux/video0/debug.

 So this code basically duplicates that functionality. It would be nice to be 
 able
 to tie in the existing tracing code (v4l2-ioctl.c) into tracepoints.
 
 I think it would be really nice to have this kind of support for standard
 traces at the v4l2 subsystem. Presumably it could even gradually replace
 the v4l2 custom debug infrastructure.
 
 If I understand things correctly, the current tracing/profiling 
 infrastructure
 is much less invasive than inserting printks all over, which may cause 
 changes
 in control flow. I doubt the system could be reliably profiled by 
 enabling all
 those debug prints.
 
 So my vote would be to add support for standard tracers, like in other
 subsystems in the kernel.

The reason for the current system is to trace which ioctls are called in
what order by a misbehaving application. It's very useful for that,
especially when trying to debug user problems.

I don't mind switching to tracepoints as long as this functionality is
kept one way or another.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] input:keyboard: keycode KEY_MAX changes some keycode value.

2013-11-23 Thread Dmitry Torokhov
Hi Andrew,

On Sat, Nov 23, 2013 at 09:45:45PM +0800, andrew.liu200...@gmail.com wrote:
 From: Andrew Liu andrew.liu200...@gmail.com
 
 For exmaple, keycode: KEY_OK(0x160) is changed by and operation with
 KEY_MAX(0x2ff) to KEY_KPENTER(96).
 
 Signed-off-by: Andrew Liu andrew.liu200...@gmail.com
 ---
  drivers/input/keyboard/adp5588-keys.c |8 ++--
  drivers/input/keyboard/adp5589-keys.c |8 ++--
  drivers/input/keyboard/bf54x-keys.c   |8 ++--
  drivers/input/misc/pcf8574_keypad.c   |6 +-
  drivers/media/pci/ttpci/av7110_ir.c   |1 +
  5 files changed, 24 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/input/keyboard/adp5588-keys.c 
 b/drivers/input/keyboard/adp5588-keys.c
 index dbd2047..1ce559e 100644
 --- a/drivers/input/keyboard/adp5588-keys.c
 +++ b/drivers/input/keyboard/adp5588-keys.c
 @@ -535,8 +535,12 @@ static int adp5588_probe(struct i2c_client *client,
   if (pdata-repeat)
   __set_bit(EV_REP, input-evbit);
  
 - for (i = 0; i  input-keycodemax; i++)
 - __set_bit(kpad-keycode[i]  KEY_MAX, input-keybit);
 + for (i = 0; i  input-keycodemax; i++) {
 + if (kpad-keycode[i]  KEY_MAX)
 + kpad-keycode[i] = 0;

There is no need to reset keymap entires to 0, not setting keybit is
enough.

 + else if (kpad-keycode[i]  KEY_RESERVED)
 + __set_bit(kpad-keycode[i], input-keybit);
 + }
   __clear_bit(KEY_RESERVED, input-keybit);
  
   if (kpad-gpimapsize)
 diff --git a/drivers/input/keyboard/adp5589-keys.c 
 b/drivers/input/keyboard/adp5589-keys.c
 index 67d12b3..22ca2a5 100644
 --- a/drivers/input/keyboard/adp5589-keys.c
 +++ b/drivers/input/keyboard/adp5589-keys.c
 @@ -991,8 +991,12 @@ static int adp5589_probe(struct i2c_client *client,
   if (pdata-repeat)
   __set_bit(EV_REP, input-evbit);
  
 - for (i = 0; i  input-keycodemax; i++)
 - __set_bit(kpad-keycode[i]  KEY_MAX, input-keybit);
 + for (i = 0; i  input-keycodemax; i++) {
 + if (kpad-keycode[i]  KEY_MAX)
 + kpad-keycode[i] = 0;
 + else if (kpad-keycode[i]  KEY_RESERVED)
 + __set_bit(kpad-keycode[i], input-keybit);
 + }
   __clear_bit(KEY_RESERVED, input-keybit);
  
   if (kpad-gpimapsize)
 diff --git a/drivers/input/keyboard/bf54x-keys.c 
 b/drivers/input/keyboard/bf54x-keys.c
 index fc88fb4..96f54e7 100644
 --- a/drivers/input/keyboard/bf54x-keys.c
 +++ b/drivers/input/keyboard/bf54x-keys.c
 @@ -288,8 +288,12 @@ static int bfin_kpad_probe(struct platform_device *pdev)
   if (pdata-repeat)
   __set_bit(EV_REP, input-evbit);
  
 - for (i = 0; i  input-keycodemax; i++)
 - __set_bit(bf54x_kpad-keycode[i]  KEY_MAX, input-keybit);
 + for (i = 0; i  input-keycodemax; i++) {
 + if (bf54x_kpad-keycode[i]  KEY_MAX)
 + bf54x_kpad-keycode[i] = 0;
 + else if (bf54x_kpad-keycode[i]  KEY_RESERVED)
 + __set_bit(bf54x_kpad-keycode[i], input-keybit);
 + }
   __clear_bit(KEY_RESERVED, input-keybit);
  
   error = input_register_device(input);
 diff --git a/drivers/input/misc/pcf8574_keypad.c 
 b/drivers/input/misc/pcf8574_keypad.c
 index e373929..48829f3 100644
 --- a/drivers/input/misc/pcf8574_keypad.c
 +++ b/drivers/input/misc/pcf8574_keypad.c
 @@ -114,8 +114,12 @@ static int pcf8574_kp_probe(struct i2c_client *client, 
 const struct i2c_device_i
  
   for (i = 0; i  ARRAY_SIZE(pcf8574_kp_btncode); i++) {
   lp-btncode[i] = pcf8574_kp_btncode[i];
 - __set_bit(lp-btncode[i]  KEY_MAX, idev-keybit);
 + if (lp-btncode[i]  KEY_MAX)
 + lp-btncode[i] = 0;
 + else if (lp-btncode[i]  KEY_RESERVED)
 + __set_bit(lp-btncode[i], idev-keybit);
   }
 + __clear_bit(KEY_RESERVED, idev-keybit);
  
   sprintf(lp-name, DRV_NAME);
   sprintf(lp-phys, kp_data/input0);
 diff --git a/drivers/media/pci/ttpci/av7110_ir.c 
 b/drivers/media/pci/ttpci/av7110_ir.c
 index 0e763a7..7fdac45 100644
 --- a/drivers/media/pci/ttpci/av7110_ir.c
 +++ b/drivers/media/pci/ttpci/av7110_ir.c
 @@ -201,6 +201,7 @@ static void input_register_keys(struct infrared *ir)
   else if (ir-key_map[i]  KEY_RESERVED)
   set_bit(ir-key_map[i], ir-input_dev-keybit);
   }
 + __clear_bit(KEY_RESERVED, ir-input_dev-keybit);

Here we only setting bits for keycodes above KEY_RESERVED so we do not
need to clear KEY_RESERVED bit.

  
   ir-input_dev-keycode = ir-key_map;
   ir-input_dev-keycodesize = sizeof(ir-key_map[0]);
 -- 
 1.7.1
 

Edited and applied, thank you.

-- 
Dmitry
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cron job: media_tree daily build: WARNINGS

2013-11-23 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sun Nov 24 04:00:29 CET 2013
git branch: test
git hash:   80f93c7b0f4599ffbdac8d964ecd1162b8b618b9
gcc version:i686-linux-gcc (GCC) 4.8.1
sparse version: 0.4.5-rc1
host hardware:  x86_64
host os:3.12-0.slh.2-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.31.14-i686: OK
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12-i686: OK
linux-2.6.31.14-x86_64: OK
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12-x86_64: OK
apps: WARNINGS
spec-git: OK
sparse version: 0.4.5-rc1
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html