|
|||||||||||||
![]() |
||||
News2015-08-17 Report of the Media Controller Workshop in Espoo on July 2015This is the first workshop dedicated to the Linux Media Controller. We had a v4l summit back in 2010 in Finland that established the current foundation for the media controller, and to properly satisfy the needs of reporting the pipelines on the smartphone System on a Chip (SoC). The focus of this year’s workshop was to clarify the kernel➞userspace interfaces and extend the Media Controller to be used on other subsystems that need to represent graphs like Digital Video Broadcasting (DVB), Advanced Linux Sound Architecture (ALSA), and Industrial I/O (IIO). Main event attendees:Antti Laakso <antti.laakso@intel.com> Hans Verkuil<hansverk@cisco.com> Lars-Peter Clausen <lars@metafoo.de> Laurent Pinchart <laurent.pinchart@ideasonboard.com> Mauro Chehab <mchehab@osg.samsung.com> Sakari Ailus <sakari.ailus@iki.fi> Shuah Khan <shuahkh@osg.samsung.com> Tuukka Toivonen <tuukka.toivonen@intel.com> MC videoconf attendees:Dong-Joo Kim <dj98.kim@samsung.com> Geunyoung Kim <nenggun.kim@samsung.com> In-Ki Dae <inki.dae@samsung.com> Junghak Sung <jh1009.sung@samsung.com> Minsong Kim <ms17.kim@samsung.com> Ohin Kwon <rany.kwon@samsung.com> Seung-Woo Kim <sw0312.kim@samsung.com>
EDITOR'S NOTE: Usually, we produce the summit reports using a cronologic approach. This time, I opted to move the content of the second day to the beginning of the report, as they're basically several presentations we had covering the Media Controller needs. I opted to put the presentations first, and then put the disc ussions we had on July 29 and 31 together. 1. Presentations made on July, 301.1. Videobuf2 Redesign to Allow it to Support DVBRepresentatives from Samsung offered a presentation via video conference about the scheduled changes that are planned in order to split the videobuf2 core from the V4L2 specific part. This will allow the videobuf2 core to also be used for DVB. 1.2. DVB pipelinesSamsung representatives via video conference presented about the pipelines. Essentially, the pipelines on real use-cases for embedded devices would look like: tuner 1 -> -> demux -> Video tuner 2 -> cam 1 -> demux -> Audio tuner 3 -> cam 2 -> demux -> Data -> V4L2 -> ALSA 1.3. ALSA and the Media ControllerThis presentation covered the following topics:
1.4. Updates to ALSA and au0828 to share resourcesThis presentation covered the following topics:
1.5. IIO – Industrial I/Ohttps://linuxtv.org/downloads/presentations/mc_ws_2015/iio_media_controller.pdf
2. Keysign party at the afternoon of July, 30We did a Keysign party, where the gpg keys got cross-signed among the participants. 3. Media Controller API Discussions3.1. Discussions took at July, 29There were a few requirements our discussions needed to address:
It was proposed to use the concept of planes, as defined by ITU and IEEE to represent different layers of a data or media network (ITU-T G.800). So, we would have control and data planes. https://linuxtv.org/downloads/presentations/mc_ws_2015/media_controller_summit_needs.pdf This is a concept largely used on networks, as show at: http://etherealmind.com/controller-based-networks-for-data-centres/ Multiple options to express association between device nodes and entities:
The decision was, instead, to add a new graph element type (Interface) to represent the elements that controls the entities. It was agreed with the following terminology:
It was also proposed to use the name “association” for the links between interface and entity, but there was no consensus about that idea. EDITOR'S NOTE: On July, 31 we started using the name “links” also for the connec tion between an entity and an interface. We used the term “interface links” for such links when we need to distinguish them from “data links” (e. g. pad to pad links).Mauro’s concern is that there will be lots of code duplication in the Kernel if we use a different graph type for the interface links. The relationship between Interfaces and entities are n-n:
Media interfaces
Working proposal (as proposed on July, 29)
The current API does a crap job on properly defining entities that are coupled to interfaces, and prevented the enablement of the MC DVB support, submitted in December, 2014. That needs to be fixed as soon as possible, as it is causing bad impact on using MC even for other V4L2 device types, like radio. So, Mauro stated that, as the MC API is currently on a broken state, no patches, drivers or framework changes related to the Media Controller will be merged upstream until this is fixed. Fixup patches may be merged, though. Hans would try to do the work (of proposing the userspace API) at the week after the MC workshop. Userspace API Requirements:
Additional API requirements that should be addressed in the future:
Points to solve:
Some notes to help with network interface definitions:
DRM subsystem uses u64 instead of pointers at the public API:
TODO:
Question: should we redesign everything in order to support topology changes? 3.2. Discussions took at the afternoon of July30 and on July, 31stIt was discussed if we should add a generic graph framework in the kernel. This would require review on linux-kernel and such review may take a long time, as different requirements could pop up. So, perhaps not this time. It was presented some topology for simple hybrid TV hardware (PC-customer hardware), at: An agreement was arrived for the UAPI interface. What was agreed:
V4L2 applications need to know if they can capture from an input/tuner. To make that easy for them, it was proposed to add a new flag to VIDIOC_ENUMINPUT and whether the tuner is in use (and/or the tuner state) through VIDIOC_G_TUNER. This can’t be done at the DVB side, however, as there are no reserved fields there. It was discussed about the need to allow bidirectional pads (needed for connectors like a coax that are bidirectional using time or frequency multiplexing) TODO: Connector entities It was proposed the following possible types of entities:
Whather an entity is a connector needs to be told, as this can’t be discovered All others can be derived from other information already in the graph? Entity functional propertiesMost of the properties at entity level would be used to signal capabilities that can be figured out using sub-system specific interfaces the application already uses InterfacesAgreement: interfaces do have a type An interface can be a device node, network interface or a sysfs directory It was proposed two new ioctls: Finding entities – current situationEspecially device specific applications often need to find an exact entity the application requires So, it ended by having device names such as “omap3isp resizer” Other data could be used to enhance the device name, like:
This should enable most of the use cases where entities need to be found PropertiesArray of properties as an IOCTL argument has the problem that the user would have to allocate enough memory for each key-value pair in the array. This is unfeasible. The original proposal used a text-based format for the purpose of discussing what properties should be, and left the question of the binary format for the ABI open. So, one question remains if the API should use either a text-based onr a binary-based format. Using a text based format requires parsing by the user, albeit the kernel interface would remain simple. The new proposal at the new media.h file combines the best of both: a single memory area amended with an array of properties that refer to the memory area For the media properties, using strings the key type has benefits, as hierarchy is possible, with is not possible using an u32 integer for instance. Should values be always strings or should other types be accepted? Probably having other types is a good idea. Different options for arrays, for example:
The better representation for arrays should be discussed on a RFC for the properties. Properties could be seen as re-implementing sysfs on the discussions with linux-api people. However they’re much more light-weight. Also, there’s no atomic access of all sysfs properties and sysfs is limited to page size Another option for the kernel interface: key/length/value Media objectsMedia objects have an unique ID in the system 3.3. Action Items:
![]() Media Controller diagram as proposed during the meeting for a hybrid webcam/analog/digital TV device |
||||