aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-16 21:27:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-16 21:27:32 -0400
commitbace3db5da970c4d4f80a1ffa988ec66c7f6a8f5 (patch)
treeab893a29048a3a4ae91d7261a8f4946f3017eff1 /include
parent8759957b77ac1b5b5bdfac5ba049789107e85190 (diff)
parent8331c055b23c4155b896a2c3791704ae68992d2b (diff)
Merge tag 'media/v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Added support for some new video formats - mn88473 DVB frontend driver got promoted from staging - several improvements at the VSP1 driver - several cleanups and improvements at the Media Controller - added Media Controller support to snd-usb-audio. Currently, enabled only for au0828-based V4L2/DVB boards - Several improvements at nuvoton-cir: it now supports wake up codes - Add media controller support to em28xx and saa7134 drivers - coda driver now accepts NXP distributed firmware files - Some legacy SoC camera drivers will be moving to staging, as they're outdated and nobody so far is willing to fix and convert them to use the current media framework - As usual, lots of cleanups, improvements and new board additions. * tag 'media/v4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (381 commits) media: au0828 disable tuner to demod link in au0828_media_device_register() [media] touptek: cast char types on %x printk [media] touptek: don't DMA at the stack [media] mceusb: use %*ph for small buffer dumps [media] v4l: exynos4-is: Drop unneeded check when setting up fimc-lite links [media] v4l: vsp1: Check if an entity is a subdev with the right function [media] hide unused functions for !MEDIA_CONTROLLER [media] em28xx: fix Terratec Grabby AC97 codec detection [media] media: add prefixes to interface types [media] media: rc: nuvoton: switch attribute wakeup_data to text [media] v4l2-ioctl: fix YUV422P pixel format description [media] media: fix null pointer dereference in v4l_vb2q_enable_media_source() [media] v4l2-mc.h: fix yet more compiler errors [media] staging/media: add missing TODO files [media] media.h: always start with 1 for the audio entities [media] sound/usb: Use meaninful names for goto labels [media] v4l2-mc.h: fix compiler warnings [media] media: au0828 audio mixer isn't connected to decoder [media] sound/usb: Use Media Controller API to share media resources [media] dw2102: add support for TeVii S662 ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/media/tvp5150.h (renamed from include/media/i2c/tvp5150.h)8
-rw-r--r--include/media/media-device.h149
-rw-r--r--include/media/media-entity.h20
-rw-r--r--include/media/rc-core.h2
-rw-r--r--include/media/tuner.h9
-rw-r--r--include/media/v4l2-ctrls.h12
-rw-r--r--include/media/v4l2-dev.h1
-rw-r--r--include/media/v4l2-mc.h243
-rw-r--r--include/media/v4l2-subdev.h3
-rw-r--r--include/media/videobuf2-dvb.h5
-rw-r--r--include/media/vsp1.h33
-rw-r--r--include/uapi/linux/media.h45
-rw-r--r--include/uapi/linux/v4l2-common.h46
-rw-r--r--include/uapi/linux/v4l2-controls.h11
-rw-r--r--include/uapi/linux/videodev2.h7
15 files changed, 548 insertions, 46 deletions
diff --git a/include/media/i2c/tvp5150.h b/include/dt-bindings/media/tvp5150.h
index 649908a25605..c852a35e916e 100644
--- a/include/media/i2c/tvp5150.h
+++ b/include/dt-bindings/media/tvp5150.h
@@ -18,16 +18,18 @@
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/ 19*/
20 20
21#ifndef _TVP5150_H_ 21#ifndef _DT_BINDINGS_MEDIA_TVP5150_H
22#define _TVP5150_H_ 22#define _DT_BINDINGS_MEDIA_TVP5150_H
23 23
24/* TVP5150 HW inputs */ 24/* TVP5150 HW inputs */
25#define TVP5150_COMPOSITE0 0 25#define TVP5150_COMPOSITE0 0
26#define TVP5150_COMPOSITE1 1 26#define TVP5150_COMPOSITE1 1
27#define TVP5150_SVIDEO 2 27#define TVP5150_SVIDEO 2
28 28
29#define TVP5150_INPUT_NUM 3
30
29/* TVP5150 HW outputs */ 31/* TVP5150 HW outputs */
30#define TVP5150_NORMAL 0 32#define TVP5150_NORMAL 0
31#define TVP5150_BLACK_SCREEN 1 33#define TVP5150_BLACK_SCREEN 1
32 34
33#endif 35#endif /* _DT_BINDINGS_MEDIA_TVP5150_H */
diff --git a/include/media/media-device.h b/include/media/media-device.h
index d3855898c3fc..df74cfa7da4a 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -265,9 +265,29 @@ struct ida;
265struct device; 265struct device;
266 266
267/** 267/**
268 * struct media_entity_notify - Media Entity Notify
269 *
270 * @list: List head
271 * @notify_data: Input data to invoke the callback
272 * @notify: Callback function pointer
273 *
274 * Drivers may register a callback to take action when
275 * new entities get registered with the media device.
276 */
277struct media_entity_notify {
278 struct list_head list;
279 void *notify_data;
280 void (*notify)(struct media_entity *entity, void *notify_data);
281};
282
283/**
268 * struct media_device - Media device 284 * struct media_device - Media device
269 * @dev: Parent device 285 * @dev: Parent device
270 * @devnode: Media device node 286 * @devnode: Media device node
287 * @driver_name: Optional device driver name. If not set, calls to
288 * %MEDIA_IOC_DEVICE_INFO will return dev->driver->name.
289 * This is needed for USB drivers for example, as otherwise
290 * they'll all appear as if the driver name was "usb".
271 * @model: Device model name 291 * @model: Device model name
272 * @serial: Device serial number (optional) 292 * @serial: Device serial number (optional)
273 * @bus_info: Unique and stable device location identifier 293 * @bus_info: Unique and stable device location identifier
@@ -283,8 +303,16 @@ struct device;
283 * @interfaces: List of registered interfaces 303 * @interfaces: List of registered interfaces
284 * @pads: List of registered pads 304 * @pads: List of registered pads
285 * @links: List of registered links 305 * @links: List of registered links
306 * @entity_notify: List of registered entity_notify callbacks
286 * @lock: Entities list lock 307 * @lock: Entities list lock
287 * @graph_mutex: Entities graph operation lock 308 * @graph_mutex: Entities graph operation lock
309 * @pm_count_walk: Graph walk for power state walk. Access serialised using
310 * graph_mutex.
311 *
312 * @source_priv: Driver Private data for enable/disable source handlers
313 * @enable_source: Enable Source Handler function pointer
314 * @disable_source: Disable Source Handler function pointer
315 *
288 * @link_notify: Link state change notification callback 316 * @link_notify: Link state change notification callback
289 * 317 *
290 * This structure represents an abstract high-level media device. It allows easy 318 * This structure represents an abstract high-level media device. It allows easy
@@ -296,6 +324,26 @@ struct device;
296 * 324 *
297 * @model is a descriptive model name exported through sysfs. It doesn't have to 325 * @model is a descriptive model name exported through sysfs. It doesn't have to
298 * be unique. 326 * be unique.
327 *
328 * @enable_source is a handler to find source entity for the
329 * sink entity and activate the link between them if source
330 * entity is free. Drivers should call this handler before
331 * accessing the source.
332 *
333 * @disable_source is a handler to find source entity for the
334 * sink entity and deactivate the link between them. Drivers
335 * should call this handler to release the source.
336 *
337 * Note: Bridge driver is expected to implement and set the
338 * handler when media_device is registered or when
339 * bridge driver finds the media_device during probe.
340 * Bridge driver sets source_priv with information
341 * necessary to run enable/disable source handlers.
342 *
343 * Use-case: find tuner entity connected to the decoder
344 * entity and check if it is available, and activate the
345 * the link between them from enable_source and deactivate
346 * from disable_source.
299 */ 347 */
300struct media_device { 348struct media_device {
301 /* dev->driver_data points to this struct. */ 349 /* dev->driver_data points to this struct. */
@@ -303,6 +351,7 @@ struct media_device {
303 struct media_devnode devnode; 351 struct media_devnode devnode;
304 352
305 char model[32]; 353 char model[32];
354 char driver_name[32];
306 char serial[40]; 355 char serial[40];
307 char bus_info[32]; 356 char bus_info[32];
308 u32 hw_revision; 357 u32 hw_revision;
@@ -319,15 +368,28 @@ struct media_device {
319 struct list_head pads; 368 struct list_head pads;
320 struct list_head links; 369 struct list_head links;
321 370
371 /* notify callback list invoked when a new entity is registered */
372 struct list_head entity_notify;
373
322 /* Protects the graph objects creation/removal */ 374 /* Protects the graph objects creation/removal */
323 spinlock_t lock; 375 spinlock_t lock;
324 /* Serializes graph operations. */ 376 /* Serializes graph operations. */
325 struct mutex graph_mutex; 377 struct mutex graph_mutex;
378 struct media_entity_graph pm_count_walk;
379
380 void *source_priv;
381 int (*enable_source)(struct media_entity *entity,
382 struct media_pipeline *pipe);
383 void (*disable_source)(struct media_entity *entity);
326 384
327 int (*link_notify)(struct media_link *link, u32 flags, 385 int (*link_notify)(struct media_link *link, u32 flags,
328 unsigned int notification); 386 unsigned int notification);
329}; 387};
330 388
389/* We don't need to include pci.h or usb.h here */
390struct pci_dev;
391struct usb_device;
392
331#ifdef CONFIG_MEDIA_CONTROLLER 393#ifdef CONFIG_MEDIA_CONTROLLER
332 394
333/* Supported link_notify @notification values. */ 395/* Supported link_notify @notification values. */
@@ -498,6 +560,31 @@ int __must_check media_device_register_entity(struct media_device *mdev,
498void media_device_unregister_entity(struct media_entity *entity); 560void media_device_unregister_entity(struct media_entity *entity);
499 561
500/** 562/**
563 * media_device_register_entity_notify() - Registers a media entity_notify
564 * callback
565 *
566 * @mdev: The media device
567 * @nptr: The media_entity_notify
568 *
569 * Note: When a new entity is registered, all the registered
570 * media_entity_notify callbacks are invoked.
571 */
572
573int __must_check media_device_register_entity_notify(struct media_device *mdev,
574 struct media_entity_notify *nptr);
575
576/**
577 * media_device_unregister_entity_notify() - Unregister a media entity notify
578 * callback
579 *
580 * @mdev: The media device
581 * @nptr: The media_entity_notify
582 *
583 */
584void media_device_unregister_entity_notify(struct media_device *mdev,
585 struct media_entity_notify *nptr);
586
587/**
501 * media_device_get_devres() - get media device as device resource 588 * media_device_get_devres() - get media device as device resource
502 * creates if one doesn't exist 589 * creates if one doesn't exist
503 * 590 *
@@ -536,6 +623,39 @@ struct media_device *media_device_find_devres(struct device *dev);
536/* Iterate over all links. */ 623/* Iterate over all links. */
537#define media_device_for_each_link(link, mdev) \ 624#define media_device_for_each_link(link, mdev) \
538 list_for_each_entry(link, &(mdev)->links, graph_obj.list) 625 list_for_each_entry(link, &(mdev)->links, graph_obj.list)
626
627/**
628 * media_device_pci_init() - create and initialize a
629 * struct &media_device from a PCI device.
630 *
631 * @mdev: pointer to struct &media_device
632 * @pci_dev: pointer to struct pci_dev
633 * @name: media device name. If %NULL, the routine will use the default
634 * name for the pci device, given by pci_name() macro.
635 */
636void media_device_pci_init(struct media_device *mdev,
637 struct pci_dev *pci_dev,
638 const char *name);
639/**
640 * __media_device_usb_init() - create and initialize a
641 * struct &media_device from a PCI device.
642 *
643 * @mdev: pointer to struct &media_device
644 * @udev: pointer to struct usb_device
645 * @board_name: media device name. If %NULL, the routine will use the usb
646 * product name, if available.
647 * @driver_name: name of the driver. if %NULL, the routine will use the name
648 * given by udev->dev->driver->name, with is usually the wrong
649 * thing to do.
650 *
651 * NOTE: It is better to call media_device_usb_init() instead, as
652 * such macro fills driver_name with %KBUILD_MODNAME.
653 */
654void __media_device_usb_init(struct media_device *mdev,
655 struct usb_device *udev,
656 const char *board_name,
657 const char *driver_name);
658
539#else 659#else
540static inline int media_device_register(struct media_device *mdev) 660static inline int media_device_register(struct media_device *mdev)
541{ 661{
@@ -552,6 +672,17 @@ static inline int media_device_register_entity(struct media_device *mdev,
552static inline void media_device_unregister_entity(struct media_entity *entity) 672static inline void media_device_unregister_entity(struct media_entity *entity)
553{ 673{
554} 674}
675static inline int media_device_register_entity_notify(
676 struct media_device *mdev,
677 struct media_entity_notify *nptr)
678{
679 return 0;
680}
681static inline void media_device_unregister_entity_notify(
682 struct media_device *mdev,
683 struct media_entity_notify *nptr)
684{
685}
555static inline struct media_device *media_device_get_devres(struct device *dev) 686static inline struct media_device *media_device_get_devres(struct device *dev)
556{ 687{
557 return NULL; 688 return NULL;
@@ -560,5 +691,23 @@ static inline struct media_device *media_device_find_devres(struct device *dev)
560{ 691{
561 return NULL; 692 return NULL;
562} 693}
694
695static inline void media_device_pci_init(struct media_device *mdev,
696 struct pci_dev *pci_dev,
697 char *name)
698{
699}
700
701static inline void __media_device_usb_init(struct media_device *mdev,
702 struct usb_device *udev,
703 char *board_name,
704 char *driver_name)
705{
706}
707
563#endif /* CONFIG_MEDIA_CONTROLLER */ 708#endif /* CONFIG_MEDIA_CONTROLLER */
709
710#define media_device_usb_init(mdev, udev, name) \
711 __media_device_usb_init(mdev, udev, name, KBUILD_MODNAME)
712
564#endif 713#endif
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index fe485d367985..6dc9e4e8cbd4 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -24,6 +24,7 @@
24#define _MEDIA_ENTITY_H 24#define _MEDIA_ENTITY_H
25 25
26#include <linux/bitmap.h> 26#include <linux/bitmap.h>
27#include <linux/bug.h>
27#include <linux/kernel.h> 28#include <linux/kernel.h>
28#include <linux/list.h> 29#include <linux/list.h>
29#include <linux/media.h> 30#include <linux/media.h>
@@ -832,6 +833,16 @@ media_entity_graph_walk_next(struct media_entity_graph *graph);
832 */ 833 */
833__must_check int media_entity_pipeline_start(struct media_entity *entity, 834__must_check int media_entity_pipeline_start(struct media_entity *entity,
834 struct media_pipeline *pipe); 835 struct media_pipeline *pipe);
836/**
837 * __media_entity_pipeline_start - Mark a pipeline as streaming
838 *
839 * @entity: Starting entity
840 * @pipe: Media pipeline to be assigned to all entities in the pipeline.
841 *
842 * Note: This is the non-locking version of media_entity_pipeline_start()
843 */
844__must_check int __media_entity_pipeline_start(struct media_entity *entity,
845 struct media_pipeline *pipe);
835 846
836/** 847/**
837 * media_entity_pipeline_stop - Mark a pipeline as not streaming 848 * media_entity_pipeline_stop - Mark a pipeline as not streaming
@@ -848,6 +859,15 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
848void media_entity_pipeline_stop(struct media_entity *entity); 859void media_entity_pipeline_stop(struct media_entity *entity);
849 860
850/** 861/**
862 * __media_entity_pipeline_stop - Mark a pipeline as not streaming
863 *
864 * @entity: Starting entity
865 *
866 * Note: This is the non-locking version of media_entity_pipeline_stop()
867 */
868void __media_entity_pipeline_stop(struct media_entity *entity);
869
870/**
851 * media_devnode_create() - creates and initializes a device node interface 871 * media_devnode_create() - creates and initializes a device node interface
852 * 872 *
853 * @mdev: pointer to struct &media_device 873 * @mdev: pointer to struct &media_device
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index f6494709e230..0f77b3dffb37 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -60,6 +60,7 @@ enum rc_filter_type {
60/** 60/**
61 * struct rc_dev - represents a remote control device 61 * struct rc_dev - represents a remote control device
62 * @dev: driver model's view of this device 62 * @dev: driver model's view of this device
63 * @initialized: 1 if the device init has completed, 0 otherwise
63 * @sysfs_groups: sysfs attribute groups 64 * @sysfs_groups: sysfs attribute groups
64 * @input_name: name of the input child device 65 * @input_name: name of the input child device
65 * @input_phys: physical path to the input child device 66 * @input_phys: physical path to the input child device
@@ -121,6 +122,7 @@ enum rc_filter_type {
121 */ 122 */
122struct rc_dev { 123struct rc_dev {
123 struct device dev; 124 struct device dev;
125 atomic_t initialized;
124 const struct attribute_group *sysfs_groups[5]; 126 const struct attribute_group *sysfs_groups[5];
125 const char *input_name; 127 const char *input_name;
126 const char *input_phys; 128 const char *input_phys;
diff --git a/include/media/tuner.h b/include/media/tuner.h
index e5321fda5489..b3edc14e763f 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -20,14 +20,7 @@
20#ifdef __KERNEL__ 20#ifdef __KERNEL__
21 21
22#include <linux/videodev2.h> 22#include <linux/videodev2.h>
23 23#include <media/v4l2-mc.h>
24/* Tuner PADs */
25/* FIXME: is this the right place for it? */
26enum tuner_pad_index {
27 TUNER_PAD_RF_INPUT,
28 TUNER_PAD_IF_OUTPUT,
29 TUNER_NUM_PADS
30};
31 24
32#define ADDR_UNSET (255) 25#define ADDR_UNSET (255)
33 26
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index da6fe9802fee..0bc9b35b8f3e 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -535,18 +535,6 @@ struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl,
535 u32 id, u8 max, u8 def, const s64 *qmenu_int); 535 u32 id, u8 max, u8 def, const s64 *qmenu_int);
536 536
537/** 537/**
538 * v4l2_ctrl_add_ctrl() - Add a control from another handler to this handler.
539 * @hdl: The control handler.
540 * @ctrl: The control to add.
541 *
542 * It will return NULL if it was unable to add the control reference.
543 * If the control already belonged to the handler, then it will do
544 * nothing and just return @ctrl.
545 */
546struct v4l2_ctrl *v4l2_ctrl_add_ctrl(struct v4l2_ctrl_handler *hdl,
547 struct v4l2_ctrl *ctrl);
548
549/**
550 * v4l2_ctrl_add_handler() - Add all controls from handler @add to 538 * v4l2_ctrl_add_handler() - Add all controls from handler @add to
551 * handler @hdl. 539 * handler @hdl.
552 * @hdl: The control handler. 540 * @hdl: The control handler.
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index eeabf20e87a6..76056ab5c5bd 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -87,6 +87,7 @@ struct video_device
87#if defined(CONFIG_MEDIA_CONTROLLER) 87#if defined(CONFIG_MEDIA_CONTROLLER)
88 struct media_entity entity; 88 struct media_entity entity;
89 struct media_intf_devnode *intf_devnode; 89 struct media_intf_devnode *intf_devnode;
90 struct media_pipeline pipe;
90#endif 91#endif
91 /* device ops */ 92 /* device ops */
92 const struct v4l2_file_operations *fops; 93 const struct v4l2_file_operations *fops;
diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
new file mode 100644
index 000000000000..98a938aabdfb
--- /dev/null
+++ b/include/media/v4l2-mc.h
@@ -0,0 +1,243 @@
1/*
2 * v4l2-mc.h - Media Controller V4L2 types and prototypes
3 *
4 * Copyright (C) 2016 Mauro Carvalho Chehab <mchehab@osg.samsung.com>
5 * Copyright (C) 2006-2010 Nokia Corporation
6 * Copyright (c) 2016 Intel Corporation.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#ifndef _V4L2_MC_H
20#define _V4L2_MC_H
21
22#include <media/media-device.h>
23#include <media/v4l2-dev.h>
24#include <linux/types.h>
25
26/**
27 * enum tuner_pad_index - tuner pad index for MEDIA_ENT_F_TUNER
28 *
29 * @TUNER_PAD_RF_INPUT: Radiofrequency (RF) sink pad, usually linked to a
30 * RF connector entity.
31 * @TUNER_PAD_OUTPUT: Tuner video output source pad. Contains the video
32 * chrominance and luminance or the hole bandwidth
33 * of the signal converted to an Intermediate Frequency
34 * (IF) or to baseband (on zero-IF tuners).
35 * @TUNER_PAD_AUD_OUT: Tuner audio output source pad. Tuners used to decode
36 * analog TV signals have an extra pad for audio output.
37 * Old tuners use an analog stage with a saw filter for
38 * the audio IF frequency. The output of the pad is, in
39 * this case, the audio IF, with should be decoded either
40 * by the bridge chipset (that's the case of cx2388x
41 * chipsets) or may require an external IF sound
42 * processor, like msp34xx. On modern silicon tuners,
43 * the audio IF decoder is usually incorporated at the
44 * tuner. On such case, the output of this pad is an
45 * audio sampled data.
46 * @TUNER_NUM_PADS: Number of pads of the tuner.
47 */
48enum tuner_pad_index {
49 TUNER_PAD_RF_INPUT,
50 TUNER_PAD_OUTPUT,
51 TUNER_PAD_AUD_OUT,
52 TUNER_NUM_PADS
53};
54
55/**
56 * enum if_vid_dec_index - video IF-PLL pad index for
57 * MEDIA_ENT_F_IF_VID_DECODER
58 *
59 * @IF_VID_DEC_PAD_IF_INPUT: video Intermediate Frequency (IF) sink pad
60 * @IF_VID_DEC_PAD_OUT: IF-PLL video output source pad. Contains the
61 * video chrominance and luminance IF signals.
62 * @IF_VID_DEC_PAD_NUM_PADS: Number of pads of the video IF-PLL.
63 */
64enum if_vid_dec_pad_index {
65 IF_VID_DEC_PAD_IF_INPUT,
66 IF_VID_DEC_PAD_OUT,
67 IF_VID_DEC_PAD_NUM_PADS
68};
69
70/**
71 * enum if_aud_dec_index - audio/sound IF-PLL pad index for
72 * MEDIA_ENT_F_IF_AUD_DECODER
73 *
74 * @IF_AUD_DEC_PAD_IF_INPUT: audio Intermediate Frequency (IF) sink pad
75 * @IF_AUD_DEC_PAD_OUT: IF-PLL audio output source pad. Contains the
76 * audio sampled stream data, usually connected
77 * to the bridge bus via an Inter-IC Sound (I2S)
78 * bus.
79 * @IF_AUD_DEC_PAD_NUM_PADS: Number of pads of the audio IF-PLL.
80 */
81enum if_aud_dec_pad_index {
82 IF_AUD_DEC_PAD_IF_INPUT,
83 IF_AUD_DEC_PAD_OUT,
84 IF_AUD_DEC_PAD_NUM_PADS
85};
86
87/**
88 * enum demod_pad_index - analog TV pad index for MEDIA_ENT_F_ATV_DECODER
89 *
90 * @DEMOD_PAD_IF_INPUT: IF input sink pad.
91 * @DEMOD_PAD_VID_OUT: Video output source pad.
92 * @DEMOD_PAD_VBI_OUT: Vertical Blank Interface (VBI) output source pad.
93 * @DEMOD_PAD_AUDIO_OUT: Audio output source pad.
94 * @DEMOD_NUM_PADS: Maximum number of output pads.
95 */
96enum demod_pad_index {
97 DEMOD_PAD_IF_INPUT,
98 DEMOD_PAD_VID_OUT,
99 DEMOD_PAD_VBI_OUT,
100 DEMOD_PAD_AUDIO_OUT,
101 DEMOD_NUM_PADS
102};
103
104/* We don't need to include pci.h or usb.h here */
105struct pci_dev;
106struct usb_device;
107
108#ifdef CONFIG_MEDIA_CONTROLLER
109/**
110 * v4l2_mc_create_media_graph() - create Media Controller links at the graph.
111 *
112 * @mdev: pointer to the &media_device struct.
113 *
114 * Add links between the entities commonly found on PC customer's hardware at
115 * the V4L2 side: camera sensors, audio and video PLL-IF decoders, tuners,
116 * analog TV decoder and I/O entities (video, VBI and Software Defined Radio).
117 * NOTE: webcams are modelled on a very simple way: the sensor is
118 * connected directly to the I/O entity. All dirty details, like
119 * scaler and crop HW are hidden. While such mapping is enough for v4l2
120 * interface centric PC-consumer's hardware, V4L2 subdev centric camera
121 * hardware should not use this routine, as it will not build the right graph.
122 */
123int v4l2_mc_create_media_graph(struct media_device *mdev);
124
125/**
126 * v4l_enable_media_source() - Hold media source for exclusive use
127 * if free
128 *
129 * @vdev: pointer to struct video_device
130 *
131 * This interface calls enable_source handler to determine if
132 * media source is free for use. The enable_source handler is
133 * responsible for checking is the media source is free and
134 * start a pipeline between the media source and the media
135 * entity associated with the video device. This interface
136 * should be called from v4l2-core and dvb-core interfaces
137 * that change the source configuration.
138 *
139 * Return: returns zero on success or a negative error code.
140 */
141int v4l_enable_media_source(struct video_device *vdev);
142
143/**
144 * v4l_disable_media_source() - Release media source
145 *
146 * @vdev: pointer to struct video_device
147 *
148 * This interface calls disable_source handler to release
149 * the media source. The disable_source handler stops the
150 * active media pipeline between the media source and the
151 * media entity associated with the video device.
152 *
153 * Return: returns zero on success or a negative error code.
154 */
155void v4l_disable_media_source(struct video_device *vdev);
156
157/*
158 * v4l_vb2q_enable_media_tuner - Hold media source for exclusive use
159 * if free.
160 * @q - pointer to struct vb2_queue
161 *
162 * Wrapper for v4l_enable_media_source(). This function should
163 * be called from v4l2-core to enable the media source with
164 * pointer to struct vb2_queue as the input argument. Some
165 * v4l2-core interfaces don't have access to video device and
166 * this interface finds the struct video_device for the q and
167 * calls v4l_enable_media_source().
168 */
169int v4l_vb2q_enable_media_source(struct vb2_queue *q);
170
171
172/**
173 * v4l2_pipeline_pm_use - Update the use count of an entity
174 * @entity: The entity
175 * @use: Use (1) or stop using (0) the entity
176 *
177 * Update the use count of all entities in the pipeline and power entities on or
178 * off accordingly.
179 *
180 * This function is intended to be called in video node open (use ==
181 * 1) and release (use == 0). It uses struct media_entity.use_count to
182 * track the power status. The use of this function should be paired
183 * with v4l2_pipeline_link_notify().
184 *
185 * Return 0 on success or a negative error code on failure. Powering entities
186 * off is assumed to never fail. No failure can occur when the use parameter is
187 * set to 0.
188 */
189int v4l2_pipeline_pm_use(struct media_entity *entity, int use);
190
191
192/**
193 * v4l2_pipeline_link_notify - Link management notification callback
194 * @link: The link
195 * @flags: New link flags that will be applied
196 * @notification: The link's state change notification type (MEDIA_DEV_NOTIFY_*)
197 *
198 * React to link management on powered pipelines by updating the use count of
199 * all entities in the source and sink sides of the link. Entities are powered
200 * on or off accordingly. The use of this function should be paired
201 * with v4l2_pipeline_pm_use().
202 *
203 * Return 0 on success or a negative error code on failure. Powering entities
204 * off is assumed to never fail. This function will not fail for disconnection
205 * events.
206 */
207int v4l2_pipeline_link_notify(struct media_link *link, u32 flags,
208 unsigned int notification);
209
210#else /* CONFIG_MEDIA_CONTROLLER */
211
212static inline int v4l2_mc_create_media_graph(struct media_device *mdev)
213{
214 return 0;
215}
216
217static inline int v4l_enable_media_source(struct video_device *vdev)
218{
219 return 0;
220}
221
222static inline void v4l_disable_media_source(struct video_device *vdev)
223{
224}
225
226static inline int v4l_vb2q_enable_media_source(struct vb2_queue *q)
227{
228 return 0;
229}
230
231static inline int v4l2_pipeline_pm_use(struct media_entity *entity, int use)
232{
233 return 0;
234}
235
236static inline int v4l2_pipeline_link_notify(struct media_link *link, u32 flags,
237 unsigned int notification)
238{
239 return 0;
240}
241
242#endif /* CONFIG_MEDIA_CONTROLLER */
243#endif /* _V4L2_MC_H */
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index b273cf9ac047..11e2dfec0198 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -179,6 +179,8 @@ struct v4l2_subdev_io_pin_config {
179 * for it to be warned when the value of a control changes. 179 * for it to be warned when the value of a control changes.
180 * 180 *
181 * @unsubscribe_event: remove event subscription from the control framework. 181 * @unsubscribe_event: remove event subscription from the control framework.
182 *
183 * @registered_async: the subdevice has been registered async.
182 */ 184 */
183struct v4l2_subdev_core_ops { 185struct v4l2_subdev_core_ops {
184 int (*log_status)(struct v4l2_subdev *sd); 186 int (*log_status)(struct v4l2_subdev *sd);
@@ -211,6 +213,7 @@ struct v4l2_subdev_core_ops {
211 struct v4l2_event_subscription *sub); 213 struct v4l2_event_subscription *sub);
212 int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh, 214 int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh,
213 struct v4l2_event_subscription *sub); 215 struct v4l2_event_subscription *sub);
216 int (*registered_async)(struct v4l2_subdev *sd);
214}; 217};
215 218
216/** 219/**
diff --git a/include/media/videobuf2-dvb.h b/include/media/videobuf2-dvb.h
index 5b64c9eac2c9..87b559024b4a 100644
--- a/include/media/videobuf2-dvb.h
+++ b/include/media/videobuf2-dvb.h
@@ -8,6 +8,10 @@
8#include <dvb_frontend.h> 8#include <dvb_frontend.h>
9 9
10#include <media/videobuf2-v4l2.h> 10#include <media/videobuf2-v4l2.h>
11
12/* We don't actually need to include media-device.h here */
13struct media_device;
14
11/* 15/*
12 * TODO: This header file should be replaced with videobuf2-core.h 16 * TODO: This header file should be replaced with videobuf2-core.h
13 * Currently, vb2_thread is not a stuff of videobuf2-core, 17 * Currently, vb2_thread is not a stuff of videobuf2-core,
@@ -50,6 +54,7 @@ int vb2_dvb_register_bus(struct vb2_dvb_frontends *f,
50 struct module *module, 54 struct module *module,
51 void *adapter_priv, 55 void *adapter_priv,
52 struct device *device, 56 struct device *device,
57 struct media_device *mdev,
53 short *adapter_nr, 58 short *adapter_nr,
54 int mfe_shared); 59 int mfe_shared);
55 60
diff --git a/include/media/vsp1.h b/include/media/vsp1.h
new file mode 100644
index 000000000000..cc541753896f
--- /dev/null
+++ b/include/media/vsp1.h
@@ -0,0 +1,33 @@
1/*
2 * vsp1.h -- R-Car VSP1 API
3 *
4 * Copyright (C) 2015 Renesas Electronics Corporation
5 *
6 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13#ifndef __MEDIA_VSP1_H__
14#define __MEDIA_VSP1_H__
15
16#include <linux/types.h>
17
18struct device;
19struct v4l2_rect;
20
21int vsp1_du_init(struct device *dev);
22
23int vsp1_du_setup_lif(struct device *dev, unsigned int width,
24 unsigned int height);
25
26int vsp1_du_atomic_begin(struct device *dev);
27int vsp1_du_atomic_update(struct device *dev, unsigned int rpf, u32 pixelformat,
28 unsigned int pitch, dma_addr_t mem[2],
29 const struct v4l2_rect *src,
30 const struct v4l2_rect *dst);
31int vsp1_du_atomic_flush(struct device *dev);
32
33#endif /* __MEDIA_VSP1_H__ */
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index a8e3a8c0d85a..df59edee25d1 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -79,6 +79,22 @@ struct media_device_info {
79#define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) 79#define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003)
80 80
81/* 81/*
82 * Analog TV IF-PLL decoders
83 *
84 * It is a responsibility of the master/bridge drivers to create links
85 * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER.
86 */
87#define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001)
88#define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002)
89
90/*
91 * Audio Entity Functions
92 */
93#define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001)
94#define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002)
95#define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003)
96
97/*
82 * Connectors 98 * Connectors
83 */ 99 */
84/* It is a responsibility of the entity drivers to add connectors and links */ 100/* It is a responsibility of the entity drivers to add connectors and links */
@@ -113,8 +129,12 @@ struct media_device_info {
113#define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3) 129#define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3)
114#define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4) 130#define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4)
115/* 131/*
116 * It is a responsibility of the entity drivers to add connectors and links 132 * It is a responsibility of the master/bridge drivers to add connectors
117 * for the tuner entities. 133 * and links for MEDIA_ENT_F_TUNER. Please notice that some old tuners
134 * may require the usage of separate I2C chips to decode analog TV signals,
135 * when the master/bridge chipset doesn't have its own TV standard decoder.
136 * On such cases, the IF-PLL staging is mapped via one or two entities:
137 * MEDIA_ENT_F_IF_VID_DECODER and/or MEDIA_ENT_F_IF_AUD_DECODER.
118 */ 138 */
119#define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5) 139#define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5)
120 140
@@ -262,6 +282,7 @@ struct media_links_enum {
262 282
263#define MEDIA_INTF_T_DVB_BASE 0x00000100 283#define MEDIA_INTF_T_DVB_BASE 0x00000100
264#define MEDIA_INTF_T_V4L_BASE 0x00000200 284#define MEDIA_INTF_T_V4L_BASE 0x00000200
285#define MEDIA_INTF_T_ALSA_BASE 0x00000300
265 286
266/* Interface types */ 287/* Interface types */
267 288
@@ -277,6 +298,15 @@ struct media_links_enum {
277#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) 298#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)
278#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) 299#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
279 300
301#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
302#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
303#define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2)
304#define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3)
305#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)
306#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)
307#define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6)
308#define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7)
309
280/* 310/*
281 * MC next gen API definitions 311 * MC next gen API definitions
282 * 312 *
@@ -296,7 +326,7 @@ struct media_links_enum {
296 * later, before the adding this API upstream. 326 * later, before the adding this API upstream.
297 */ 327 */
298 328
299#if 0 /* Let's postpone it to Kernel 4.6 */ 329
300struct media_v2_entity { 330struct media_v2_entity {
301 __u32 id; 331 __u32 id;
302 char name[64]; /* FIXME: move to a property? (RFC says so) */ 332 char name[64]; /* FIXME: move to a property? (RFC says so) */
@@ -357,21 +387,12 @@ struct media_v2_topology {
357 __u64 ptr_links; 387 __u64 ptr_links;
358} __attribute__ ((packed)); 388} __attribute__ ((packed));
359 389
360static inline void __user *media_get_uptr(__u64 arg)
361{
362 return (void __user *)(uintptr_t)arg;
363}
364#endif
365
366/* ioctls */ 390/* ioctls */
367 391
368#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) 392#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
369#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) 393#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
370#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) 394#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
371#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) 395#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
372
373#if 0 /* Let's postpone it to Kernel 4.6 */
374#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) 396#define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
375#endif
376 397
377#endif /* __LINUX_MEDIA_H */ 398#endif /* __LINUX_MEDIA_H */
diff --git a/include/uapi/linux/v4l2-common.h b/include/uapi/linux/v4l2-common.h
index 15273987093e..5b3f685a2d50 100644
--- a/include/uapi/linux/v4l2-common.h
+++ b/include/uapi/linux/v4l2-common.h
@@ -10,19 +10,43 @@
10 * Copyright (C) 2012 Nokia Corporation 10 * Copyright (C) 2012 Nokia Corporation
11 * Contact: Sakari Ailus <sakari.ailus@iki.fi> 11 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
12 * 12 *
13 * This program is free software; you can redistribute it and/or 13 * This program is free software; you can redistribute it and/or modify
14 * modify it under the terms of the GNU General Public License 14 * it under the terms of the GNU General Public License as published by
15 * version 2 as published by the Free Software Foundation. 15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
16 * 17 *
17 * This program is distributed in the hope that it will be useful, but 18 * This program is distributed in the hope that it will be useful,
18 * WITHOUT ANY WARRANTY; without even the implied warranty of 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * General Public License for more details. 21 * GNU General Public License for more details.
21 * 22 *
22 * You should have received a copy of the GNU General Public License 23 * Alternatively you can redistribute this file under the terms of the
23 * along with this program; if not, write to the Free Software 24 * BSD license as stated below:
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 *
25 * 02110-1301 USA 26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions
28 * are met:
29 * 1. Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 * 2. Redistributions in binary form must reproduce the above copyright
32 * notice, this list of conditions and the following disclaimer in
33 * the documentation and/or other materials provided with the
34 * distribution.
35 * 3. The names of its contributors may not be used to endorse or promote
36 * products derived from this software without specific prior written
37 * permission.
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
40 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
41 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
42 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
45 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
46 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
47 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
48 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
49 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * 50 *
27 */ 51 */
28 52
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 2d225bcdb831..b6a357a5f053 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -390,6 +390,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
390#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226) 390#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)
391#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227) 391#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227)
392#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) 392#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)
393#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229)
393 394
394#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) 395#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
395#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) 396#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
@@ -912,8 +913,18 @@ enum v4l2_dv_rgb_range {
912 V4L2_DV_RGB_RANGE_FULL = 2, 913 V4L2_DV_RGB_RANGE_FULL = 2,
913}; 914};
914 915
916#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6)
917enum v4l2_dv_it_content_type {
918 V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0,
919 V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1,
920 V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2,
921 V4L2_DV_IT_CONTENT_TYPE_GAME = 3,
922 V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
923};
924
915#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) 925#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
916#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) 926#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
927#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
917 928
918#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900) 929#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
919#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1) 930#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 14cd5ebfee6d..e895975c5b0e 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -546,6 +546,10 @@ struct v4l2_pix_format {
546/* three non contiguous planes - Y, Cb, Cr */ 546/* three non contiguous planes - Y, Cb, Cr */
547#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ 547#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
548#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */ 548#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */
549#define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */
550#define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */
551#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */
552#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */
549 553
550/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ 554/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
551#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 555#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
@@ -621,6 +625,9 @@ struct v4l2_pix_format {
621#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ 625#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
622#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ 626#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
623#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ 627#define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
628#define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
629#define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
630#define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
624 631
625/* SDR formats - used only for Software Defined Radio devices */ 632/* SDR formats - used only for Software Defined Radio devices */
626#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ 633#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */