The Linux Kernel
  • Linux Kernel Documentation
    • Introduction
    • Sphinx Build
    • Writing Documentation
    • Including kernel-doc comments
    • Writing kernel-doc comments
    • DocBook XML [DEPRECATED]
  • Linux Media Infrastructure userspace API
    • Introduction
    • Part I - Video for Linux API
    • Part II - Digital TV API
    • Part III - Remote Controller API
    • Part IV - Media Controller API
    • Part V - Consumer Electronics Control API
    • Generic Error Codes
    • GNU Free Documentation License
  • Media subsystem kernel internal API
    • 1. Video2Linux devices
    • 2. Digital TV (DVB) devices
    • 3. Digital TV Common functions
    • 4. Digital TV Frontend kABI
    • 5. Digital TV Demux kABI
    • 6. Demux Callback API
    • 7. Digital TV Conditional Access kABI
    • 8. Remote Controller devices
    • 9. Media Controller devices
  • Linux Digital TV driver-specific documentation
    • 1. Introdution
    • 2. HOWTO: Get An Avermedia DVB-T working under Linux
    • 3. How to get the bt8xx cards working
    • 4. Hardware supported by the linuxtv.org DVB drivers
    • 5. Digital TV Conditional Access Interface (CI API)
    • 6. Idea behind the dvb-usb-framework
    • 7. FAQ
    • 8. Firmware files for lmedm04 cards
    • 9. Opera firmware
    • 10. How to set up the Technisat/B2C2 Flexcop devices
    • 11. TechnoTrend/Hauppauge DEC USB Driver
    • 12. UDEV rules for DVB
    • 13. Contributors
  • Video4Linux (V4L) driver-specific documentation
    • 1. Guidelines for Linux4Linux pixel format 4CCs
    • 2. Infrared remote control support in video4linux drivers
    • 3. Using with lircd
    • 4. Using without lircd
    • 5. Tuner drivers
    • 6. Cards List
    • 7. The bttv driver
    • 8. The cafe_ccic driver
    • 9. The cpia2 driver
    • 10. The cx18 driver
    • 11. The cx2341x driver
    • 12. The cx88 driver
    • 13. The VPBE V4L2 driver design
    • 14. The Samsung S5P/EXYNOS4 FIMC driver
    • 15. The ivtv driver
    • 16. Vaio Picturebook Motion Eye Camera Driver
    • 17. OMAP 3 Image Signal Processor (ISP) driver
    • 18. OMAP4 ISS Driver
    • 19. The pvrusb2 driver
    • 20. PXA-Camera Host Driver
    • 21. The Radiotrack radio driver
    • 22. The saa7134 driver
    • 23. Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver
    • 24. The Silicon Labs Si470x FM Radio Receivers driver
    • 25. The Silicon Labs Si4713 FM Radio Transmitter Driver
    • 26. The SI476x Driver
    • 27. The Soc-Camera Drivers
    • 28. The Linux USB Video Class (UVC) driver
    • 29. The Virtual Video Test Driver (vivid)
    • 30. The Zoran driver
    • 31. Zoran 364xx based USB webcam module
  • Linux GPU Driver Developer’s Guide
    • Introduction
    • DRM Internals
    • DRM Memory Management
    • Kernel Mode Setting (KMS)
    • Mode Setting Helper Functions
    • Userland interfaces
    • drm/i915 Intel GFX Driver
    • VGA Switcheroo
 
The Linux Kernel
  • Docs »
  • Linux Media Infrastructure userspace API »
  • Part IV - Media Controller API »
  • 4. Function Reference »
  • 4.8. ioctl MEDIA_IOC_SETUP_LINK
  • View page source

4.8. ioctl MEDIA_IOC_SETUP_LINK¶

4.8.1. Name¶

MEDIA_IOC_SETUP_LINK - Modify the properties of a link

4.8.2. Synopsis¶

int ioctl(int fd, int request, struct media_link_desc* argp)¶

4.8.3. Arguments¶

fd
File descriptor returned by open().
request
MEDIA_IOC_SETUP_LINK

argp

4.8.4. Description¶

To change link properties applications fill a struct media_link_desc with link identification information (source and sink pad) and the new requested link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to that structure.

The only configurable property is the ENABLED link flag to enable/disable a link. Links marked with the IMMUTABLE link flag can not be enabled or disabled.

Link configuration has no side effect on other links. If an enabled link at the sink pad prevents the link from being enabled, the driver returns with an EBUSY error code.

Only links marked with the DYNAMIC link flag can be enabled/disabled while streaming media data. Attempting to enable or disable a streaming non-dynamic link will return an EBUSY error code.

If the specified link can’t be found the driver returns with an EINVAL error code.

4.8.5. Return Value¶

On success 0 is returned, on error -1 and the errno variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.

EINVAL
The struct media_link_desc references a non-existing link, or the link is immutable and an attempt to modify its configuration was made.
Next Previous

© Copyright 2016, The kernel development community.

Sphinx theme provided by Read the Docs