struct media_device — Media device
struct media_device { struct device * dev; struct media_devnode devnode; char model[32]; char serial[40]; char bus_info[32]; u32 hw_revision; u32 driver_version; u32 topology_version; u32 id; struct ida entity_internal_idx; int entity_internal_idx_max; struct list_head entities; struct list_head interfaces; struct list_head pads; struct list_head links; spinlock_t lock; struct mutex graph_mutex; int (* link_notify) (struct media_link *link, u32 flags,unsigned int notification); };
Parent device
Media device node
Device model name
Device serial number (optional)
Unique and stable device location identifier
Hardware device revision
Device driver version
Monotonic counter for storing the version of the graph topology. Should be incremented each time the topology changes.
Unique ID used on the last registered graph object
Unique internal entity ID used by the graph traversal algorithms
Allocated internal entity indices
List of registered entities
List of registered interfaces
List of registered pads
List of registered links
Entities list lock
Entities graph operation lock
Link state change notification callback
This structure represents an abstract high-level media device. It allows easy access to entities and provides basic media device-level support. The structure can be allocated directly or embedded in a larger structure.
The parent dev
is a physical device. It must be set before registering the
media device.
model
is a descriptive model name exported through sysfs. It doesn't have to
be unique.