That's the 8th version of the MC next generation patches.
Differences from version 7:
- Patches reworked to make the reviewers happy;
- Bug fixes;
- ALSA changes got their own separate patches;
- Javier patches got integrated into this series;
- media-entity.h structs are now properly documented;
- Tested on both au0828 and omap3isp.
Due to the complexity of this change, other platform drivers may
require some fixes.
As the patch series sent before, this is not meant to be sent
upstream yet. Its goal is to merge it for Kernel 4.4, in order to
give people enough time to review and fix pending issues.
Regards,
Mauro
Javier Martinez Canillas (6):
[media] staging: omap4iss: get entity ID using media_entity_id()
[media] omap3isp: get entity ID using media_entity_id()
[media] media: use entity.graph_obj.mdev instead of .parent
[media] media: remove media entity .parent field
[media] omap3isp: separate links creation from entities init
[media] omap3isp: create links after all subdevs have been bound
Mauro Carvalho Chehab (49):
[media] media: create a macro to get entity ID
[media] media: add a common struct to be embed on media graph objects
[media] media: use media_gobj inside entities
[media] media: use media_gobj inside pads
[media] media: use media_gobj inside links
[media] media: add messages when media device gets (un)registered
[media] media: add a debug message to warn about gobj creation/removal
[media] media: rename the function that create pad links
[media] uapi/media.h: Declare interface types for V4L2 and DVB
[media] media: add functions to allow creating interfaces
[media] uapi/media.h: Declare interface types for ALSA
[media] media: Don't accept early-created links
[media] media: convert links from array to list
[media] media: make add link more generic
[media] media: make media_link more generic to handle interace links
[media] media: make link debug printk more generic
[media] media: add support to link interfaces and entities
[media] media-entity: add a helper function to create interface
[media] dvbdev: add support for interfaces
[media] media: add a linked list to track interfaces by mdev
[media] dvbdev: add support for indirect interface links
[media] uapi/media.h: Fix entity namespace
[media] replace all occurrences of MEDIA_ENT_T_DEVNODE_V4L
[media] replace all occurrences of MEDIA_ENT_T_DEVNODE_DVB
[media] media: add macros to check if subdev or V4L2 DMA
[media] media: use macros to check for V4L2 subdev entities
[media] omap3/omap4/davinci: get rid of MEDIA_ENT_T_V4L2_SUBDEV abuse
[media] s5c73m3: fix subdev type
[media] s5k5baf: fix subdev type
[media] davinci_vbpe: stop MEDIA_ENT_T_V4L2_SUBDEV abuse
[media] omap4iss: stop MEDIA_ENT_T_V4L2_SUBDEV abuse
[media] v4l2-subdev: use MEDIA_ENT_T_UNKNOWN for new subdevs
[media] media controller: get rid of entity subtype on Kernel
[media] media.h: don't use legacy entity macros at Kernel
[media] DocBook: update descriptions for the media controller entities
[media] dvb: modify core to implement interfaces/entities at MC new
gen
[media] media: report if a pad is sink or source at debug msg
[media] uapi/media.h: Add MEDIA_IOC_G_TOPOLOGY ioctl
[media] media: Use a macro to interate between all interfaces
[media] media: move mdev list init to gobj
[media] media-device: add pads and links to media_device
[media] media_device: add a topology version field
[media] media-device: add support for MEDIA_IOC_G_TOPOLOGY ioctl
[media] media-entity: unregister entity links
[media] remove interface links at media_entity_unregister()
[media] media-device: remove interfaces and interface links
[media] v4l2-core: create MC interfaces for devnodes
[media] au0828: unregister MC at the end
[media] media-entity.h: document all the structs
.../DocBook/media/v4l/media-ioc-enum-entities.xml | 57 +--
Documentation/media-framework.txt | 2 +-
drivers/media/dvb-core/dmxdev.c | 4 +-
drivers/media/dvb-core/dvb_ca_en50221.c | 2 +-
drivers/media/dvb-core/dvb_frontend.c | 11 +-
drivers/media/dvb-core/dvb_net.c | 2 +-
drivers/media/dvb-core/dvbdev.c | 278 +++++++++---
drivers/media/dvb-core/dvbdev.h | 10 +-
drivers/media/firewire/firedtv-ci.c | 2 +-
drivers/media/i2c/s5c73m3/s5c73m3-core.c | 8 +-
drivers/media/i2c/s5k5baf.c | 4 +-
drivers/media/i2c/smiapp/smiapp-core.c | 4 +-
drivers/media/media-device.c | 245 +++++++++--
drivers/media/media-entity.c | 473 +++++++++++++++++----
drivers/media/pci/bt8xx/dst_ca.c | 3 +-
drivers/media/pci/ddbridge/ddbridge-core.c | 2 +-
drivers/media/pci/ngene/ngene-core.c | 2 +-
drivers/media/pci/ttpci/av7110.c | 2 +-
drivers/media/pci/ttpci/av7110_av.c | 4 +-
drivers/media/pci/ttpci/av7110_ca.c | 2 +-
drivers/media/platform/exynos4-is/common.c | 3 +-
drivers/media/platform/exynos4-is/fimc-capture.c | 5 +-
drivers/media/platform/exynos4-is/fimc-isp-video.c | 9 +-
drivers/media/platform/exynos4-is/fimc-lite.c | 18 +-
drivers/media/platform/exynos4-is/media-dev.c | 25 +-
drivers/media/platform/exynos4-is/media-dev.h | 8 +-
drivers/media/platform/omap3isp/isp.c | 202 +++++----
drivers/media/platform/omap3isp/ispccdc.c | 39 +-
drivers/media/platform/omap3isp/ispccdc.h | 1 +
drivers/media/platform/omap3isp/ispccp2.c | 35 +-
drivers/media/platform/omap3isp/ispccp2.h | 1 +
drivers/media/platform/omap3isp/ispcsi2.c | 33 +-
drivers/media/platform/omap3isp/ispcsi2.h | 1 +
drivers/media/platform/omap3isp/isppreview.c | 48 ++-
drivers/media/platform/omap3isp/isppreview.h | 1 +
drivers/media/platform/omap3isp/ispresizer.c | 46 +-
drivers/media/platform/omap3isp/ispresizer.h | 1 +
drivers/media/platform/omap3isp/ispvideo.c | 17 +-
drivers/media/platform/s3c-camif/camif-capture.c | 2 +-
drivers/media/platform/s3c-camif/camif-core.c | 4 +-
drivers/media/platform/vsp1/vsp1_drv.c | 4 +-
drivers/media/platform/vsp1/vsp1_rpf.c | 2 +-
drivers/media/platform/vsp1/vsp1_video.c | 15 +-
drivers/media/platform/vsp1/vsp1_wpf.c | 2 +-
drivers/media/platform/xilinx/xilinx-dma.c | 10 +-
drivers/media/platform/xilinx/xilinx-vipp.c | 4 +-
drivers/media/usb/au0828/au0828-core.c | 18 +-
drivers/media/usb/au0828/au0828-video.c | 8 +-
drivers/media/usb/cx231xx/cx231xx-cards.c | 6 +-
drivers/media/usb/cx231xx/cx231xx-video.c | 8 +-
drivers/media/usb/uvc/uvc_entity.c | 2 +-
drivers/media/v4l2-core/v4l2-dev.c | 105 ++++-
drivers/media/v4l2-core/v4l2-device.c | 10 +-
drivers/media/v4l2-core/v4l2-subdev.c | 6 +-
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 9 +-
drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 15 +-
drivers/staging/media/davinci_vpfe/dm365_isif.c | 15 +-
drivers/staging/media/davinci_vpfe/dm365_resizer.c | 33 +-
.../staging/media/davinci_vpfe/vpfe_mc_capture.c | 10 +-
drivers/staging/media/davinci_vpfe/vpfe_video.c | 17 +-
drivers/staging/media/omap4iss/iss.c | 32 +-
drivers/staging/media/omap4iss/iss_csi2.c | 13 +-
drivers/staging/media/omap4iss/iss_ipipe.c | 9 +-
drivers/staging/media/omap4iss/iss_ipipeif.c | 15 +-
drivers/staging/media/omap4iss/iss_resizer.c | 13 +-
drivers/staging/media/omap4iss/iss_video.c | 9 +-
include/media/media-device.h | 34 +-
include/media/media-entity.h | 305 +++++++++++--
include/media/v4l2-dev.h | 1 +
include/uapi/linux/media.h | 205 ++++++++-
70 files changed, 1924 insertions(+), 627 deletions(-)
--
2.4.3
Put the legacy MEDIA_ENT_* macros under a #ifndef __KERNEL__,
in order to be sure that none of those old symbols are used
inside the Kernel.
Signed-off-by: Mauro Carvalho Chehab <redacted>
@@ -181,6 +181,8 @@ struct media_interface {*/structmedia_intf_devnode{structmedia_interfaceintf;++/* Should match the fields at media_v2_intf_devnode */u32major;u32minor;};
Now that interfaces got created, we need to fix the entity
namespace.
So, let's create a consistent new namespace and add backward
compatibility macros to keep the old namespace preserved.
Signed-off-by: Mauro Carvalho Chehab <redacted>
@@ -435,6 +435,12 @@ int __must_check media_device_register_entity(struct media_device *mdev,{inti;+if(entity->type==MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN||+entity->type==MEDIA_ENT_T_UNKNOWN)+dev_warn(mdev->dev,+"Entity type for entity %s was not initialized!\n",+entity->name);+/* Warn if we apparently re-register an entity */WARN_ON(entity->graph_obj.mdev!=NULL);entity->graph_obj.mdev=mdev;
Declare the interface types that will be used by the new
G_TOPOLOGY ioctl that will be defined latter on.
For now, we need those types, as they'll be used on the
internal structs associated with the new media_interface
graph object defined on the next patch.
Signed-off-by: Mauro Carvalho Chehab <redacted>
Acked-by: Hans Verkuil <redacted>
Em Sun, 30 Aug 2015 00:06:11 -0300
Mauro Carvalho Chehab [off-list ref] escreveu:
That's the 8th version of the MC next generation patches.
Differences from version 7:
- Patches reworked to make the reviewers happy;
- Bug fixes;
- ALSA changes got their own separate patches;
- Javier patches got integrated into this series;
- media-entity.h structs are now properly documented;
- Tested on both au0828 and omap3isp.
Due to the complexity of this change, other platform drivers may
require some fixes.
As the patch series sent before, this is not meant to be sent
upstream yet. Its goal is to merge it for Kernel 4.4, in order to
give people enough time to review and fix pending issues.
As on the previous series, the patches are available on my experimental
tree:
http://git.linuxtv.org/cgit.cgi/mchehab/experimental.git/log/?h=mc_next_gen
There's one additional patch there that removes the backlinks from G_TOPOLOGY
ioctl. I'll be posting it in separate at the ML.
I also added a new branch:
http://git.linuxtv.org/cgit.cgi/mchehab/experimental.git/log/?h=mc_next_gen_test
Based on the first one. It contains a hack for au0828 that exposes the tuner
also via subdev devnode, and reduces the number of output pads of the DVB
demux to just 5, as the default is too high to produce a .dot file that
would be useful. Of course, this patch should never leave my experimental
tree ;)
There are a few other from Javier there meant to allow testing the omap3isp
on my Beaglebone (that doesn't have any sensor on it) and on his omap3
devices.
I added support at the mc_nextgen_test tool to produce Graphviz .dot
files. It is still experimental, but it is good enough to already produce
some useful graphs. The newest version is at:
http://git.linuxtv.org/cgit.cgi/mchehab/experimental-v4l-utils.git/log/?h=mc-next-gen
I added some graphs produced by it at:
https://mchehab.fedorapeople.org/mc-next-gen/
Regards,
Mauro
From: Hans Verkuil <hidden> Date: 2015-08-31 11:18:06
On 08/30/2015 05:06 AM, Mauro Carvalho Chehab wrote:
quoted hunk
Now that interfaces got created, we need to fix the entity
namespace.
So, let's create a consistent new namespace and add backward
compatibility macros to keep the old namespace preserved.
Signed-off-by: Mauro Carvalho Chehab <redacted>
I would change this to 0x00000000, see follow-up comment later for why.
+#define MEDIA_ENT_T_V4L2_BASE 0x00010000
+#define MEDIA_ENT_T_V4L2_SUBDEV_BASE 0x00020000
+
+/*
+ * V4L2 entities - Those are used for DMA (mmap/DMABUF) and
+ * read()/write() data I/O associated with the V4L2 devnodes.
+ */
+#define MEDIA_ENT_T_V4L2_VIDEO (MEDIA_ENT_T_V4L2_BASE + 1)
+ /*
+ * Please notice that numbers between MEDIA_ENT_T_V4L2_BASE + 2 and
+ * MEDIA_ENT_T_V4L2_BASE + 4 can't be used, as those values used
+ * to be declared for FB, ALSA and DVB entities.
+ * As those values were never actually used in practice, we're just
+ * adding them as backward compatibility macros and keeping the
+ * numberspace clean here. This way, we avoid breaking compilation,
+ * in the case of having some userspace application using the old
+ * symbols.
+ */
+#define MEDIA_ENT_T_V4L2_VBI (MEDIA_ENT_T_V4L2_BASE + 5)
+ /* for TX radio, as RX is done via either ALSA or wire */
+#define MEDIA_ENT_T_V4L2_RADIO (MEDIA_ENT_T_V4L2_BASE + 6)
But TX is also done via either ALSA or wire. This shouldn't be needed.
How about MEDIA_ENT_T_DVB_IO_* and MEDIA_ENT_T_V4L2_IO_* to indicate that
this entity deals with data I/O?
Or, perhaps even better, MEDIA_ENT_T_IO_DVB_ and MEDIA_ENT_T_IO_V4L2_.
Entities should do something, and just saying 'V4L2_VIDEO' doesn't really convey
that meaning. It is also very easy to confuse with INTF_T_V4L_* types. BTW, we
should decide whether V4L2 or V4L is used here (interfaces now use V4L, entities
V4L2). Since entities already use V4L2, I think the interface defines should
use V4L2 as well.
+
+/* V4L2 Sub-device entities */
+#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 1)
+#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 2)
+#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 3)
+ /* A converter of analogue video to its digital representation. */
+#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 4)
+ /* Tuner entity is actually both V4L2 and DVB subdev */
+#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 5)
+
+/* DVB entities */
+#define MEDIA_ENT_T_DVB_DEMOD (MEDIA_ENT_T_DVB_BASE)
After changing DVB_BASE to 0, change this to DVB_BASE + 1, and adjust the other DVB
entity types accordingly.
This keeps the base defines consistent (i.e. the lower 16 bits are always 0).
It surprised me when reading this patch, so I'm probably not the only one.
Regards,
Hans
@@ -435,6 +435,12 @@ int __must_check media_device_register_entity(struct media_device *mdev,{inti;+if(entity->type==MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN||+entity->type==MEDIA_ENT_T_UNKNOWN)+dev_warn(mdev->dev,+"Entity type for entity %s was not initialized!\n",+entity->name);+/* Warn if we apparently re-register an entity */WARN_ON(entity->graph_obj.mdev!=NULL);entity->graph_obj.mdev=mdev;
From: Hans Verkuil <hidden> Date: 2015-08-31 11:45:17
On 08/30/2015 05:06 AM, Mauro Carvalho Chehab wrote:
Put the legacy MEDIA_ENT_* macros under a #ifndef __KERNEL__,
in order to be sure that none of those old symbols are used
inside the Kernel.
Signed-off-by: Mauro Carvalho Chehab <redacted>
@@ -181,6 +181,8 @@ struct media_interface {*/structmedia_intf_devnode{structmedia_interfaceintf;++/* Should match the fields at media_v2_intf_devnode */u32major;u32minor;};
@@ -251,11 +251,94 @@ struct media_links_enum {#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)-/* TBD: declare the structs needed for the new G_TOPOLOGY ioctl */+/*+*MCnextgenAPIdefinitions+*+*NOTE:ThedeclarationsbelowareclosetotheMCRFCfortheMedia+*Controller,thenextgeneration.Yet,thereareafewadjustments+*todo,aswewanttobeabletohaveafunctionalAPIbefore+*theMCpropertieschange.Thosewillbeproperlymarkedbelow.+*PleasealsonoticethatIremoved"num_pads","num_links",+*fromtheproposal,asaproperuserspaceapplicationwilllikely+*uselistsforpads/links,justasweintendtodoinKernelspace.
s/todo/to do/
+ * The API definition should be freed from fields that are bound to
+ * some specific data structure.
+ *
+ * FIXME: Currently, I opted to name the new types as "media_v2", as this
+ * won't cause any conflict with the Kernelspace namespace, nor with
+ * the previous kAPI media_*_desc namespace. This can be changed
+ * latter, before the adding this API upstream.
s/latter/later/ :-)
I think this comment belongs to the commit log and not in this header.
Shouldn't this be MEDIA_V2_ instead of MEDIA_NEW_?
Do we need the INTERFACE_LINK flag? You can deduce it by checking the
ID type.
I don't have a clear preference one way or another, just wondering about the
reason for adding it.
As mentioned before: use this instead to prevent horrible 32/64 bit arch
compat code:
struct {
__u32 reserved_num;
void *reserved_ptr;
} reserved_types[16];
__u32 reserved[8];
Sizes for these arrays are TBD.
Em Mon, 31 Aug 2015 13:17:08 +0200
Hans Verkuil [off-list ref] escreveu:
On 08/30/2015 05:06 AM, Mauro Carvalho Chehab wrote:
quoted
Now that interfaces got created, we need to fix the entity
namespace.
So, let's create a consistent new namespace and add backward
compatibility macros to keep the old namespace preserved.
Signed-off-by: Mauro Carvalho Chehab <redacted>
I would change this to 0x00000000, see follow-up comment later for why.
quoted
+#define MEDIA_ENT_T_V4L2_BASE 0x00010000
+#define MEDIA_ENT_T_V4L2_SUBDEV_BASE 0x00020000
+
+/*
+ * V4L2 entities - Those are used for DMA (mmap/DMABUF) and
+ * read()/write() data I/O associated with the V4L2 devnodes.
+ */
+#define MEDIA_ENT_T_V4L2_VIDEO (MEDIA_ENT_T_V4L2_BASE + 1)
+ /*
+ * Please notice that numbers between MEDIA_ENT_T_V4L2_BASE + 2 and
+ * MEDIA_ENT_T_V4L2_BASE + 4 can't be used, as those values used
+ * to be declared for FB, ALSA and DVB entities.
+ * As those values were never actually used in practice, we're just
+ * adding them as backward compatibility macros and keeping the
+ * numberspace clean here. This way, we avoid breaking compilation,
+ * in the case of having some userspace application using the old
+ * symbols.
+ */
+#define MEDIA_ENT_T_V4L2_VBI (MEDIA_ENT_T_V4L2_BASE + 5)
+ /* for TX radio, as RX is done via either ALSA or wire */
+#define MEDIA_ENT_T_V4L2_RADIO (MEDIA_ENT_T_V4L2_BASE + 6)
But TX is also done via either ALSA or wire. This shouldn't be needed.
How about MEDIA_ENT_T_DVB_IO_* and MEDIA_ENT_T_V4L2_IO_* to indicate that
this entity deals with data I/O?
Or, perhaps even better, MEDIA_ENT_T_IO_DVB_ and MEDIA_ENT_T_IO_V4L2_.
Works for me.
Entities should do something, and just saying 'V4L2_VIDEO' doesn't really convey
that meaning. It is also very easy to confuse with INTF_T_V4L_* types. BTW, we
should decide whether V4L2 or V4L is used here (interfaces now use V4L, entities
V4L2). Since entities already use V4L2, I think the interface defines should
use V4L2 as well.
Yes, agreed. We actually need to discuss a little more about
namespacing and do some additional renaming stuff.
For example, calling a tuner entity as MEDIA_ENT_T_V4L2_SUBDEV_TUNER
is wrong, because the tuner can be used only at the DVB side.
So, both V4L2 and SUBDEV prefixes there are wrong. Yet, this should be
under the V4L2_SUBDEV range to avoid breaking userspace.
quoted
+
+/* V4L2 Sub-device entities */
+#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 1)
+#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 2)
+#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 3)
+ /* A converter of analogue video to its digital representation. */
+#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 4)
+ /* Tuner entity is actually both V4L2 and DVB subdev */
+#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER (MEDIA_ENT_T_V4L2_SUBDEV_BASE + 5)
+
+/* DVB entities */
+#define MEDIA_ENT_T_DVB_DEMOD (MEDIA_ENT_T_DVB_BASE)
After changing DVB_BASE to 0, change this to DVB_BASE + 1, and adjust the other DVB
entity types accordingly.
This keeps the base defines consistent (i.e. the lower 16 bits are always 0).
It surprised me when reading this patch, so I'm probably not the only one.
This is another thing for discussion: keeping the MEDIA_ENT_T_foo_BASE
unused opens space for API abuse.
There are several entities at OMAP3 driver, for example, that keeps
entity->type undefined. So, they got whatever is the default at
v4l2-device.c (before this series: MEDIA_ENT_T_V4L2_SUBDEV, after
that: MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN):
$ media-ctl --print-t|grep -B1 Unknown
- entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
--
- entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
--
- entity 5: OMAP3 ISP CCDC (3 pads, 8 links)
type V4L2 subdev subtype Unknown flags 0
--
- entity 7: OMAP3 ISP preview (2 pads, 4 links)
type V4L2 subdev subtype Unknown flags 0
--
- entity 10: OMAP3 ISP resizer (2 pads, 4 links)
type V4L2 subdev subtype Unknown flags 0
--
- entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
--
- entity 14: OMAP3 ISP AF (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
--
- entity 15: OMAP3 ISP histogram (1 pad, 1 link)
type V4L2 subdev subtype Unknown flags 0
I guess all the above entities are processing units, so they
should have, instead, some type like:
MEDIA_ENT_T_V4L2_SUBDEV_PROCESSING
Or, even some of the above would actually deserves to have an specific
type, like:
MEDIA_ENT_T_V4L2_SUBDEV_HISTOGRAM
MEDIA_ENT_T_V4L2_SUBDEV_RESIZER
...
Let's try to find some time to discuss the entities namespace on IRC during
this week.
Regards,
Mauro
@@ -181,6 +181,8 @@ struct media_interface {*/structmedia_intf_devnode{structmedia_interfaceintf;++/* Should match the fields at media_v2_intf_devnode */u32major;u32minor;};
@@ -251,11 +251,94 @@ struct media_links_enum {#define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4)#define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5)-/* TBD: declare the structs needed for the new G_TOPOLOGY ioctl */+/*+*MCnextgenAPIdefinitions+*+*NOTE:ThedeclarationsbelowareclosetotheMCRFCfortheMedia+*Controller,thenextgeneration.Yet,thereareafewadjustments+*todo,aswewanttobeabletohaveafunctionalAPIbefore+*theMCpropertieschange.Thosewillbeproperlymarkedbelow.+*PleasealsonoticethatIremoved"num_pads","num_links",+*fromtheproposal,asaproperuserspaceapplicationwilllikely+*uselistsforpads/links,justasweintendtodoinKernelspace.
s/todo/to do/
quoted
+ * The API definition should be freed from fields that are bound to
+ * some specific data structure.
+ *
+ * FIXME: Currently, I opted to name the new types as "media_v2", as this
+ * won't cause any conflict with the Kernelspace namespace, nor with
+ * the previous kAPI media_*_desc namespace. This can be changed
+ * latter, before the adding this API upstream.
s/latter/later/ :-)
I think this comment belongs to the commit log and not in this header.
True, but I opted to keep it here for now to produce some discussions ;)
I'm actually in doubt if we should rename the flags as proposed below,
and use the newer flags only at G_TOPOLOGY or if we should keep the same
namespace for them and accept newer flags with legacy ioctls.
Like in media_link I would use a union here as well to be able to refer to
source/sink_id and entity/interface_id.
That would be overkill, and won't help.
Unions make the code harder to read and kernel-doc-nano doesn't like unions
very much.
Ok, there are some cases where it helps, but there's no good reason
for doing it here.
If you don't like the name, let's just rename it to something else.
As mentioned before: use this instead to prevent horrible 32/64 bit arch
compat code:
struct {
__u32 reserved_num;
void *reserved_ptr;
} reserved_types[16];
__u32 reserved[8];
Sizes for these arrays are TBD.
Regards,
Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Javier Martinez Canillas <javier@dowhile0.org> Date: 2015-09-10 14:19:39
On Sun, Aug 30, 2015 at 5:06 AM, Mauro Carvalho Chehab
[off-list ref] wrote:
Declare the interface types that will be used by the new
G_TOPOLOGY ioctl that will be defined latter on.
For now, we need those types, as they'll be used on the
internal structs associated with the new media_interface
graph object defined on the next patch.
Signed-off-by: Mauro Carvalho Chehab <redacted>
Acked-by: Hans Verkuil <redacted>
Reviewed-by: Javier Martinez Canillas <redacted>
Best regards,
Javier