Merge tag '4.21-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / Documentation / media / uapi / mediactl / media-controller-intro.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _media-controller-intro:
11
12 Introduction
13 ============
14
15 Media devices increasingly handle multiple related functions. Many USB
16 cameras include microphones, video capture hardware can also output
17 video, or SoC camera interfaces also perform memory-to-memory operations
18 similar to video codecs.
19
20 Independent functions, even when implemented in the same hardware, can
21 be modelled as separate devices. A USB camera with a microphone will be
22 presented to userspace applications as V4L2 and ALSA capture devices.
23 The devices' relationships (when using a webcam, end-users shouldn't
24 have to manually select the associated USB microphone), while not made
25 available directly to applications by the drivers, can usually be
26 retrieved from sysfs.
27
28 With more and more advanced SoC devices being introduced, the current
29 approach will not scale. Device topologies are getting increasingly
30 complex and can't always be represented by a tree structure. Hardware
31 blocks are shared between different functions, creating dependencies
32 between seemingly unrelated devices.
33
34 Kernel abstraction APIs such as V4L2 and ALSA provide means for
35 applications to access hardware parameters. As newer hardware expose an
36 increasingly high number of those parameters, drivers need to guess what
37 applications really require based on limited information, thereby
38 implementing policies that belong to userspace.
39
40 The media controller API aims at solving those problems.