0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002
0003 .. _media-controller-intro:
0004
0005 Introduction
0006 ============
0007
0008 Media devices increasingly handle multiple related functions. Many USB
0009 cameras include microphones, video capture hardware can also output
0010 video, or SoC camera interfaces also perform memory-to-memory operations
0011 similar to video codecs.
0012
0013 Independent functions, even when implemented in the same hardware, can
0014 be modelled as separate devices. A USB camera with a microphone will be
0015 presented to userspace applications as V4L2 and ALSA capture devices.
0016 The devices' relationships (when using a webcam, end-users shouldn't
0017 have to manually select the associated USB microphone), while not made
0018 available directly to applications by the drivers, can usually be
0019 retrieved from sysfs.
0020
0021 With more and more advanced SoC devices being introduced, the current
0022 approach will not scale. Device topologies are getting increasingly
0023 complex and can't always be represented by a tree structure. Hardware
0024 blocks are shared between different functions, creating dependencies
0025 between seemingly unrelated devices.
0026
0027 Kernel abstraction APIs such as V4L2 and ALSA provide means for
0028 applications to access hardware parameters. As newer hardware expose an
0029 increasingly high number of those parameters, drivers need to guess what
0030 applications really require based on limited information, thereby
0031 implementing policies that belong to userspace.
0032
0033 The media controller API aims at solving those problems.