On 03/26/2015 10:18 AM, Scott Jiang wrote:
> Hi Lad and Hans,
>
> 2015-03-08 22:40 GMT+08:00 Lad Prabhakar <[email protected]>:
>> From: "Lad, Prabhakar" <[email protected]>
>>
>> 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 <[email protected]>
> Tested-by: Scott Jiang <[email protected]>
>
> 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 <[email protected]>
---
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_convert_LDADD = ../../lib/libdvbv5/libdvbv5.la
dvb_format_convert_LDFLAGS = $(ARGP_LIBS) -lm
EXTRA_DIST = README
-
+endif
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
index f6a0773..1238e4b 100644
--- a/utils/keytable/Makefile.am
+++ b/utils/keytable/Makefile.am
@@ -1,3 +1,4 @@
+if HAVE_ARGP
bin_PROGRAMS = ir-keytable
man_MANS = ir-keytable.1
sysconf_DATA = rc_maps.cfg
@@ -12,6 +13,7 @@ EXTRA_DIST = 70-infrared.rules rc_keymaps gen_keytables.pl ir-keytable.1 rc_maps
# custom target
install-data-local:
$(install_sh) -d "$(DESTDIR)$(keytableuserdir)"
+endif
sync-with-kernel:
@if [ ! -f $(KERNEL_DIR)/usr/include/linux/input.h ]; then \
diff --git a/utils/v4l2-sysfs-path/Makefile.am b/utils/v4l2-sysfs-path/Makefile.am
index 6ef4228..e72e439 100644
--- a/utils/v4l2-sysfs-path/Makefile.am
+++ b/utils/v4l2-sysfs-path/Makefile.am
@@ -1,4 +1,6 @@
+if HAVE_ARGP
bin_PROGRAMS = v4l2-sysfs-path
v4l2_sysfs_path_SOURCES = v4l2-sysfs-path.c
v4l2_sysfs_path_LDADD = ../libmedia_dev/libmedia_dev.la
v4l2_sysfs_path_LDFLAGS = $(ARGP_LIBS)
+endif
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.
Scott
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
2015-04-24 18:04 GMT+08:00 Hans Verkuil <[email protected]>:
> 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 : 0x04200001
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: OK (Not Supported)
test Scaling: OK
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
fail: x.cpp(1436): q.has_expbuf(node)
test VIDIOC_EXPBUF: FAIL
Total: 42, Succeeded: 37, Failed: 5, Warnings: 0
Hi Scott,
On Tue, May 5, 2015 at 10:58 AM, Scott Jiang
<[email protected]> wrote:
> 2015-04-24 18:04 GMT+08:00 Hans Verkuil <[email protected]>:
>> 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