Re: [PATCH v4 00/17] media: blackfin: bfin_capture enhancements

2015-05-05 Thread Lad, Prabhakar
Hi Scott,

On Tue, May 5, 2015 at 10:58 AM, Scott Jiang
 wrote:
> 2015-04-24 18:04 GMT+08:00 Hans Verkuil :
>> On 04/10/2015 12:42 PM, Scott Jiang wrote:
>>> Hi Hans,
>>>
>
> Hans, I tried to use v4l2-compliance but it failed to compile. Sorry
> for telling you it have passed compilation because I forgot to use
> blackfin toolchain.
> ./configure --without-jpeg  --host=bfin-linux-uclibc --disable-libv4l
>
> The main problem is there is no argp.h in uClibc, how to disable checking 
> this?
>
> checking for argp.h... no
> configure: error: Cannot continue: argp.h not found
>
> Scott
>

 Hi Scott,

 Can you try this patch for v4l-utils? It makes argp optional, and it should
 allow v4l2-compliance to compile with uclibc (unless there are more 
 problems).

 I'm no autoconf guru, so I'm not certain if everything is correct, but it
 seemed to do its job when I remove argp.h from my system.

>>>
>>> Yes, I can pass configure now. But there is another error when make
>>>
>>> make[3]: Entering directory
>>> `/home/scott/projects/git-kernel/v4l-utils/lib/libdvbv5'
>>>   CC libdvbv5_la-parse_string.lo
>>> parse_string.c:26:19: error: iconv.h: No such file or directory
>>> parse_string.c: In function 'dvb_iconv_to_charset':
>>> parse_string.c:316: error: 'iconv_t' undeclared (first use in this function)
>>>
>>> I tried to pass this library, while --without-libdvbv5 is not supported.
>>>
>>
>> If you can pass the configure step, then you should be able to run this:
>>
>> cd utils/v4l2-compliance
>> cat *.cpp >x.cpp
>> g++ -o v4l2-compliance x.cpp -I . -I ../../include/ -DNO_LIBV4L2
>>
>> (you need to use the right toolchain here, of course)
>>
>> If this compiles OK, then you have a v4l2-compliance tool that you can
>> use.
>>
> Yes, this method works. The test results of v4l2-compliance are below,
> I'm sorry the kernel has not upgraded to 4.0.
> root:/> ./v4l2-compliance -d 0

v4l2-compliance with -s option would interesting to watch.

Cheers,
--Prabhakar Lad
--
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 v4 00/17] media: blackfin: bfin_capture enhancements

2015-05-05 Thread Scott Jiang
2015-04-24 18:04 GMT+08:00 Hans Verkuil :
> On 04/10/2015 12:42 PM, Scott Jiang wrote:
>> Hi Hans,
>>

 Hans, I tried to use v4l2-compliance but it failed to compile. Sorry
 for telling you it have passed compilation because I forgot to use
 blackfin toolchain.
 ./configure --without-jpeg  --host=bfin-linux-uclibc --disable-libv4l

 The main problem is there is no argp.h in uClibc, how to disable checking 
 this?

 checking for argp.h... no
 configure: error: Cannot continue: argp.h not found

 Scott

>>>
>>> Hi Scott,
>>>
>>> Can you try this patch for v4l-utils? It makes argp optional, and it should
>>> allow v4l2-compliance to compile with uclibc (unless there are more 
>>> problems).
>>>
>>> I'm no autoconf guru, so I'm not certain if everything is correct, but it
>>> seemed to do its job when I remove argp.h from my system.
>>>
>>
>> Yes, I can pass configure now. But there is another error when make
>>
>> make[3]: Entering directory
>> `/home/scott/projects/git-kernel/v4l-utils/lib/libdvbv5'
>>   CC libdvbv5_la-parse_string.lo
>> parse_string.c:26:19: error: iconv.h: No such file or directory
>> parse_string.c: In function 'dvb_iconv_to_charset':
>> parse_string.c:316: error: 'iconv_t' undeclared (first use in this function)
>>
>> I tried to pass this library, while --without-libdvbv5 is not supported.
>>
>
> If you can pass the configure step, then you should be able to run this:
>
> cd utils/v4l2-compliance
> cat *.cpp >x.cpp
> g++ -o v4l2-compliance x.cpp -I . -I ../../include/ -DNO_LIBV4L2
>
> (you need to use the right toolchain here, of course)
>
> If this compiles OK, then you have a v4l2-compliance tool that you can
> use.
>
Yes, this method works. The test results of v4l2-compliance are below,
I'm sorry the kernel has not upgraded to 4.0.
root:/> ./v4l2-compliance -d 0
Driver Info:bfin_capture bfin_capture.0: =  START
STATUS  =

