Media Controller Support for Digital Video Broadcasting1

本文介绍了Digital Video Broadcasting (DVB)设备的基本组件及其在Linux内核中的API实现方式,包括前端、解复用器等关键部件的交互过程,并讨论了不同类型设备的数据流管道配置。

https://lwn.net/Articles/646638/rss?format=printable



May 8, 2015 - Mauro Carvalho Chehab

Media Controller Support for Digital Video Broadcasting

Supporting embedded Digital TV hardware is complex, considering that such hardware generally has multiple components that can be rewired in runtime to dynamically change the stream pipelines and provide flexibility for things like recording a video stream, then tuning into another channel to see a different program. This article describes how the DVB pipelines are setup and the needs that should be addressed by the Linux Kernel. This introduction will lead into the next article in this series, which will describe how the media subsystem is being improved to support such needs.

Digital TV devices

A Digital TV device consists of a set of hardware blocks. The basic components are:

Tuner – Tunes into a physical frequency (tuner), and outputs the channel on an Intermediate Frequency (IF).

Demodulator (a. k. a. demod) – Gets an IF, decodes the sub-carrier(s) content, and outputs the resulting MPEG-TS stream. It is specific for a given set of DTV standards.

Demultiplexer (a. k. a. demux) – Filters the MPEG-TS and extracts video, audio, and other data information, like subtitles, Electronic Program Guide, etc. The demux may also extract TCP/IP packets from the MPEG-TS and send them via a Linux network interface

Satellite devices also have a Satellite Equipment Control (SEC), which controls external components of the antenna subsystem like DiSEqC switches, LNBf, rotors, etc.

Please note:

    • Inexpensive/low-end devices don’t have a demux. The Linux Kernel emulates it in such cases.
    • Some devices may have a MPEG-TS multiplexer (for TCP/IP data send) and Conditional Access Module support (for Digital Rights Management).

Figure 1: Media device block diagram

 

Digital TV Front End

The DTV front end consists of several sub-devices including tuner, demod, low noise amplifiers (LNBf, LNA) that can be coupled at the antenna system and SEC.

Its functions include:

  • Tuning into a physical channel
  • Demodulating the channel data
  • Controlling the satellite and signal amplifiers

On Digital TV, tuning into a channel is a tightly-coupled operation:

  • The IF used by the demod and tuner should be the same.
  • The tuner filters should be optimized to the digital TV standard in use.
  • On some devices, in order to increase the quality of the signal the demod should control the tuner and amplifier gain, and set bandwidth filters dynamically.
  • On some satellite devices, the same hardware component will contain all 3 functions (tuner, demodulator and SEC).
  • On many devices, a FPGA or micro-controller handles both tuner and demod. In such cases, the tuner is not directly visible, but instead, a higher-level API is exposed. Additionally the FPGA/firmware receives the frequency and other parameters via the front end, and commands the tuner together with the demod to obtain optimized tuning.

The Linux DVB API was designed to expose the front end as a single entity. Yet, it might be necessary to expose the sub-devices in the future to allow direct control of the tuner, SEC, and low noise amplifiers.

MPEG-TS

Figure 2: MPEG-TS Container Example

The basic structure of most digital TV standards is the MPEG Transport Stream (MPEG-TS). The Transport Stream is a mechanism of encapsulating and multiplexing several different streams into a single stream. Each individual stream is called an Elementary Stream, and is identified via unique Packet ID (PID), as shown inFigure 2.

Linux Kernel Digital TV APIs

There are several device nodes for Digital TV to control hardware components:

/dev/dvb/adapter?/frontend? – The Front End API controls the tuner, demod and SEC

/dev/dvb/adapter?/ca? – The CA API controls the conditional access module

/dev/dvb/adapter?/demux? – The demux API controls the demux

In addition, there are other device nodes, such as:

/dev/dvb/adapter?/dvr? – Controls the MPEG-TS filtered output

/dev/dvb/adapter?/net? – Controls the MPEG-TS filter for a network adapter

Digital TV data flow pipelines

The Linux DVB API is used to control data flow. The tuner and demod are typically hardwired, and filters are dynamically created/removed to setup a filtered MPEG-TS to become available to the user space via the DVB demux API. Each filter contains a PID (PES filter) or a section filter (to filter tables). The PID set that matches the filtering parameters is sent to the user space via the DVR device node, and eventually passes through a Conditional Access Module (CAM) to be decrypted. Another option is to send each individual PID to a per/PID file descriptor in the user space via the demux device node.

