Hi, Laurent Pinchart wrote: ... > diff --git a/include/linux/media.h b/include/linux/media.h > new file mode 100644 > index 0000000..746bdda > --- /dev/null > +++ b/include/linux/media.h > @@ -0,0 +1,73 @@ > +#ifndef __LINUX_MEDIA_H > +#define __LINUX_MEDIA_H > + > +#define MEDIA_ENTITY_TYPE_NODE 1 > +#define MEDIA_ENTITY_TYPE_SUBDEV 2 > + > +#define MEDIA_ENTITY_SUBTYPE_NODE_V4L 1 > +#define MEDIA_ENTITY_SUBTYPE_NODE_FB 2 > +#define MEDIA_ENTITY_SUBTYPE_NODE_ALSA 3 > +#define MEDIA_ENTITY_SUBTYPE_NODE_DVB 4 > + > +#define MEDIA_ENTITY_SUBTYPE_SUBDEV_VID_DECODER 1 > +#define MEDIA_ENTITY_SUBTYPE_SUBDEV_VID_ENCODER 2 > +#define MEDIA_ENTITY_SUBTYPE_SUBDEV_MISC 3 > + > +#define MEDIA_PAD_DIR_INPUT 1 > +#define MEDIA_PAD_DIR_OUTPUT 2 > + > +#define MEDIA_LINK_FLAG_ACTIVE (1 << 0) > +#define MEDIA_LINK_FLAG_IMMUTABLE (1 << 1) > + > +#define MEDIA_ENTITY_ID_FLAG_NEXT (1 << 31) > + > +struct media_user_pad { > + __u32 entity; /* entity ID */ > + __u8 index; /* pad index */ > + __u32 direction; /* pad direction */ > +}; Another small comment, I think you mentioned it yourself some time back :-): how about some reserved fields to these structures? > +struct media_user_entity { > + __u32 id; > + char name[32]; > + __u32 type; > + __u32 subtype; > + __u8 pads; > + __u32 links; > + > + union { > + /* Node specifications */ > + struct { > + __u32 major; > + __u32 minor; > + } v4l; > + struct { > + __u32 major; > + __u32 minor; > + } fb; > + int alsa; > + int dvb; > + > + /* Sub-device specifications */ > + /* Nothing needed yet */ > + }; > +}; > + > +struct media_user_link { > + struct media_user_pad source; > + struct media_user_pad sink; > + __u32 flags; > +}; > + > +struct media_user_links { > + __u32 entity; > + /* Should have enough room for pads elements */ > + struct media_user_pad __user *pads; > + /* Should have enough room for links elements */ > + struct media_user_link __user *links; > +}; Cheers, -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html