ioctl MEDIA_IOC_ENUM_ENTITIES
&manvol;
MEDIA_IOC_ENUM_ENTITIESEnumerate entities and their propertiesint ioctlint fdint requeststruct media_entity_desc *argpArgumentsfdFile descriptor returned by
open().requestMEDIA_IOC_ENUM_ENTITIESargpDescriptionTo query the attributes of an entity, applications set the id field
of a &media-entity-desc; structure and call the MEDIA_IOC_ENUM_ENTITIES
ioctl with a pointer to this structure. The driver fills the rest of the
structure or returns an &EINVAL; when the id is invalid.Entities can be enumerated by or'ing the id with the
MEDIA_ENT_ID_FLAG_NEXT flag. The driver will return
information about the entity with the smallest id strictly larger than the
requested one ('next entity'), or the &EINVAL; if there is none.Entity IDs can be non-contiguous. Applications must
not try to enumerate entities by calling
MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.Two or more entities that share a common non-zero
group_id value are considered as logically
grouped. Groups are used to report
ALSA, VBI and video nodes that carry the same media
streamlens and flash controllers associated with a sensor
struct media_entity_desc__u32idEntity id, set by the application. When the id is or'ed with
MEDIA_ENT_ID_FLAG_NEXT, the driver clears the
flag and returns the first entity with a larger id.charname[32]Entity name as an UTF-8 NULL-terminated string.__u32typeEntity type, see for details.__u32revisionEntity revision in a driver/hardware specific format.__u32flagsEntity flags, see for details.__u32group_idEntity group ID__u16padsNumber of pads__u16linksTotal number of outbound links. Inbound links are not counted
in this field.unionstructv4lValid for V4L sub-devices and nodes only.__u32majorV4L device node major number. For V4L sub-devices with no
device node, set by the driver to 0.__u32minorV4L device node minor number. For V4L sub-devices with no
device node, set by the driver to 0.structfbValid for frame buffer nodes only.__u32majorFrame buffer device node major number.__u32minorFrame buffer device node minor number.structalsaValid for ALSA devices only.__u32cardALSA card number__u32deviceALSA device number__u32subdeviceALSA sub-device numberintdvbDVB card number__u8raw[180]
Media entity typesMEDIA_ENT_T_DEVNODEUnknown device nodeMEDIA_ENT_T_DEVNODE_V4LV4L video, radio or vbi device nodeMEDIA_ENT_T_DEVNODE_FBFrame buffer device nodeMEDIA_ENT_T_DEVNODE_ALSAALSA cardMEDIA_ENT_T_DEVNODE_DVBDVB cardMEDIA_ENT_T_V4L2_SUBDEVUnknown V4L sub-deviceMEDIA_ENT_T_V4L2_SUBDEV_SENSORVideo sensorMEDIA_ENT_T_V4L2_SUBDEV_FLASHFlash controllerMEDIA_ENT_T_V4L2_SUBDEV_LENSLens controllerMEDIA_ENT_T_V4L2_SUBDEV_DECODERVideo decoder, the basic function of the video decoder is to
accept analogue video from a wide variety of sources such as
broadcast, DVD players, cameras and video cassette recorders, in
either NTSC, PAL or HD format and still occasionally SECAM, separate
it into its component parts, luminance and chrominance, and output
it in some digital video standard, with appropriate embedded timing
signals.
Media entity flagsMEDIA_ENT_FL_DEFAULTDefault entity for its type. Used to discover the default
audio, VBI and video devices, the default camera sensor, ...
&return-value;
EINVALThe &media-entity-desc; id references
a non-existing entity.