[PATCH v2] media: soc_camera: rcar_vin: Add r8a7794, r8a7793 device support

2014-10-17 Thread Yoshihiro Kaneko
From: Koji Matsuoka 

Signed-off-by: Koji Matsuoka 
Signed-off-by: Yoshihiro Kaneko 
Acked-by: Simon Horman 

---

This patch is against master branch of linuxtv.org/media_tree.git.

v2 [Yoshihiro Kaneko]
* Squashed r8a7793 and r8a7794 patches

 drivers/media/platform/soc_camera/rcar_vin.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/soc_camera/rcar_vin.c 
b/drivers/media/platform/soc_camera/rcar_vin.c
index 234cf86..4acae8f 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -1881,6 +1881,8 @@ MODULE_DEVICE_TABLE(of, rcar_vin_of_table);
 #endif
 
 static struct platform_device_id rcar_vin_id_table[] = {
+   { "r8a7794-vin",  RCAR_GEN2 },
+   { "r8a7793-vin",  RCAR_GEN2 },
{ "r8a7791-vin",  RCAR_GEN2 },
{ "r8a7790-vin",  RCAR_GEN2 },
{ "r8a7779-vin",  RCAR_H1 },
-- 
1.9.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


Re: GrabBee-HD

2014-10-17 Thread Dave Kimble

Thanks for your reply.
Your feeling that VB-WinXP would be the problem sent me back to that.
So I found that VB picking up USB 2.0 devices requires the Extension 
Pack installed with ehci controller enabled , and that cured that 
problem, and the device now finds it's XP driver.


The grabber software loads OK and asks for the signal information. Since 
the software goes with this particular device, I am surprised at this - 
it should know it already, shouldn't it?


Although the software's input is the device's output, it also seems to 
depend on the device's input, i.e. the HDMI stream.This stream comes via 
satellite dish and decoder box, and is picking up Freeview channels in 
Australia.


Almost all of the options produce the error: "Sigma Designs USB Device 
device does not active or error !" [sic]
The best combination of options produces a good picture, but it moves 
very slowly and after a few seconds freezes.

XP cannot then terminate the process, and neither can VB > Close.
So I have to VB > Reset
Then Ubuntu loses the device from lsusb and it needs too be unplugged 
and plugged in again, and VB-WinXP started again.


Any assistance would be welcome - as you can probably tell, I really 
don't know what I'm doing.


Dave

On 17/10/14 07:40, Steven Toth wrote:

Ok, no nobody jumped in the first time around. my turn I guess... :)

Comments below.

On Thu, Oct 16, 2014 at 5:18 PM, Dave Kimble  wrote:

I have just bought an HDMI to USB-2.0 grabber called "GrabBee-HD".
http://www.greada.com/grabbeex-hd.html
Motherboard photo:http://www.davekimble.org.au/computers/GrabBee-HD.jpg
Inside it has chips labelled "Sigma PL330B-CPE3" and "iTE IT6604E".
Note that it compresses the video with H.264 .

I've worked on drivers for those two chips in the past. I have a large
amount of experience with these parts.


I knew it probably wouldn't have drivers for Linux, but it does have Windows
drivers on CD,
so since I run Ubuntu-VirtualBox-WinXP I thought it might well work one way
or another.

Correct, no Linux drivers.


On Ubuntu 14.04, the USB device is picked up:
$ lsusb -v -d 0658:1100





but it is not recognised as a video capture device by VLC.
/dev/dvb/ , /dev/v4l/ , /dev/video0 do not exist.

