media-controller-intro.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. _media-controller-intro:
  3. Introduction
  4. ============
  5. Media devices increasingly handle multiple related functions. Many USB
  6. cameras include microphones, video capture hardware can also output
  7. video, or SoC camera interfaces also perform memory-to-memory operations
  8. similar to video codecs.
  9. Independent functions, even when implemented in the same hardware, can
  10. be modelled as separate devices. A USB camera with a microphone will be
  11. presented to userspace applications as V4L2 and ALSA capture devices.
  12. The devices' relationships (when using a webcam, end-users shouldn't
  13. have to manually select the associated USB microphone), while not made
  14. available directly to applications by the drivers, can usually be
  15. retrieved from sysfs.
  16. With more and more advanced SoC devices being introduced, the current
  17. approach will not scale. Device topologies are getting increasingly
  18. complex and can't always be represented by a tree structure. Hardware
  19. blocks are shared between different functions, creating dependencies
  20. between seemingly unrelated devices.
  21. Kernel abstraction APIs such as V4L2 and ALSA provide means for
  22. applications to access hardware parameters. As newer hardware expose an
  23. increasingly high number of those parameters, drivers need to guess what
  24. applications really require based on limited information, thereby
  25. implementing policies that belong to userspace.
  26. The media controller API aims at solving those problems.