Media Controller API 1. Introduction 翻译
https://docs.kernel.org/userspace-api/media/mediactl/media-controller.html
- Introduction
1 引言
Media devices increasingly handle multiple related functions. Many USB cameras include microphones, video capture hardware can also output video, or SoC camera interfaces also perform memory-to-memory operations similar to video codecs.
媒体设备越来越多的处理多个相关的功能。很多USB摄像头包含了麦克风,视频捕捉硬件也能输出视频,或者SoC 摄像头接口也能执行内部到内存的操作,这类似视频解码器。
Independent functions, even when implemented in the same hardware, can be modelled as separate devices. A USB camera with a microphone will be presented to userspace applications as V4L2 and ALSA capture devices. The devices’ relationships (when using a webcam, end-users shouldn’t have to manually select the associated USB microphone), while not made available directly to applications by the drivers, can usually be retrieved from sysfs.
独立的功能,即使被实现在同样的硬件中,能被建模成独立的设备。一个带麦克风的USB摄像头将呈现到用户空间应用程序当做V4L2和ALSA捕捉设备。这些设备之间的关系(当被用作一个webcam,最终用户不能手动的选用相关的USB麦克风),不会直接通过驱动对应用程序显示可用,但是可以从sysfs检索。
With more and more advanced SoC devices being introduced, the current approach will not scale. Device topologies are getting increasingly complex and can’t always be represented by a tree structure. Hardware blocks are shared between different functions, creating dependencies between seemingly unrelated devices.
随着越来越多的SoC设备被引入,当前的方法无法被扩展。设备拓扑争辩的越来越复杂,且不能经常被表示成一个树形结构。硬件模块在不通的功能中被共享,导致看似无关的设备之间产生了依赖关系。
Kernel abstraction APIs such as V4L2 and ALSA provide means for applications to access hardware parameters. As newer hardware expose an increasingly high number of those parameters, drivers need to guess what applications really require based on limited information, thereby implementing policies that belong to userspace.
内核抽象API如V4L2和ALSA为应用程序提供了访问硬件参数的手段。随着新硬件暴露的参数越来越多,驱动程序需要根据有限的信息猜测应用程序真正需要什么,从而实现在用户空间中属于策略的内容。
The media controller API aims at solving those problems.
媒体控制器API旨在解决这些问题。