Correct. Linux has no support for that device. :(


So I fired up VB-WinXP and installed the Windows drivers and software, and
restarted.
Then plugged in the device, which should connect the device to the driver,
but it didn't.

That's odd. It suggests an (off topic) windows related driver problem,
or a virtual machine issue.


Starting the Grabbee-HD software gives "No video capture device is
connected!"
Then I realised the USB device has to be passed through the VB interface,
VB-Manager > USB > Add > "no devices available".

So because Ubuntu doesn't properly recognise the device, it can't pass it on
to VB and XP.

I don't think the virtual machines work that way, at least not in my
experience. I've always been able to do what you want to do on various
platforms. Sorry, I can't really help you debug Windows / Virtual
machine issues.


Is there any chance of getting this going on Ubuntu 14.04 natively?

Unlikely. Sigma are generally GPL unfriendly.

I've done drivers for this chip on OSX before, mostly as a R&D
exercise, so I'm highly familiar with it. The chip is a monster to
write for, kinda nasty to be honest - not very straightforward.

I think you're out of luck.

- Steve



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


ERROR: "fb_alloc_cmap" [drivers/media/platform/vivid/vivid.ko] undefined!

2014-10-17 Thread kbuild test robot
Hi Hans,

First bad commit (maybe != root cause):

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0429fbc0bdc297d64188483ba029a23773ae07b0
commit: 5754d0d586a5d7c6a6fa43551f6e3b377c5f111d [media] vivid: add missing 
includes
date:   6 weeks ago
config: x86_64-randconfig-hsb1-10171526 (attached as .config)
reproduce:
  git checkout 5754d0d586a5d7c6a6fa43551f6e3b377c5f111d
  # save the attached .config to linux build tree
  make ARCH=x86_64 

All error/warnings:

   ERROR: "cfb_fillrect" [drivers/media/platform/vivid/vivid.ko] undefined!
   ERROR: "cfb_imageblit" [drivers/media/platform/vivid/vivid.ko] undefined!
>> ERROR: "fb_alloc_cmap" [drivers/media/platform/vivid/vivid.ko] undefined!
>> ERROR: "register_framebuffer" [drivers/media/platform/vivid/vivid.ko] 
>> undefined!
>> ERROR: "fb_dealloc_cmap" [drivers/media/platform/vivid/vivid.ko] undefined!
   ERROR: "cfb_copyarea" [drivers/media/platform/vivid/vivid.ko] undefined!
>> ERROR: "unregister_framebuffer" [drivers/media/platform/vivid/vivid.ko] 
>> undefined!

---
0-DAY kernel build testing backend  Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.17.0-rc1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ZONE_DMA32=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx 
-fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 
-fcall-saved-r11"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
# CONFIG_COMPILE_TEST is not set
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
CONFIG_KERNEL_LZ4=y
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
CONFIG_POSIX_MQUEUE=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_FHANDLE=y
# CONFIG_USELIB is not set
CONFIG_AUDIT=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_DEBUG=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ is not set
CONFIG_HIGH_RES_TIMERS=y

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_STALL_COMMON=y
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_FREEZER is not set
CONFIG_CGROUP_DEVICE=y
# CONFIG_CPUSETS is not set
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_RESOURCE_COUNTERS is not set
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
CONFIG_DEBUG_BLK_CGROUP=y
# CONFIG_CHECKPOINT_RESTORE is not se

Re: [PATCH v2] media: soc_camera: rcar_vin: Add r8a7794, r8a7793 device support

2014-10-17 Thread Laurent Pinchart
Hi Kaneko-san,

Thank you for the patch.

Could you please also update 
Documentation/devicetree/bindings/media/rcar_vin.txt with the new compatible 
strings ?

On Friday 17 October 2014 16:07:39 Yoshihiro Kaneko wrote:
> From: Koji Matsuoka 
> 
> Signed-off-by: Koji Matsuoka 
> Signed-off-by: Yoshihiro Kaneko 
> Acked-by: Simon Horman 
> 
> ---
> 
> This patch is against master branch of linuxtv.org/media_tree.git.
> 
> v2 [Yoshihiro Kaneko]
> * Squashed r8a7793 and r8a7794 patches
> 
>  drivers/media/platform/soc_camera/rcar_vin.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c
> b/drivers/media/platform/soc_camera/rcar_vin.c index 234cf86..4acae8f
> 100644
> --- a/drivers/media/platform/soc_camera/rcar_vin.c
> +++ b/drivers/media/platform/soc_camera/rcar_vin.c
> @@ -1881,6 +1881,8 @@ MODULE_DEVICE_TABLE(of, rcar_vin_of_table);
>  #endif
> 
>  static struct platform_device_id rcar_vin_id_table[] = {
> + { "r8a7794-vin",  RCAR_GEN2 },
> + { "r8a7793-vin",  RCAR_GEN2 },
>   { "r8a7791-vin",  RCAR_GEN2 },
>   { "r8a7790-vin",  RCAR_GEN2 },
>   { "r8a7779-vin",  RCAR_H1 },

-- 
Regards,

Laurent Pinchart

--
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: GrabBee-HD

2014-10-17 Thread Steven Toth
On Fri, Oct 17, 2014 at 3:29 AM, Dave Kimble  wrote:
> Thanks for your reply.
> Your feeling that VB-WinXP would be the problem sent me back to that.
> So I found that VB picking up USB 2.0 devices requires the Extension Pack
> installed with ehci controller enabled , and that cured that problem, and
> the device now finds it's XP driver.

Ahh good to know, thanks for the feedback. I generally don't use VB, I
go with VMWare on multiple platforms.

>
> The grabber software loads OK and asks for the signal information. Since the
> software goes with this particular device, I am surprised at this - it
> should know it already, shouldn't it?

Yes.

>
> Although the software's input is the device's output, it also seems to
> depend on the device's input, i.e. the HDMI stream.This stream comes via
> satellite dish and decoder box, and is picking up Freeview channels in
> Australia.
>
> Almost all of the options produce the error: "Sigma Designs USB Device
> device does not active or error !" [sic]
> The best combination of options produces a good picture, but it moves very
> slowly and after a few seconds freezes.
> XP cannot then terminate the process, and neither can VB > Close.
> So I have to VB > Reset
> Then Ubuntu loses the device from lsusb and it needs too be unplugged and
> plugged in again, and VB-WinXP started again.

Urgh.

>
> Any assistance would be welcome - as you can probably tell, I really don't
> know what I'm doing.

Probably best to validate the hardware and software on its intended
platform and check that everything functions properly. Who knows,
maybe you've got a buggy build or a flakey stick. You may be confusing
one set of problems for VB related when in fact they're something
else.

- Steve

>
> Dave
>
> On 17/10/14 07:40, Steven Toth wrote:
>>
>> Ok, no nobody jumped in the first time around. my turn I guess... :)
>>
>> Comments below.
>>
>> On Thu, Oct 16, 2014 at 5:18 PM, Dave Kimble
>> wrote:
>>>
>>> I have just bought an HDMI to USB-2.0 grabber called "GrabBee-HD".
>>> http://www.greada.com/grabbeex-hd.html
>>> Motherboard photo:http://www.davekimble.org.au/computers/GrabBee-HD.jpg
>>> Inside it has chips labelled "Sigma PL330B-CPE3" and "iTE IT6604E".
>>> Note that it compresses the video with H.264 .
>>
>> I've worked on drivers for those two chips in the past. I have a large
>> amount of experience with these parts.
>>
>>> I knew it probably wouldn't have drivers for Linux, but it does have
>>> Windows
>>> drivers on CD,
>>> so since I run Ubuntu-VirtualBox-WinXP I thought it might well work one
>>> way
>>> or another.
>>
>> Correct, no Linux drivers.
>>
>>> On Ubuntu 14.04, the USB device is picked up:
>>> $ lsusb -v -d 0658:1100
>>>
>> 
>>
>>> but it is not recognised as a video capture device by VLC.
>>> /dev/dvb/ , /dev/v4l/ , /dev/video0 do not exist.
>>
>> Correct. Linux has no support for that device. :(
>>
>>> So I fired up VB-WinXP and installed the Windows drivers and software,
>>> and
>>> restarted.
>>> Then plugged in the device, which should connect the device to the
>>> driver,
>>> but it didn't.
>>
>> That's odd. It suggests an (off topic) windows related driver problem,
>> or a virtual machine issue.
>>
>>> Starting the Grabbee-HD software gives "No video capture device is
>>> connected!"
>>> Then I realised the USB device has to be passed through the VB interface,
>>> VB-Manager > USB > Add > "no devices available".
>>>
>>> So because Ubuntu doesn't properly recognise the device, it can't pass it
>>> on
>>> to VB and XP.
>>
>> I don't think the virtual machines work that way, at least not in my
>> experience. I've always been able to do what you want to do on various
>> platforms. Sorry, I can't really help you debug Windows / Virtual
>> machine issues.
>>
>>> Is there any chance of getting this going on Ubuntu 14.04 natively?
>>
>> Unlikely. Sigma are generally GPL unfriendly.
>>
>> I've done drivers for this chip on OSX before, mostly as a R&D
>> exercise, so I'm highly familiar with it. The chip is a monster to
>> write for, kinda nasty to be honest - not very straightforward.
>>
>> I think you're out of luck.
>>
>> - Steve
>>
>



-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com
+1.646.355.8490
--
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 v2] media: soc_camera: rcar_vin: Add r8a7794, r8a7793 device support

2014-10-17 Thread Simon Horman
On Fri, Oct 17, 2014 at 11:01:07AM +0300, Laurent Pinchart wrote:
> Hi Kaneko-san,
> 
> Thank you for the patch.
> 
> Could you please also update 
> Documentation/devicetree/bindings/media/rcar_vin.txt with the new compatible 
> strings ?

Hi Laurent,

thanks for pointing that out. It is true that we want DT support for the
new SoCs for this driver and in that case updating the bindings
documentation would be necessary.  However, this patch adds platform device
support.

What I suggest is dropping this patch for now and working on
a replacement that adds DT support only. I do not believe there
are any plans to use a platform device in mainline for this driver on the
new SoCs.

> On Friday 17 October 2014 16:07:39 Yoshihiro Kaneko wrote:
> > From: Koji Matsuoka 
> > 
> > Signed-off-by: Koji Matsuoka 
> > Signed-off-by: Yoshihiro Kaneko 
> > Acked-by: Simon Horman 
> > 
> > ---
> > 
> > This patch is against master branch of linuxtv.org/media_tree.git.
> > 
> > v2 [Yoshihiro Kaneko]
> > * Squashed r8a7793 and r8a7794 patches
> > 
> >  drivers/media/platform/soc_camera/rcar_vin.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/media/platform/soc_camera/rcar_vin.c
> > b/drivers/media/platform/soc_camera/rcar_vin.c index 234cf86..4acae8f
> > 100644
> > --- a/drivers/media/platform/soc_camera/rcar_vin.c
> > +++ b/drivers/media/platform/soc_camera/rcar_vin.c
> > @@ -1881,6 +1881,8 @@ MODULE_DEVICE_TABLE(of, rcar_vin_of_table);
> >  #endif
> > 
> >  static struct platform_device_id rcar_vin_id_table[] = {
> > +   { "r8a7794-vin",  RCAR_GEN2 },
> > +   { "r8a7793-vin",  RCAR_GEN2 },
> > { "r8a7791-vin",  RCAR_GEN2 },
> > { "r8a7790-vin",  RCAR_GEN2 },
> > { "r8a7779-vin",  RCAR_H1 },
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.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


[PATCH/RFC v2 0/4] Libv4l: Add a plugin for the Exynos4 camera

2014-10-17 Thread Jacek Anaszewski
This is a second version of the patch series adding a plugin for the 
Exynos4 camera.


Changes from v1:


- removed redundant mbus code negotiation
- split the parser, media device helpers and ioctl wrappers
  to the separate modules
- added mechanism for querying extended controls
- applied various fixes and modifications

The plugin was tested on latest media-tree.git master with patches for
exynos4-is that fix failing open when a sensor sub-device is not
linked [1] [2] [3].

The plugin expects a configuration file:
/var/lib/libv4l/exynos4_capture_conf

Exemplary configuration file:

==

link {
source_entity: s5p-mipi-csis.0
source_pad: 1
sink_entity: FIMC.0
sink_pad: 0
}

v4l2-controls {
Color Effects: fimc.0.capture
Saturation: S5C73M3
Image Stabilization: S5C73M3
White Balance, Auto & Preset: S5C73M3
Exposure, Metering Mode: S5C73M3
}

==

With this settings the plugin can be tested on the exynos4412-trats2 board
using following gstreamer pipeline:

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=960,height=720 ! 
fbdevsink

In order to avoid fbdevsink element failure the fix [4]
for exynos-drm driver is required.

Thanks,
Jacek Anaszewski

[1] https://patchwork.linuxtv.org/patch/26366/
[2] https://patchwork.linuxtv.org/patch/26367/
[3] https://patchwork.linuxtv.org/patch/26368/
[4] http://www.spinics.net/lists/dri-devel/msg66494.html

Jacek Anaszewski (4):
  Add a media device configuration file parser.
  Add media device related data structures and API.
  Add wrappers for media device related ioctl calls.
  Add a libv4l plugin for Exynos4 camera

 configure.ac  |1 +
 lib/Makefile.am   |5 +-
 lib/include/libv4l2-mdev-ioctl.h  |   45 +
 lib/include/libv4l2-mdev.h|  195 +
 lib/include/libv4l2-media-conf-parser.h   |  148 
 lib/libv4l-exynos4-camera/Makefile.am |8 +
 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c |  569 
 lib/libv4l2/Makefile.am   |5 +-
 lib/libv4l2/libv4l2-mdev-ioctl.c  |  329 +++
 lib/libv4l2/libv4l2-mdev.c|  975 +
 lib/libv4l2/libv4l2-media-conf-parser.c   |  441 ++
 11 files changed, 2718 insertions(+), 3 deletions(-)
 create mode 100644 lib/include/libv4l2-mdev-ioctl.h
 create mode 100644 lib/include/libv4l2-mdev.h
 create mode 100644 lib/include/libv4l2-media-conf-parser.h
 create mode 100644 lib/libv4l-exynos4-camera/Makefile.am
 create mode 100644 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
 create mode 100644 lib/libv4l2/libv4l2-mdev-ioctl.c
 create mode 100644 lib/libv4l2/libv4l2-mdev.c
 create mode 100644 lib/libv4l2/libv4l2-media-conf-parser.c

-- 
1.7.9.5

--
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/RFC v2 1/4] Add a media device configuration file parser.

2014-10-17 Thread Jacek Anaszewski
This patch adds a parser for a media device configuration
file. The parser expects the configuration file containing
links end v4l2-controls definitions as described in the
header file being added. The links describe connections
between media entities and v4l2-controls define the target
sub-devices for particular user controls related ioctl calls.

Signed-off-by: Jacek Anaszewski 
Acked-by: Kyungmin Park 
Cc: Mauro Carvalho Chehab 
Cc: Hans Verkuil 
---
 lib/include/libv4l2-media-conf-parser.h |  148 +++
 lib/libv4l2/libv4l2-media-conf-parser.c |  441 +++
 2 files changed, 589 insertions(+)
 create mode 100644 lib/include/libv4l2-media-conf-parser.h
 create mode 100644 lib/libv4l2/libv4l2-media-conf-parser.c

diff --git a/lib/include/libv4l2-media-conf-parser.h 
b/lib/include/libv4l2-media-conf-parser.h
new file mode 100644
index 000..b2dba3a
--- /dev/null
+++ b/lib/include/libv4l2-media-conf-parser.h
@@ -0,0 +1,148 @@
+/*
+ * Parser of media device configuration file.
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski 
+ *
+ * The configuration file has to comply with following format:
+ *
+ * Link description entry format:
+ *
+ * link {
+ * source_entity: 
+ * source_pad: 
+ * sink_entity: 
+ * sink_pad: 
+ * }
+ *
+ * The V4L2 control group format:
+ *
+ * v4l2-controls {
+ * : 
+ * : 
+ * ...
+ * : 
+ * }
+ *
+ * Example:
+ *
+ * link {
+ * source_entity: s5p-mipi-csis.0
+ * source_pad: 1
+ * sink_entity: FIMC.0
+ * sink_pad: 0
+ * }
+ *
+ * v4l2-controls {
+ * Color Effects: S5C73M3
+ * Saturation: S5C73M3
+ * }
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#ifndef __LIBV4L_MEDIA_CONF_PARSER_H
+#define __LIBV4L_MEDIA_CONF_PARSER_H
+
+#include 
+
+#ifdef DEBUG
+#define V4L2_MDCFG_PARSER_DBG(format, ARG...)\
+   printf("[%s:%d] [%s] " format " \n", __FILE__, __LINE__, __func__, 
##ARG)
+#else
+#define V4L2_MDCFG_PARSER_DBG(format, ARG...)
+#endif
+
+#define V4L2_MDCFG_PARSER_ERR(format, ARG...)\
+   fprintf(stderr, "Libv4l device config parser: "format "\n", ##ARG)
+
+#define V4L2_MDCFG_PARSER_LOG(format, ARG...)\
+   fprintf(stdout, "Libv4l device config parser: "format "\n", ##ARG)
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+/*
+ * struct libv4l2_media_link_conf - media entity link configuration
+ * @source_entity: source entity of the link
+ * @source_pad:source pad id
+ * @sink_entity:   sink entity of the link
+ * @sink_pad:  sink pad id
+ * @next:  pointer to the next data structure in the list
+ */
+struct libv4l2_media_link_conf {
+   char *source_entity;
+   int source_pad;
+   char *sink_entity;
+   int sink_pad;
+   struct libv4l2_media_link_conf *next;
+};
+
+/*
+ * struct libv4l2_media_ctrl_conf - user control to media entity configuration
+ * @control_name:  user control name
+ * @entity_name:   media entity name
+ * @entity:media entity matched by entity_name
+ * @cid:   user control id
+ * @next:  pointer to the next data structure in the list
+ */
+struct libv4l2_media_ctrl_conf {
+   char *control_name;
+   char *entity_name;
+   struct media_entity *entity;
+   int cid;
+   struct libv4l2_media_ctrl_conf *next;
+};
+
+/*
+ * struct libv4l2_media_device_conf - media device config
+ * @links: media entity link config
+ * @controls:  user control to media entity config
+ */
+struct libv4l2_media_device_conf {
+   struct libv4l2_media_link_conf *links;
+   struct libv4l2_media_ctrl_conf *controls;
+};
+
+/*
+ * struct libv4l2_conf_parser_ctx - parser context
+ * @line_start_pos:start position of the current line in the file buffer
+ * @line_end:  end position of the current line in the file buffer
+ * @buf_pos:   file buffer position of the currently analyzed character
+ * @buf:   config file buffer
+ * @buf_size:  number of characters in the file buffer
+ */
+struct libv4l2_conf_parser_ctx {
+   int line_start_pos;
+   int line_end_pos;
+   int buf_pos;
+   char *buf;
+   int buf_size;
+};
+
+/*
+ * Read configuration file and initialize config argument with the parsed data.
+ * The config's links and controls fields must be released with use of
+ * libv4l2_media_conf_release_links and libv4l2_media_conf_release_con

[PATCH/RFC v2 3/4] Add wrappers for media device related ioctl calls.

2014-10-17 Thread Jacek Anaszewski
Some ioctl calls predestined for a media device have to
be separately executed on each sub-device of a pipeline
or redirected to the predefined one basing on the
configuration data. This patch adds wrappers that adjust
intercepted ioctl calls and execute them on every
required sub-device.

Signed-off-by: Jacek Anaszewski 
Acked-by: Kyungmin Park 
Cc: Mauro Carvalho Chehab 
Cc: Hans Verkuil 
---
 lib/include/libv4l2-mdev-ioctl.h |   45 ++
 lib/libv4l2/libv4l2-mdev-ioctl.c |  329 ++
 2 files changed, 374 insertions(+)
 create mode 100644 lib/include/libv4l2-mdev-ioctl.h
 create mode 100644 lib/libv4l2/libv4l2-mdev-ioctl.c

diff --git a/lib/include/libv4l2-mdev-ioctl.h b/lib/include/libv4l2-mdev-ioctl.h
new file mode 100644
index 000..10326be
--- /dev/null
+++ b/lib/include/libv4l2-mdev-ioctl.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#ifndef __LIBV4L2_MDEV_IOCTL_H
+#define __LIBV4L2_MDEV_IOCTL_H
+
+#include 
+#include 
+
+int mdev_ioctl_set_fmt(struct media_device *mdev,
+   struct v4l2_format *fmt);
+
+int mdev_ioctl_ctrl(struct media_device *mdev, int request,
+   struct v4l2_control *arg);
+
+int mdev_ioctl_ext_ctrl(struct media_device *mdev, int request,
+   struct v4l2_ext_controls *arg);
+
+int mdev_ioctl_single_ext_ctrl(struct media_device *mdev,
+   int request, struct v4l2_ext_controls *arg);
+
+int mdev_ioctl_queryctrl(struct media_device *mdev,
+   struct v4l2_queryctrl *arg);
+
+int mdev_ioctl_query_ext_ctrl(struct media_device *mdev,
+   struct v4l2_query_ext_ctrl *arg);
+
+int mdev_ioctl_querymenu(struct media_device *mdev,
+   struct v4l2_querymenu *arg);
+
+#endif /* __LIBV4L2_MDEV_IOCTL_H */
diff --git a/lib/libv4l2/libv4l2-mdev-ioctl.c b/lib/libv4l2/libv4l2-mdev-ioctl.c
new file mode 100644
index 000..0347f37
--- /dev/null
+++ b/lib/libv4l2/libv4l2-mdev-ioctl.c
@@ -0,0 +1,329 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+
+int mdev_ioctl_set_fmt(struct media_device *mdev,
+   struct v4l2_format *fmt)
+{
+   struct v4l2_subdev_format sd_fmt = { 0 };
+   struct media_entity *pipeline = mdev->pipeline;
+   int ret;
+
+   while (pipeline) {
+   sd_fmt = pipeline->subdev_fmt;
+   sd_fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
+   ret = SYS_IOCTL(pipeline->fd, VIDIOC_SUBDEV_S_FMT,
+   &sd_fmt);
+   if (ret < 0)
+   return ret;
+
+   pipeline = pipeline->next;
+
+   /* Last entity in the pipeline is not a sub-device */
+   if (pipeline->next == NULL)
+   break;
+   }
+
+   ret = SYS_IOCTL(pipeline->fd, VIDIOC_S_FMT, fmt);
+   if (ret < 0)
+   return ret;
+
+   return 0;
+}
+
+int mdev_ioctl_ctrl(struct media_device *mdev, int request,
+   struct v4l2_control *arg)
+{
+   struct media_entity *pipeline = mdev->pipeline, *entity;
+   struct v4l2_control ctrl = *arg;
+   struct v4l2_queryctrl queryctrl;
+   int ret = -EINVAL;
+
+   /*
+* The control has to be reset to the default value
+* on all of the pipeline entities, prior setting a new
+* value. This is required in cases when the control config
+* is changed between subsequent calls to VIDIOC_S_CTRL,
+* to avoid the situation when a control is set on more
+* than one sub-device.
+*/
+   if (request == VIDIOC_S_CTRL) {
+   while (pipeline) {
+

[PATCH/RFC v2 4/4] Add a libv4l plugin for Exynos4 camera

2014-10-17 Thread Jacek Anaszewski
The plugin provides support for the media device on Exynos4 SoC.
It performs single plane <-> multi plane API conversion,
video pipeline linking and takes care of automatic data format
negotiation for the whole pipeline, after intercepting
VIDIOC_S_FMT or VIDIOC_TRY_FMT ioctls.

Signed-off-by: Jacek Anaszewski 
Acked-by: Kyungmin Park 
Cc: Mauro Carvalho Chehab 
Cc: Hans Verkuil 
---
 configure.ac  |1 +
 lib/Makefile.am   |5 +-
 lib/libv4l-exynos4-camera/Makefile.am |8 +
 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c |  569 +
 lib/libv4l2/Makefile.am   |5 +-
 5 files changed, 585 insertions(+), 3 deletions(-)
 create mode 100644 lib/libv4l-exynos4-camera/Makefile.am
 create mode 100644 lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c

diff --git a/configure.ac b/configure.ac
index c9b0524..ae653b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,7 @@ AC_CONFIG_FILES([Makefile
lib/libdvbv5/Makefile
lib/libv4l2rds/Makefile
lib/libv4l-mplane/Makefile
+   lib/libv4l-exynos4-camera/Makefile
 
utils/Makefile
utils/libv4l2util/Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 3a0e19c..29455ab 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -3,9 +3,10 @@ SUBDIRS = \
libv4l2 \
libv4l1 \
libv4l2rds \
-   libv4l-mplane
+   libv4l-mplane \
+   libv4l-exynos4-camera
 
 if LINUX_OS
 SUBDIRS += \
libdvbv5
-endif
\ No newline at end of file
+endif
diff --git a/lib/libv4l-exynos4-camera/Makefile.am 
b/lib/libv4l-exynos4-camera/Makefile.am
new file mode 100644
index 000..a83c3f2
--- /dev/null
+++ b/lib/libv4l-exynos4-camera/Makefile.am
@@ -0,0 +1,8 @@
+if WITH_V4L_PLUGINS
+libv4l2plugin_LTLIBRARIES = libv4l-exynos4-camera.la
+endif
+
+libv4l_exynos4_camera_la_SOURCES = libv4l-exynos4-camera.c
+libv4l_exynos4_camera_la_CPPFLAGS = -fvisibility=hidden -std=gnu99
+libv4l_exynos4_camera_la_LDFLAGS = -avoid-version -module -shared 
-export-dynamic -lpthread
+libv4l_exynos4_camera_la_LIBADD = ../libv4l2/libv4l2-mdev.la
diff --git a/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c 
b/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
new file mode 100644
index 000..150c700
--- /dev/null
+++ b/lib/libv4l-exynos4-camera/libv4l-exynos4-camera.c
@@ -0,0 +1,569 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "libv4l-plugin.h"
+
+/*
+ * struct exynos4_camera_plugin - libv4l exynos4 camera plugin
+ * @mdev:  media device comprising the vid_fd related video device
+ */
+struct exynos4_camera_plugin {
+   struct media_device mdev;
+};
+
+#ifdef DEBUG
+#define V4L2_EXYNOS4_DBG(format, ARG...)\
+   printf("[%s:%d] [%s] " format " \n", __FILE__, __LINE__, __func__, 
##ARG)
+#else
+#define V4L2_EXYNOS4_DBG(format, ARG...)
+#endif
+
+#define V4L2_EXYNOS4_ERR(format, ARG...)\
+   fprintf(stderr, "Libv4l Exynos4 camera plugin: "format "\n", ##ARG)
+
+#define V4L2_EXYNOS4_LOG(format, ARG...)\
+   fprintf(stdout, "Libv4l Exynos4 camera plugin: "format "\n", ##ARG)
+
+#if HAVE_VISIBILITY
+#define PLUGIN_PUBLIC __attribute__ ((visibility("default")))
+#else
+#define PLUGIN_PUBLIC
+#endif
+
+#define SIMPLE_CONVERT_IOCTL(fd, cmd, arg, __struc) ({  \
+   int __ret;  \
+   struct __struc *req = arg;  \
+   uint32_t type = req->type;  \
+   req->type = convert_type(type); \
+   __ret = SYS_IOCTL(fd, cmd, arg);\
+   req->type = type;   \
+   __ret;  \
+   })
+
+#define EXYNOS4_FIMC_DRV   "exynos4-fimc"
+#define EXYNOS4_FIMC_LITE_DRV  "exynos-fimc-lit"
+#define EXYNOS4_FIMC_IS_ISP_DRV"exynos4-fimc-is"
+#define ENTITY_CAPTURE_SEGMENT "capture"
+#define EXYNOS4_CAPTURE_CONF   "/var/lib/libv4l/exynos4_capture_conf"
+#define EXYNOS4_FIMC_IS_ISP"FIMC-IS-ISP"
+#define EXYNOS4_FIMC_PREFIX"FIMC."
+#define MAX_FMT_NEGO_NUM   50
+
+
+static int __capture_entity(char *name)
+{
+   int cap_segment_pos;
+
+   if (name == NULL)
+  

[PATCH/RFC v2 2/4] Add media device related data structures and API.

2014-10-17 Thread Jacek Anaszewski
Add helpers for retrieving media device topology and manipulating
its configuration.

Signed-off-by: Jacek Anaszewski 
Acked-by: Kyungmin Park 
Cc: Mauro Carvalho Chehab 
Cc: Hans Verkuil 
---
 lib/include/libv4l2-mdev.h |  195 +
 lib/libv4l2/libv4l2-mdev.c |  975 
 2 files changed, 1170 insertions(+)
 create mode 100644 lib/include/libv4l2-mdev.h
 create mode 100644 lib/libv4l2/libv4l2-mdev.c

diff --git a/lib/include/libv4l2-mdev.h b/lib/include/libv4l2-mdev.h
new file mode 100644
index 000..cb28835
--- /dev/null
+++ b/lib/include/libv4l2-mdev.h
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *  http://www.samsung.com
+ *
+ * Author: Jacek Anaszewski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ */
+
+#ifndef __LIBV4L2_MDEV_H
+#define __LIBV4L2_MDEV_H
+
+#include 
+#include 
+#include 
+#include 
+
+#define SYS_IOCTL(fd, cmd, arg) \
+   syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
+
+#ifdef DEBUG
+#define V4L2_MDEV_DBG(format, ARG...)\
+printf("[%s:%d] [%s] " format " \n", __FILE__, __LINE__, __func__, 
##ARG)
+#else
+#define V4L2_MDEV_DBG(format, ARG...)
+#endif
+
+#define V4L2_MDEV_ERR(format, ARG...)\
+fprintf(stderr, "Libv4l media device: "format "\n", ##ARG)
+
+#define V4L2_MDEV_LOG(format, ARG...)\
+fprintf(stdout, "Libv4l media device: "format "\n", ##ARG)
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+/*
+ * struct media_entity - media device entity data
+ * @id:media entity id within media controller
+ * @name:  media entity name
+ * @node_name: media entity related device node name
+ * @pads:  array of media_entity pads
+ * @num_pads:  number of elements in the pads array
+ * @links: array of media_entity links
+ * @num_links: number of elements in the links array
+ * @subdev_fmt:related sub-device format
+ * @fd:related sub-device node file descriptor
+ * @src_pad_id:source pad id when entity is linked
+ * @sink_pad_id:   sink pad id when entity is linked
+ * @next:  pointer to the next data structure in the list
+ */
+struct media_entity {
+   int id;
+   char name[32];
+   char node_name[32];
+   struct media_pad_desc *pads;
+   int num_pads;
+   struct media_link_desc *links;
+   int num_links;
+   struct v4l2_subdev_format subdev_fmt;
+   int fd;
+   int src_pad_id;
+   int sink_pad_id;
+   struct media_entity *next;
+};
+
+/*
+ * struct media_device - media device comprising the opened video device
+ * @entities:  media entities comprised by a video device
+ * @num_entities:  number of media entities within a video device
+ * @pipeline:  pipeline of media entities from sensor to the video node
+ * @media_fd:  file descriptor of the media device this
+ * video device belongs to
+ * @config:media device configuration
+ * @vid_fd:file descriptor of the opened video device node
+ */
+struct media_device {
+   struct media_entity *entities;
+   int num_entities;
+   struct media_entity *pipeline;
+   int media_fd;
+   struct libv4l2_media_device_conf config;
+   int vid_fd;
+};
+
+int mdev_get_node_by_devnum(unsigned int major, unsigned int minor,
+   char *node_name);
+
+int mdev_get_node_by_fd(int fd, char *node_name);
+
+int mdev_enumerate_links(struct media_device *mdev);
+
+int mdev_release_entities(struct media_device *mdev);
+
+int mdev_get_device_topology(struct media_device *mdev);
+
+int mdev_has_device_node(struct media_device *mdev, char *entity_node,
+   char **entity_name);
+
+int mdev_get_media_node(struct media_device *mdev, int capture_fd,
+   char **entity_name);
+
+int mdev_get_pad_parent_name(struct media_device *mdev,
+   struct media_pad_desc *pad, char **parent_name);
+
+int mdev_entity_get_id_by_name(struct media_device *mdev, char *name, int *id);
+
+int mdev_has_link_pad(struct media_link_desc *link,
+   struct media_pad_desc *pad);
+
+int mdev_pad_busy(struct media_device *mdev, struct media_pad_desc *pad,
+   struct media_link_desc **link);
+
+int mdev_print_link_log(char *message, struct media_device *mdev,
+ 

Re: [RFC PATCH 09/11] videodev2.h: add v4l2_ctrl_selection compound control type.

2014-10-17 Thread Sakari Ailus
Hi Hans,

(Cc Ricardo.)

Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> This will be used by a new selection control.
> 
> Signed-off-by: Hans Verkuil 
> ---
>  include/media/v4l2-ctrls.h | 2 ++
>  include/uapi/linux/videodev2.h | 8 
>  2 files changed, 10 insertions(+)
> 
> diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
> index 3005d88..c2fd050 100644
> --- a/include/media/v4l2-ctrls.h
> +++ b/include/media/v4l2-ctrls.h
> @@ -46,6 +46,7 @@ struct poll_table_struct;
>   * @p_u16:   Pointer to a 16-bit unsigned value.
>   * @p_u32:   Pointer to a 32-bit unsigned value.
>   * @p_char:  Pointer to a string.
> + * @p_sel:   Pointer to a struct v4l2_ctrl_selection.
>   * @p:   Pointer to a compound value.
>   */
>  union v4l2_ctrl_ptr {
> @@ -55,6 +56,7 @@ union v4l2_ctrl_ptr {
>   u16 *p_u16;
>   u32 *p_u32;
>   char *p_char;
> + struct v4l2_ctrl_selection *p_sel;
>   void *p;
>  };

In order to be usable on sub-devices, pad information should be added.
That results in having a pad per rectangle, which probably doesn't make
sense. Also, other controls may benefit from being pad related.

What would you think of including the pad information in struct
v4l2_ext_control? That should be in a different patch. Would a flags
field be needed to tell whether the pad field is valid? 16 bits should
be good for both, but we anyway had just a single reserved field.

This would leave you with essentially a rectangle control, which you
still might want to call (or not) a selection control.

-- 
Kind regards,

Sakari Ailus
sakari.ai...@iki.fi

--
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: GrabBee-HD

2014-10-17 Thread Steven Toth
> So I think this is going to be a very poor toy.

Its the kind of thing I usually like to throw into my collection for
the long winter nights. If you can give me a url that I can purchase
this from then I may pick a unit for future tweakery.

- Steve

-- 
Steven Toth - Kernel Labs
http://www.kernellabs.com
--
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: GrabBee-HD

2014-10-17 Thread Dave Kimble
http://www.amazon.com/s/ref=nb_sb_noss_2/190-6601431-1833600?url=search-alias%3Daps&field-keywords=grabbee-hd 
$99.95

I got mine on eBay for $76 from Hong Kong.
Now going cheap :-)

Just thinking aloud:
My PCs are all mini-ITX in very small cases, so PCI card solutions are 
not suitable.

The decoder box is UEC DSD4121 using VAST (DVB-S2) with AV and HDMI outputs.
There's a UEC upgrade kit to use the USB port with an external HDD to 
record for $65.

Might try that next.
Other options?

Dave



On 18/10/14 08:34, Steven Toth wrote:

So I think this is going to be a very poor toy.

Its the kind of thing I usually like to throw into my collection for
the long winter nights. If you can give me a url that I can purchase
this from then I may pick a unit for future tweakery.

- Steve



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

2014-10-17 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:   Sat Oct 18 04:00:15 CEST 2014
git branch: test
git hash:   cf3167cf1e969b17671a4d3d956d22718a8ceb85
gcc version:i686-linux-gcc (GCC) 4.9.1
sparse version: v0.5.0-20-g7abd8a7
host hardware:  x86_64
host os:3.17-0.slh.1-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.32.27-i686: WARNINGS
linux-2.6.33.7-i686: WARNINGS
linux-2.6.34.7-i686: WARNINGS
linux-2.6.35.9-i686: WARNINGS
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: WARNINGS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: WARNINGS
linux-3.1.10-i686: WARNINGS
linux-3.2.37-i686: WARNINGS
linux-3.3.8-i686: WARNINGS
linux-3.4.27-i686: WARNINGS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: OK
linux-3.11.1-i686: WARNINGS
linux-3.12.23-i686: WARNINGS
linux-3.13.11-i686: WARNINGS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: OK
linux-3.16-i686: OK
linux-3.17-i686: OK
linux-2.6.32.27-x86_64: WARNINGS
linux-2.6.33.7-x86_64: WARNINGS
linux-2.6.34.7-x86_64: WARNINGS
linux-2.6.35.9-x86_64: WARNINGS
linux-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: WARNINGS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: WARNINGS
linux-3.1.10-x86_64: WARNINGS
linux-3.2.37-x86_64: WARNINGS
linux-3.3.8-x86_64: WARNINGS
linux-3.4.27-x86_64: WARNINGS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: WARNINGS
linux-3.12.23-x86_64: WARNINGS
linux-3.13.11-x86_64: WARNINGS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16-x86_64: WARNINGS
linux-3.17-x86_64: WARNINGS
apps: OK
spec-git: OK
sparse: WARNINGS

Detailed results are available here:

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

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.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