Driver name   : bfin_capture
Card type :bfin_capture bfin_capture.0: ==
 END STATUS  ==
 BF609
Bus info  : Blackfin Platform
Driver version: 3.17.0
Capabilities  : 0x0421
Video Capture
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
fail: x.cpp(306): missing bus_info prefix ('Blackfin Platform')
test VIDIOC_QUERYCAP: FAIL

Allow for multiple opens:
test second video open: OK
fail: x.cpp(306): missing bus_info prefix ('Blackfin Platform')
test VIDIOC_QUERYCAP: FAIL
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
fail: x.cpp(2944): subscribe event for control 'User
Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 3 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
fail: x.cpp(3405): pixelformat != V4L2_PIX_FMT_JPEG &&
colorspace == V4L2_COLORSPACE_JPEG
fail: x.cpp(3508): testColorspace(pix.pixelformat,
pix.colorspace, pix.ycbcr_enc, pix.quantization)
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing:

Re: [PATCH v4 00/17] media: blackfin: bfin_capture enhancements

2015-04-24 Thread Hans Verkuil
On 04/10/2015 12:42 PM, Scott Jiang wrote:
> Hi Hans,
> 
>>>
>>> Hans, I tried to use v4l2-compliance but it failed to compile. Sorry
>>> for telling you it have passed compilation because I forgot to use
>>> blackfin toolchain.
>>> ./configure --without-jpeg  --host=bfin-linux-uclibc --disable-libv4l
>>>
>>> The main problem is there is no argp.h in uClibc, how to disable checking 
>>> this?
>>>
>>> checking for argp.h... no
>>> configure: error: Cannot continue: argp.h not found
>>>
>>> Scott
>>>
>>
>> Hi Scott,
>>
>> Can you try this patch for v4l-utils? It makes argp optional, and it should
>> allow v4l2-compliance to compile with uclibc (unless there are more 
>> problems).
>>
>> I'm no autoconf guru, so I'm not certain if everything is correct, but it
>> seemed to do its job when I remove argp.h from my system.
>>
> 
> Yes, I can pass configure now. But there is another error when make
> 
> make[3]: Entering directory
> `/home/scott/projects/git-kernel/v4l-utils/lib/libdvbv5'
>   CC libdvbv5_la-parse_string.lo
> parse_string.c:26:19: error: iconv.h: No such file or directory
> parse_string.c: In function 'dvb_iconv_to_charset':
> parse_string.c:316: error: 'iconv_t' undeclared (first use in this function)
> 
> I tried to pass this library, while --without-libdvbv5 is not supported.
> 

If you can pass the configure step, then you should be able to run this:

cd utils/v4l2-compliance
cat *.cpp >x.cpp
g++ -o v4l2-compliance x.cpp -I . -I ../../include/ -DNO_LIBV4L2

(you need to use the right toolchain here, of course)

If this compiles OK, then you have a v4l2-compliance tool that you can
use.

Sorry for the delay in answering.

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 v4 00/17] media: blackfin: bfin_capture enhancements

2015-04-02 Thread Hans Verkuil
On 03/26/2015 10:18 AM, Scott Jiang wrote:
> Hi Lad and Hans,
> 
> 2015-03-08 22:40 GMT+08:00 Lad Prabhakar :
>> From: "Lad, Prabhakar" 
>>
>> This patch series, enhances blackfin capture driver with
>> vb2 helpers.
>>
>> Changes for v4:
>> 1: Improved commit message for path 4/17 and 5/17.
>> 2: Added Ack's from Scott to patches 1-15
>> 3: Two new patches 16/17 and 17/17
>>
>> Lad, Prabhakar (17):
>>   media: blackfin: bfin_capture: drop buf_init() callback
>>   media: blackfin: bfin_capture: release buffers in case
>> start_streaming() call back fails
>>   media: blackfin: bfin_capture: set min_buffers_needed
>>   media: blackfin: bfin_capture: set vb2 buffer field
>>   media: blackfin: bfin_capture: improve queue_setup() callback
>>   media: blackfin: bfin_capture: use vb2_fop_mmap/poll
>>   media: blackfin: bfin_capture: use v4l2_fh_open and vb2_fop_release
>>   media: blackfin: bfin_capture: use vb2_ioctl_* helpers
>>   media: blackfin: bfin_capture: make sure all buffers are returned on
>> stop_streaming() callback
>>   media: blackfin: bfin_capture: return -ENODATA for *std calls
>>   media: blackfin: bfin_capture: return -ENODATA for *dv_timings calls
>>   media: blackfin: bfin_capture: add support for vidioc_create_bufs
>>   media: blackfin: bfin_capture: add support for VB2_DMABUF
>>   media: blackfin: bfin_capture: add support for VIDIOC_EXPBUF
>>   media: blackfin: bfin_capture: set v4l2 buffer sequence
>>   media: blackfin: bfin_capture: drop bcap_get_unmapped_area()
>>   media: blackfin: bfin_capture: embed video_device struct in
>> bcap_device
>>
>>  drivers/media/platform/blackfin/bfin_capture.c | 348 
>> -
>>  1 file changed, 103 insertions(+), 245 deletions(-)
>>
> 
> for patch 16/17,
> Acked-by: Scott Jiang 
> Tested-by: Scott Jiang 
> 
> Hans, I tried to use v4l2-compliance but it failed to compile. Sorry
> for telling you it have passed compilation because I forgot to use
> blackfin toolchain.
> ./configure --without-jpeg  --host=bfin-linux-uclibc --disable-libv4l
> 
> The main problem is there is no argp.h in uClibc, how to disable checking 
> this?
> 
> checking for argp.h... no
> configure: error: Cannot continue: argp.h not found
> 
> Scott
> 

Hi Scott,

Can you try this patch for v4l-utils? It makes argp optional, and it should
allow v4l2-compliance to compile with uclibc (unless there are more problems).

I'm no autoconf guru, so I'm not certain if everything is correct, but it
seemed to do its job when I remove argp.h from my system.

Regards,

Hans

Signed-off-by: Hans Verkuil 

---
diff --git a/configure.ac b/configure.ac
index 330479c..0bf9154 100644
--- a/configure.ac
+++ b/configure.ac
@@ -253,14 +253,17 @@ dl_saved_libs=$LIBS
   AC_SUBST([DLOPEN_LIBS])
 LIBS=$dl_saved_libs
 
-AC_CHECK_HEADER([argp.h],,AC_MSG_ERROR(Cannot continue: argp.h not found))
+#AC_CHECK_HEADER([argp.h],,AC_MSG_ERROR(Cannot continue: argp.h not found))
+AC_CHECK_HEADER([argp.h], [argp=yes], [argp=no])
+AS_IF([test "x$argp" = "xyes"],
 argp_saved_libs=$LIBS
   AC_SEARCH_LIBS([argp_parse],
  [argp],
  [test "$ac_cv_search_argp_parse" = "none required" || 
ARGP_LIBS=$ac_cv_search_argp_parse],
  [AC_MSG_ERROR([unable to find the argp_parse() function])])
   AC_SUBST([ARGP_LIBS])
-LIBS=$argp_saved_libs
+LIBS=$argp_saved_libs)
+AM_CONDITIONAL([HAVE_ARGP], [test x$argp = xyes])
 
 AC_CHECK_HEADER([linux/i2c-dev.h], [linux_i2c_dev=yes], [linux_i2c_dev=no])
 AM_CONDITIONAL([HAVE_LINUX_I2C_DEV], [test x$linux_i2c_dev = xyes])
diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index 0bfa33e..f87ed3e 100644
--- a/contrib/test/Makefile.am
+++ b/contrib/test/Makefile.am
@@ -2,7 +2,6 @@ noinst_PROGRAMS = \
ioctl-test  \
sliced-vbi-test \
sliced-vbi-detect   \
-   v4l2grab\
driver-test \
stress-buffer   \
capture-example
@@ -11,9 +10,12 @@ if HAVE_X11
 noinst_PROGRAMS += pixfmt-test
 endif
 
+if HAVE_ARGP
+noinst_PROGRAMS += v4l2grab
 if HAVE_GLU
 noinst_PROGRAMS += v4l2gl
 endif
+endif
 
 driver_test_SOURCES = driver-test.c
 driver_test_LDADD = ../../utils/libv4l2util/libv4l2util.la
diff --git a/utils/decode_tm6000/Makefile.am b/utils/decode_tm6000/Makefile.am
index ac4e85e..845e35e 100644
--- a/utils/decode_tm6000/Makefile.am
+++ b/utils/decode_tm6000/Makefile.am
@@ -1,4 +1,6 @@
+if HAVE_ARGP
 bin_PROGRAMS = decode_tm6000
 decode_tm6000_SOURCES = decode_tm6000.c
 decode_tm6000_LDADD = ../libv4l2util/libv4l2util.la
 decode_tm6000_LDFLAGS = $(ARGP_LIBS)
+endif
diff --git a/utils/dvb/Makefile.am b/utils/dvb/Makefile.am
index 6aae408..32c9fb9 100644
--- a/utils/dvb/Makefile.am
+++ b/utils/dvb/Makefile.am
@@ -1,3 +1,4 @@
+if HAVE_ARGP
 bin_PROGRAMS = dvb-fe-tool dvbv5-zap dvbv5-scan dvb-format-convert
 man_MANS = dvb-fe-tool.1 dvbv5-zap.1 dvbv5-scan.1 dvb-format-convert.1
 
@@ -18,4 +19,4 @@ dvb_format_c

Re: [PATCH v4 00/17] media: blackfin: bfin_capture enhancements

2015-03-26 Thread Scott Jiang
Hi Lad and Hans,

2015-03-08 22:40 GMT+08:00 Lad Prabhakar :
> From: "Lad, Prabhakar" 
>
> This patch series, enhances blackfin capture driver with
> vb2 helpers.
>
> Changes for v4:
> 1: Improved commit message for path 4/17 and 5/17.
> 2: Added Ack's from Scott to patches 1-15
> 3: Two new patches 16/17 and 17/17
>
> Lad, Prabhakar (17):
>   media: blackfin: bfin_capture: drop buf_init() callback
>   media: blackfin: bfin_capture: release buffers in case
> start_streaming() call back fails
>   media: blackfin: bfin_capture: set min_buffers_needed
>   media: blackfin: bfin_capture: set vb2 buffer field
>   media: blackfin: bfin_capture: improve queue_setup() callback
>   media: blackfin: bfin_capture: use vb2_fop_mmap/poll
>   media: blackfin: bfin_capture: use v4l2_fh_open and vb2_fop_release
>   media: blackfin: bfin_capture: use vb2_ioctl_* helpers
>   media: blackfin: bfin_capture: make sure all buffers are returned on
> stop_streaming() callback
>   media: blackfin: bfin_capture: return -ENODATA for *std calls
>   media: blackfin: bfin_capture: return -ENODATA for *dv_timings calls
>   media: blackfin: bfin_capture: add support for vidioc_create_bufs
>   media: blackfin: bfin_capture: add support for VB2_DMABUF
>   media: blackfin: bfin_capture: add support for VIDIOC_EXPBUF
>   media: blackfin: bfin_capture: set v4l2 buffer sequence
>   media: blackfin: bfin_capture: drop bcap_get_unmapped_area()
>   media: blackfin: bfin_capture: embed video_device struct in
> bcap_device
>
>  drivers/media/platform/blackfin/bfin_capture.c | 348 
> -
>  1 file changed, 103 insertions(+), 245 deletions(-)
>

for patch 16/17,
Acked-by: Scott Jiang 
Tested-by: Scott Jiang 

Hans, I tried to use v4l2-compliance but it failed to compile. Sorry
for telling you it have passed compilation because I forgot to use
blackfin toolchain.
./configure --without-jpeg  --host=bfin-linux-uclibc --disable-libv4l

The main problem is there is no argp.h in uClibc, how to disable checking this?

checking for argp.h... no
configure: error: Cannot continue: argp.h not found

Scott
--
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


[PATCH v4 00/17] media: blackfin: bfin_capture enhancements

2015-03-08 Thread Lad Prabhakar
From: "Lad, Prabhakar" 

This patch series, enhances blackfin capture driver with
vb2 helpers.

Changes for v4:
1: Improved commit message for path 4/17 and 5/17.
2: Added Ack's from Scott to patches 1-15
3: Two new patches 16/17 and 17/17

Lad, Prabhakar (17):
  media: blackfin: bfin_capture: drop buf_init() callback
  media: blackfin: bfin_capture: release buffers in case
start_streaming() call back fails
  media: blackfin: bfin_capture: set min_buffers_needed
  media: blackfin: bfin_capture: set vb2 buffer field
  media: blackfin: bfin_capture: improve queue_setup() callback
  media: blackfin: bfin_capture: use vb2_fop_mmap/poll
  media: blackfin: bfin_capture: use v4l2_fh_open and vb2_fop_release
  media: blackfin: bfin_capture: use vb2_ioctl_* helpers
  media: blackfin: bfin_capture: make sure all buffers are returned on
stop_streaming() callback
  media: blackfin: bfin_capture: return -ENODATA for *std calls
  media: blackfin: bfin_capture: return -ENODATA for *dv_timings calls
  media: blackfin: bfin_capture: add support for vidioc_create_bufs
  media: blackfin: bfin_capture: add support for VB2_DMABUF
  media: blackfin: bfin_capture: add support for VIDIOC_EXPBUF
  media: blackfin: bfin_capture: set v4l2 buffer sequence
  media: blackfin: bfin_capture: drop bcap_get_unmapped_area()
  media: blackfin: bfin_capture: embed video_device struct in
bcap_device

 drivers/media/platform/blackfin/bfin_capture.c | 348 -
 1 file changed, 103 insertions(+), 245 deletions(-)

-- 
2.1.0

--
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