没有合适的资源?快使用搜索试试~ 我知道了~
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
4星 · 超过85%的资源 需积分: 10 8 下载量 48 浏览量
2012-11-02
10:16:12
上传
评论
收藏 98KB PDF 举报
温馨提示
试读
11页
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
资源推荐
资源详情
资源评论
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
1
DM81xx AM38xx Adding External Decoders to
V4L2 Capture Driver
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
Linux PSP
IMPORTANT
DM816x refers to DM816x/AM389x devices unless specified.
DM814x refers to DM814x/AM387x devices unless specified.
DM81xx refers to both DM816x, DM814x and DM813x.
Introduction
Linux HDVPSS software stack contains drivers for controlling the video display, video capture graphics paths of the
HDVPSS.Video display and capture paths are exposed using the V4L2 user interface of Linux. Graphics path of the
HDVPSS is controlled using the frame buffer (fbdev) interface of Linux. HDVPSS hardware supports number of
different analog and digital video encoders and decoders. All of these encoders can be used to drive the external
encoders which can convert output of HDVPSS encoder to any of the standard video protocols like HDMI, DVI, and
VGA etc. All of the decoders can be used to convert the incoming videos in different protocols like HDMI, DVI
VGA etc to the standard BT656, BT1120, BT601 interface which HDVPSS understands.
All the external decoders are supported with V4L2 capture driver using standard V4L2 sub-device model. Decoders
that are required to be interfaced to the V4L2 capture driver needs to adhere V4L2 sub-device architecture. More
about V4L2 sub-device architecture is available at $Kernel_source/Documentation/video4linux/v4l2-framework.txt
V4L2 master driver requires information on how the decoder driver is interfaced to V4L2 master driver that is
HDVPSS capture in addition to the sub-device ioctls. This information is passed to V4L2 capture driver through
platform data. Following part of the document explains how to add/delete external decoders.
Design
All the external decoders are controlled through standard V4L2 driver model architecture. All the decoders need to
be implemented as V4L2 sub-device architecture. All the standard APIs that need to be supported by decoder based
on decoder features are listed in V4L2 API specification. Link to V4L2 API specification is given in references
section of this documentation.
Steps for Adding new Decoders
• All the files related to new external decoders should be added in following kernel directory
$kernel_source/drivers/media/video/<external_decoder_directory_file>
• MakeFiles and Kconfig files needs to be modified accordingly. Please refer to following kernel documentation on
makefiles and Kconfig under following kernel directory.
$kernel_source/Documentation/kbuild/
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
2
• TVP7002 decoder is added as the sub-device model in Linux Driver stack. Please refer following files for
TVP7002 decoder implementation.
$kernel_source/drivers/media/video/tvp7002.c
$kernel_source/drivers/media/video/tvp7002_reg.h
$kernel_source/drivers/media/video/tvp7002_reg.h
$kernel_source/media/video/Makefile
$kernel_source/drivers/media/video/Kconfig
• TVP7002 specifications could be found at tvp7002
[1]
• Data about the external decoders like what inputs they support, how they are interfaced to VPSS VIP port, what is
the I2C address etc, needs to be passed to V4L2 capture driver. This data is board dependent and needs to be
filled based on decoder and how decoder is connected to VIP port.
• ti81xxvin_config data structure needs to be field and passed it as platform data to the HDVPSS V4L2 capture
driver. It includes many sub-structures and enums all those will be explained in sub-sequent sections in code.
Structures
All the structures that needs to be instantiate and filled in according to the external decoder and connectivity between
decoder and VIP are explained below. /* Structure to configure V4L2 capture driver based
on external decoders preset on board. */ struct ti81xxvin_config {
/* Configuration for each instance of VIP */
struct ti81xxvin_inst_config inst_config[TI81XXVIN_NUM_INSTANCES];
/* Information for all sub-devices (external decoders) connected to VIP port */
struct ti81xxvin_subdev_info *subdev_info;
/* Number of sub-devices (external decoders) present on board */
int subdev_count;
/* Daughter Card name */
const char *card_name;
};
• Below structure is for configuring instance of the HDVPSS capture driver based on decoders connected and what
they support. This structure is used by master driver to select particular decoder based on the input selected. Like
if two decoders are connected to same VIP port, than based on input selected, master driver will configured any
one of the decoder. Even same decoder can support mutiple inputs like TVP5147 supports composite as well as
s-video inputs.
/* V4L2 master driver instance configuration based on decoder connected to
specific master driver*/ struct ti81xxvin_inst_config {
/* Different inputs possible on this instance like DVI, HDMI,
* Component etc. This is addition of all the different inputs
* supported bu all the decoders connected to this V4L2 master driver instance.
*/
const struct ti81xxvin_input *inputs;
/* Number of inputs possible on this V4L2 master driver instance.*/
int input_count;
DM81xx AM38xx Adding External Decoders to V4L2 Capture Driver
3
};
• Structure for each of the inputs possible on an instance.
struct ti81xxvin_input {
/* V4L2 input structure to be filled for each supported inputs
* This is a standard V4L2 structure. Please refer to V4L2 specifications
* for details.
*/
struct v4l2_input input;
/* Sub-device name */
const char *subdev_name;
/* Different DV presets this input supports
* This is a standard V4L2 structure. Please refer to V4L2 specifications
* for details.
*/
const struct v4l2_dv_preset *dv_presets;
/* Number of presets supported by this input */
int num_dv_presets;
};
• Structure for sub-device information. This structure gives information on various sub-devices present on boards.
struct ti81xxvin_subdev_info {
/* Name of the sub-device This name can be anything based on subdevice*/
const char *name;
/* Sub-device board info like how sub-device is connected on board.
* What is its i2c address, sub-device name etc. This should match
* sub-device name given in the sub-device driver under driver/media/video folder.
* Based on name only sub-device will be searched.
*/
struct i2c_board_info board_info;
/* HDVPSS video input port configuration based on how sub-device is interfaced to
* the HDVPSS VIP Port
*/
struct Vps_VipPortConfig vip_port_cfg;
/* VIP config. This is used to clip the blanking/active data based on sub-device interfaced */
struct Vps_VipConfig vip_cfg;
/* How is video captured, like Embedded Sync, discrete sync,
* single channel etc For details see #Vps_CaptVideoCaptureMode
*/
u32 video_capture_mode;
/* How is decoder interfaced, 8bit, 16bit, 24 bit etc.
* For details see #Vps_CaptVideoIfMode
剩余10页未读,继续阅读
资源评论
- gqb6662013-01-17谢谢楼主分享,正在研究这一块!
zk20072793
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功