From data flow point of view, a typical Digital TV PC customer’s device looks like what’s shown atFigure 3:

Figure 3: DTV data flow pipeline

Please note: On embedded hardware, the sink can actually be a GPU pipeline.

The control of the DVB device is done via several device nodes, as shown in Figure 4.

Figure 4: DTV control flow pipeline (the control flow is shown in dashed lines)

Several device nodes are used to control the hardware:

The front end devnode – controls tuner, demod (and SEC, for satellite)

The demux devnode – controls the demux

The CA devnode – controls the Conditional Access Module

Please notice that the DVR devnode doesn’t control anything – it is just used byread() ioctl to access the device data.

Other Examples of Digital TV Data Flows

The previous examples shown above are typical inexpensive PC hardware. On embedded devices, more complex data flows may happen, as shown in Figure 5 andFigure 6.

Figure 5: DTV control flow pipeline with no DMA output

 

Figure 6: A typical Set Top Box (STB) data flow pipeline

 

Figure 6 is actually simplified, as it doesn’t show the demod or demux and is based on a picturefound here.

It can be challenging to get diagrams like these from the Internet, as the real STB designs are typically protected by Non-disclosure Agreements (NDA). Since we want to give a more real example, let’s extrapolate from the diagram shown in Figure 6 to build an example showing demux, CAM and demod hardware with cross-bars between most of the elements.  The figure below allows us to randomly route to several alternatives.

Figure 7: A complete Set Top Box (STB) data flow pipeline (fictional)

Please note: Figure 7 doesn’t represent any real hardware; it is just an extrapolation from the diagram shown in Figure 6.

Now that the embedded Digital TV pipelines are understood, the next step is to improve the Linux Kernel in order to support such complex configurations. Before that, we still need to discuss an special case: network interfaces provided by Digital TV hardware.

On the next blog post in this series, I’ll describe the DVB network interfaces and how the Linux Kernel is addressing the DVB pipelines using the media controller.

Stay tuned!

Image Credits: Derivative of work by Subcommandante

About Mauro Carvalho Chehab

Mauro is the maintainer of the Linux kernel media and EDAC subsystems, and also a major contributor for the Reliability Availability and Serviceability (RAS) subsystems. He has broad experience in both telecommunications and software development, from previous work in IT, network and management areas at Brazil's largest telecommunication operator. He also spent time at Red Hat maintaining the RHEL kernel. He currently works for the Samsung Open Source Group.

LinuxDigital TV / Linux TV/ Multimidia/ Smart TV

内容概要:本文系统阐述了企业新闻发稿在生成式引擎优化(GEO)时代下的全渠道策略与效果评估体系,涵盖当前企业传播面临的预算、资源、内容与效果评估四大挑战,并深入分析2025年新闻发稿行业五大趋势,包括AI驱动的智能化转型、精准化传播、首发内容价值提升、内容资产化及数据可视化。文章重点解析央媒、地方官媒、综合门户和自媒体四类媒体资源的特性、传播优势与发稿策略,提出基于内容适配性、时间节奏、话题设计的策略制定方法,并构建涵盖品牌价值、销售转化与GEO优化的多维评估框架。此外,结合“传声港”工具实操指南,提供AI智能投放、效果监测、自媒体管理与舆情应对的全流程解决方案,并针对科技、消费、B2B、区域品牌四大行业推出定制化发稿方案。; 适合人群:企业市场/公关负责人、品牌传播管理者、数字营销从业者及中小企业决策者,具备一定媒体传播经验并希望提升发稿效率与ROI的专业人士。; 使用场景及目标:①制定科学的新闻发稿策略,实现从“流量思维”向“价值思维”转型;②构建央媒定调、门户扩散、自媒体互动的立体化传播矩阵;③利用AI工具实现精准投放与GEO优化,提升品牌在AI搜索中的权威性与可见性;④通过数据驱动评估体系量化品牌影响力与销售转化效果。; 阅读建议:建议结合文中提供的实操清单、案例分析与工具指南进行系统学习,重点关注媒体适配性策略与GEO评估指标,在实际发稿中分阶段试点“AI+全渠道”组合策略,并定期复盘优化,以实现品牌传播的长期复利效应。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值