media_create_intf_link(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

media_create_intf_link β€” creates a link between an entity and an interface. That’s the whole assignment, bestie: one entity, one interface, one link situation. ✨


πŸŽ€ SYNOPSIS πŸŽ€

Here’s the exact signature, no cap:

struct media_link * media_create_intf_link (struct media_entity *entity
, struct media_interface *intf , u32 flags );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • entity β€” pointer to media_entity.
  • intf β€” pointer to media_interface.
  • flags β€” Link flags, as defined in include/uapi/linux/media.h (the <media_header> reference; seek for MEDIA_LNK_FL_*).

πŸ’œ DESCRIPTION πŸ’œ

Okay so the valid values for flags are giving very specific main-character energy:

  • MEDIA_LNK_FL_ENABLED β€” Indicates that the interface is connected to the entity hardware. That’s the default value for interfaces. An interface may be disabled if the hardware is busy due to the usage of some other interface that it is currently controlling the hardware.

A typical example is a hybrid TV device that handles only one type of stream at a given time. So, when the digital TV is streaming, the V4L2 interfaces won’t be enabled, as such device is not able to also stream analog TV or radio. Like, it’s booked and busy with one stream, so the other interfaces don’t get to shine. 😭

⚠️ NOTE: Before calling this function, media_devnode_create should be called for the interface and media_device_register_entity should be called for the interface that will be part of the link. Do the prep first, bestie β€” don’t skip steps. 🫢

πŸ’… SEE ALSO πŸ’…

Kernel file ./include/media/media-entity.h is in the mix, and then there’s this giant friend group: enum media_gobj_type(9), struct media_gobj(9), struct media_entity_enum(9), struct media_graph(9), struct media_pipeline(9), struct media_pipeline_pad(9), struct media_pipeline_pad_iter(9), struct media_pipeline_entity_iter(9), struct media_link(9), enum media_pad_signal_type(9), struct media_pad(9), struct media_entity_operations(9), enum media_entity_type(9), struct media_entity(9), media_entity_for_each_pad(9), struct media_interface(9), struct media_intf_devnode(9), media_entity_id(9), media_type(9), media_id(9), media_gobj_gen_id(9), is_media_entity_v4l2_video_device(9), is_media_entity_v4l2_subdev(9), media_entity_enum_init(9), media_entity_enum_cleanup(9), media_entity_enum_zero(9), media_entity_enum_set(9), media_entity_enum_clear(9), media_entity_enum_test(9), media_entity_enum_test_and_set(9), media_entity_enum_empty(9), media_entity_enum_intersects(9), gobj_to_entity(9), gobj_to_pad(9), gobj_to_link(9), gobj_to_intf(9), intf_to_devnode(9), media_gobj_create(9), media_gobj_destroy(9), media_entity_pads_init(9), media_entity_cleanup(9), media_get_pad_index(9), media_create_pad_link(9), media_create_pad_links(9), media_entity_remove_links(9), __media_entity_setup_link(9), media_entity_setup_link(9), media_entity_find_link(9), media_pad_remote_pad_first(9), media_pad_remote_pad_unique(9), media_entity_remote_pad_unique(9), media_entity_remote_source_pad_unique(9), media_pad_is_streaming(9), media_entity_is_streaming(9), media_entity_pipeline(9), media_pad_pipeline(9), media_entity_get_fwnode_pad(9), media_graph_walk_init(9), media_graph_walk_cleanup(9), media_graph_walk_start(9), media_graph_walk_next(9), media_pipeline_start(9), __media_pipeline_start(9), media_pipeline_stop(9), __media_pipeline_stop(9), media_pipeline_for_each_pad(9), media_pipeline_entity_iter_init(9), media_pipeline_entity_iter_cleanup(9), media_pipeline_for_each_entity(9), media_pipeline_alloc_start(9), media_devnode_create(9), media_devnode_remove(9), __media_remove_intf_link(9), media_remove_intf_link(9), __media_remove_intf_links(9), media_remove_intf_links(9), media_entity_call(9), media_create_ancillary_link(9), __media_entity_next_link(9), for_each_media_entity_data_link(9).


That’s the whole page, bestie 🫢 β€” source/version is ./include/media, and the date on it is October 2026 πŸ’–βœ¨

πŸ“¦ where this page comes from