資料介紹
Table of Contents
ADV7511 HDMI transmitter Linux Driver
Supported Devices
Reference Circuits
Evaluation Boards
Description
The ADV7511 driver is implemented as a DRM encoder slave driver. In a typical board design the ADV7511 is not used as a standalone component but rather as a HDMI encoder fronted for some other devices with a graphics core, like a SoC or a FPGA. Implementing the ADV7511 driver as a DRM encoder slave driver allows to reuse the driver between different platforms which use the ADV7511.
For an example implementation of a DRM driver using the ADV7511 please refer to Linux driver for the Analog Devices example HDL design for the Xilinx Zync plus ADV7511 designs.
The driver supports audio via HDMI as well by implementing a ASoC codec driver. This again allows to reuse the driver for a varieties of different platforms.
Source Code
Status
Files
Function | File |
---|---|
driver | drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |
driver | drivers/gpu/drm/bridge/adv7511/adv7511_audio.c |
driver | drivers/gpu/drm/bridge/adv7511/adv7533.c |
include | drivers/gpu/drm/bridge/adv7511/adv7511.h |
Example platform device initialization
DRM
Usually the DRM encoder slave will be instantiated by a DRM encoder driver. After the encoder slave has been instantiated it needs to be configured by the DRM encoder driver. The configuration includes settings like physical connection to the host graphics core as well as the output video format. If necessary the configuration can be changed at runtime, e.g. to change the output format if a HDMI sink with different capabilities is connected.
Configuration for the ADV7511 is done through the adv7511_video_input_config which should be passed to the slave encoder's set_config callback function.
/** * enum adv7511_input_style - Selects the input format style * ADV7511_INPUT_STYLE1: Use input style 1 * ADV7511_INPUT_STYLE2: Use input style 2 * ADV7511_INPUT_STYLE3: Use input style 3 **/ enum adv7511_input_style { ADV7511_INPUT_STYLE1 = 2, ADV7511_INPUT_STYLE2 = 1, ADV7511_INPUT_STYLE3 = 3, }; ? /** * enum adv7511_input_id - Selects the input format id * @ADV7511_INPUT_ID_24BIT_RGB444_YCbCr444: Input pixel format is 24-bit 444 RGB * or 444 YCbCR with separate syncs * @ADV7511_INPUT_ID_16_20_24BIT_YCbCr422_SEPARATE_SYNC: * @ADV7511_INPUT_ID_16_20_24BIT_YCbCr422_EMBEDDED_SYNC: * @ADV7511_INPUT_ID_8_10_12BIT_YCbCr422_SEPARATE_SYNC: * @ADV7511_INPUT_ID_8_10_12BIT_YCbCr422_EMBEDDED_SYNC: * @ADV7511_INPUT_ID_12_15_16BIT_RGB444_YCbCr444: **/ enum adv7511_input_id { ADV7511_INPUT_ID_24BIT_RGB444_YCbCr444 = 0, ADV7511_INPUT_ID_16_20_24BIT_YCbCr422_SEPARATE_SYNC = 1, ADV7511_INPUT_ID_16_20_24BIT_YCbCr422_EMBEDDED_SYNC = 2, ADV7511_INPUT_ID_8_10_12BIT_YCbCr422_SEPARATE_SYNC = 3, ADV7511_INPUT_ID_8_10_12BIT_YCbCr422_EMBEDDED_SYNC = 4, ADV7511_INPUT_ID_12_15_16BIT_RGB444_YCbCr444 = 5, }; ? /** * enum adv7511_input_bit_justifiction - Selects the input format bit justifiction * ADV7511_INPUT_BIT_JUSTIFICATION_EVENLY: Input bits are evenly distributed * ADV7511_INPUT_BIT_JUSTIFICATION_RIGHT: Input bit signals have right justification * ADV7511_INPUT_BIT_JUSTIFICATION_LEFT: Input bit signals have left justification **/ enum adv7511_input_bit_justifiction { ADV7511_INPUT_BIT_JUSTIFICATION_EVENLY = 0, ADV7511_INPUT_BIT_JUSTIFICATION_RIGHT = 1, ADV7511_INPUT_BIT_JUSTIFICATION_LEFT = 2, }; ? /** * enum adv7511_input_color_depth - Selects the input format color depth * @ADV7511_INPUT_COLOR_DEPTH_8BIT: Input format color depth is 8 bits per channel * @ADV7511_INPUT_COLOR_DEPTH_10BIT: Input format color dpeth is 10 bits per channel * @ADV7511_INPUT_COLOR_DEPTH_12BIT: Input format color depth is 12 bits per channel **/ enum adv7511_input_color_depth { ADV7511_INPUT_COLOR_DEPTH_8BIT = 3, ADV7511_INPUT_COLOR_DEPTH_10BIT = 1, ADV7511_INPUT_COLOR_DEPTH_12BIT = 2, }; ? /** * enum adv7511_input_sync_pulse - Selects the sync pulse * @ADV7511_INPUT_SYNC_PULSE_DE: Use the DE signal as sync pulse * @ADV7511_INPUT_SYNC_PULSE_HSYNC: Use the HSYNC signal as sync pulse * @ADV7511_INPUT_SYNC_PULSE_VSYNC: Use the VSYNC signal as sync pulse * @ADV7511_INPUT_SYNC_PULSE_NONE: No external sync pulse signal **/ enum adv7511_input_sync_pulse { ADV7511_INPUT_SYNC_PULSE_DE = 0, ADV7511_INPUT_SYNC_PULSE_HSYNC = 1, ADV7511_INPUT_SYNC_PULSE_VSYNC = 2, ADV7511_INPUT_SYNC_PULSE_NONE = 3, }; ? /** * enum adv7511_input_clock_delay - Delay for the video data input clock * @ADV7511_INPUT_CLOCK_DELAY_MINUS_1200PS: -1200 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_MINUS_800PS: -800 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_MINUS_400PS: -400 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_NONE: No delay * @ADV7511_INPUT_CLOCK_DELAY_PLUS_400PS: 400 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_PLUS_800PS: 800 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_PLUS_1200PS: 1200 pico seconds delay * @ADV7511_INPUT_CLOCK_DELAY_PLUS_1600PS: 1600 pico seconds delay **/ enum adv7511_input_clock_delay { ADV7511_INPUT_CLOCK_DELAY_MINUS_1200PS = 0, ADV7511_INPUT_CLOCK_DELAY_MINUS_800PS = 1, ADV7511_INPUT_CLOCK_DELAY_MINUS_400PS = 2, ADV7511_INPUT_CLOCK_DELAY_NONE = 3, ADV7511_INPUT_CLOCK_DELAY_PLUS_400PS = 4, ADV7511_INPUT_CLOCK_DELAY_PLUS_800PS = 5, ADV7511_INPUT_CLOCK_DELAY_PLUS_1200PS = 6, ADV7511_INPUT_CLOCK_DELAY_PLUS_1600PS = 7, }; ? /** * enum adv7511_csc_scaling - HDMI videostream format * @ADV7511_OUTPUT_FORMAT_RGB_444: Output format is RGB 444 * @ADV7511_OUTPUT_FORMAT_YCBCR_422: Output format is YCbCr 422 * @ADV7511_OUTPUT_FORMAT_YCBCR_444: Output format is YCbCr 444 **/ enum adv7511_output_format { ADV7511_OUTPUT_FORMAT_RGB_444 = 0, ADV7511_OUTPUT_FORMAT_YCBCR_422 = 1, ADV7511_OUTPUT_FORMAT_YCBCR_444 = 2, }; ? /** * enum adv7511_sync_polarity - Polarity for the input sync signals * ADV7511_SYNC_POLARITY_PASSTHROUGH: Sync polarity matches that of the currently * configured mode. * ADV7511_SYNC_POLARITY_LOW: Sync polarity is low * ADV7511_SYNC_POLARITY_HIGH: Sync polarity is high * * If the polarity is set to either ADV7511_SYNC_POLARITY_LOW or * ADV7511_SYNC_POLARITY_HIGH the ADV7511 will internally invert the signal if * it is required to match the sync polarity setting for the currently selected * mode. If the polarity is set to ADV7511_SYNC_POLARITY_PASSTHROUGH, the ADV7511 * will route the signal unchanged, this is useful if the upstream graphics core * will already generate the sync singals with the correct polarity. **/ enum adv7511_sync_polarity { ADV7511_SYNC_POLARITY_PASSTHROUGH, ADV7511_SYNC_POLARITY_LOW, ADV7511_SYNC_POLARITY_HIGH, }; ? /** * enum adv7511_csc_scaling - Scaling factor for the ADV7511 CSC * @ADV7511_CSC_SCALING_1: CSC results are not scaled * @ADV7511_CSC_SCALING_2: CSC results are scaled by a factor of two * @ADV7511_CSC_SCALING_4: CSC results are scalled by a factor of four **/ enum adv7511_csc_scaling { ADV7511_CSC_SCALING_1 = 0, ADV7511_CSC_SCALING_2 = 1, ADV7511_CSC_SCALING_4 = 2, }; ? /** * enum adv7511_timing_gen_seq - Selects the order in which timing adjustments are performed * @ADV7511_TIMING_GEN_SEQ_SYN_ADJ_FIRST: Sync adjustment first, then DE generation * @ADV7511_TIMING_GEN_SEQ_DE_GEN_FIRST: DE generation first, then sync adjustment * * This setting is only relevant if both DE generation and sync adjustment are * active. **/ enum adv7511_timing_gen_seq { ADV7511_TIMING_GEN_SEQ_SYN_ADJ_FIRST = 0, ADV7511_TIMING_GEN_SEQ_DE_GEN_FIRST = 1, }; ? ? /** * enum adv7511_up_conversion - Selects the upscaling conversion method * @ADV7511_UP_CONVERSION_ZERO_ORDER: Use zero order up conversion * @ADV7511_UP_CONVERSION_FIRST_ORDER: Use first order up conversion * * This used when converting from a 4:2:2 format to a 4:4:4 format. **/ enum adv7511_up_conversion { ADV7511_UP_CONVERSION_ZERO_ORDER = 0, ADV7511_UP_CONVERSION_FIRST_ORDER = 0, }; ? /** * struct adv7511_video_input_config - Describes adv7511 hardware configuration * @id: Video input format id * @input_style: Video input format style * @sync_pulse: Select the sync pulse * @clock_delay: Clock delay for the input clock * @reverse_bitorder: Reverse video input signal bitorder * @bit_justification: Video input format bit justification * @up_conversion: Selects the upscaling conversion method * @input_color_depth: Input video format color depth * @tmds_clock_inversion: Whether to invert the TDMS clock * @vsync_polartity: vsync input signal configuration * @hsync_polartity: hsync input signal configuration * @csc_enable: Whether to enable color space conversion * @csc_scaling_factor: Color space conversion scaling factor * @csc_coefficents: Color space conversion coefficents * @output_format: Video output format * @timing_gen_seq: Selects the order in which sync DE generation * and sync adjustment are performt. * @hdmi_mode: Whether to use HDMI or DVI output mode **/ struct adv7511_video_input_config { enum adv7511_input_id id; enum adv7511_input_style input_style; enum adv7511_input_sync_pulse sync_pulse; enum adv7511_input_clock_delay clock_delay; bool reverse_bitorder; enum adv7511_input_bit_justifiction bit_justification; enum adv7511_up_conversion up_conversion; enum adv7511_input_color_depth input_color_depth; bool tmds_clock_inversion; ? enum adv7511_sync_polarity vsync_polarity; enum adv7511_sync_polarity hsync_polarity; ? bool csc_enable; enum adv7511_csc_scaling csc_scaling_factor; const uint16_t *csc_coefficents; ? enum adv7511_output_format output_format; enum adv7511_timing_gen_seq timing_gen_seq; bool hdmi_mode; };
Example Configuration
static const uint16_t adv7511_csc_ycbcr_to_rgb[] = { 0x0734, 0x04ad, 0x0000, 0x1c1b, 0x1ddc, 0x04ad, 0x1f24, 0x0135, 0x0000, 0x04ad, 0x087c, 0x1b77, }; ? static const struct adv7511_video_input_config adv7511_config_zc702 = { .id = ADV7511_INPUT_ID_16_20_24BIT_YCbCr422_SEPARATE_SYNC, .input_style = ADV7511_INPUT_STYLE1, .sync_pulse = ADV7511_INPUT_SYNC_PULSE_NONE, .clock_delay = ADV7511_INPUT_CLOCK_DELAY_NONE, .reverse_bitorder = false, .vsync_polarity = ADV7511_SYNC_POLARITY_HIGH, .hsync_polarity = ADV7511_SYNC_POLARITY_HIGH, .up_conversion = ADV7511_UP_CONVERSION_ZERO_ORDER, .input_color_depth = ADV7511_INPUT_COLOR_DEPTH_8BIT, .output_format = ADV7511_OUTPUT_FORMAT_RGB_444, .csc_enable = true, .csc_coefficents = adv7511_csc_ycbcr_to_rgb, .csc_scaling_factor = ADV7511_CSC_SCALING_4, .bit_justification = ADV7511_INPUT_BIT_JUSTIFICATION_RIGHT, .tmds_clock_inversion = true, }; ? [...] struct drm_encoder_slave_funcs *sfuncs = get_slave_funcs(encoder); ? sfuncs->set_config(encoder, &adv7511_config_zc702); [...]
ASoC
DAI configuration
The codec driver registers one DAI: adau-hifi
Supported DAI formats
Name | Supported by driver | Description |
---|---|---|
SND_SOC_DAIFMT_I2S | yes | I2S mode |
SND_SOC_DAIFMT_RIGHT_J | yes | Right Justified mode |
SND_SOC_DAIFMT_LEFT_J | yes | Left Justified mode |
SND_SOC_DAIFMT_DSP_A | no | data MSB after FRM LRC |
SND_SOC_DAIFMT_DSP_B | no | data MSB during FRM LRC |
SND_SOC_DAIFMT_AC97 | no | AC97 mode |
SND_SOC_DAIFMT_PDM | no | Pulse density modulation |
SND_SOC_DAIFMT_SPDIF | yes | SPDIF |
SND_SOC_DAIFMT_NB_NF | yes | Normal bit- and frameclock |
SND_SOC_DAIFMT_NB_IF | no | Normal bitclock, inverted frameclock |
SND_SOC_DAIFMT_IB_NF | yes | Inverted frameclock, normal bitclock |
SND_SOC_DAIFMT_IB_IF | no | Inverted bit- and frameclock |
SND_SOC_DAIFMT_CBM_CFM | no | Codec bit- and frameclock master |
SND_SOC_DAIFMT_CBS_CFM | no | Codec bitclock slave, frameclock master |
SND_SOC_DAIFMT_CBM_CFS | no | Codec bitclock master, frameclock slave |
SND_SOC_DAIFMT_CBS_CFS | yes | Codec bit- and frameclock slave |
Example DAI configuration
static struct snd_soc_dai_link hdmi_dai_link = { .name = "HDMI", .stream_name = "HDMI", .cpu_dai_name = "75c00000.axi-spdif-tx", .platform_name = "xilinx_pcm_audio.2", .codec_name = "adv7511.0-0039", .codec_dai_name = "adv7511", .dai_fmt = SND_SOC_DAIFMT_SPDIF | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, }; ? static struct snd_soc_card hdmi_card = { .name = "HDMI monitor", .owner = THIS_MODULE, .dai_link = &hdmi_dai_link, .num_links = 1, };
Enabling Linux driver support
Configure kernel with “make menuconfig” (alternatively use “make xconfig” or “make qconfig”)
The ADV7511 Driver depends on CONFIG_DRM and CONFIG_I2C
Linux Kernel Configuration Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> ... <*> AV7511 encoder
More information
- 適用于任何OS平臺(tái)(Exe)的ADV7511 HDMI發(fā)送器庫API源代碼
- LTC3676 Linux驅(qū)動(dòng)程序
- ADV7511 IBIS型號(hào)
- UG-235:Advantiv ADV7842/ADV7511視頻評(píng)估板用戶指南
- ADV7511 Xilinx KC705、VC707、ZC702和ZED參考設(shè)計(jì)
- ADV7511:225 MHz高性能HDMI發(fā)射器,帶ARC數(shù)據(jù)表
- ADV7511W:165 MHz,高性能HDMI傳輸數(shù)據(jù)Sheet
- Linux的LEDS GPIO驅(qū)動(dòng)程序免費(fèi)下載 3次下載
- 嵌入式Linux設(shè)備驅(qū)動(dòng)程序開發(fā)基礎(chǔ)知識(shí)總結(jié)免費(fèi)下載 13次下載
- Linux驅(qū)動(dòng)程序缺陷檢測研究 9次下載
- Linux系統(tǒng)網(wǎng)絡(luò)驅(qū)動(dòng)程序的編寫 0次下載
- 基于Linux下的LCD驅(qū)動(dòng)程序實(shí)現(xiàn) 12次下載
- 第9章 Linux驅(qū)動(dòng)程序設(shè)計(jì) 3次下載
- ADV7511 HDCP 1.1使能_禁用選項(xiàng) 55次下載
- 步進(jìn)電機(jī)的Linux驅(qū)動(dòng)程序
- 怎么編寫Framebuffer驅(qū)動(dòng)程序 403次閱讀
- 自動(dòng)刪除SDK/Vitis下驅(qū)動(dòng)程序的舊版本的Linux腳本 558次閱讀
- ADI視頻編碼器EI3擴(kuò)展板的主要特性及應(yīng)用 2792次閱讀
- 如何寫一個(gè)Linux設(shè)備驅(qū)動(dòng)程序 4314次閱讀
- 米爾科技LINUX設(shè)備驅(qū)動(dòng)程序教程 1967次閱讀
- 嵌入式Linux內(nèi)核的驅(qū)動(dòng)程序開發(fā)是怎樣的 1415次閱讀
- HDMI高清顯示接口驅(qū)動(dòng)的傳輸原理 8807次閱讀
- 淺談電腦驅(qū)動(dòng)程序的工作原理 詳解電腦驅(qū)動(dòng)程序意義 2.9w次閱讀
- 基于嵌入式Linux內(nèi)核的系統(tǒng)設(shè)備驅(qū)動(dòng)程序開發(fā)設(shè)計(jì) 1113次閱讀
- 基于Linux2.6.30開發(fā)DS18B20的驅(qū)動(dòng)程序的類型和文件操作接口函數(shù)詳解 1377次閱讀
- 可動(dòng)態(tài)安裝的Linux設(shè)備驅(qū)動(dòng)程序 957次閱讀
- 8255A驅(qū)動(dòng)程序 3193次閱讀
- 8155驅(qū)動(dòng)程序 3057次閱讀
- Xilinx設(shè)備的驅(qū)動(dòng)程序 7967次閱讀
- PCI驅(qū)動(dòng)程序開發(fā)實(shí)例 6702次閱讀
下載排行
本周
- 1HFSS電磁仿真設(shè)計(jì)應(yīng)用詳解PDF電子教程免費(fèi)下載
- 24.30 MB | 128次下載 | 1 積分
- 2雷達(dá)的基本分類方法
- 1.25 MB | 4次下載 | 4 積分
- 3電感技術(shù)講解
- 827.73 KB | 2次下載 | 免費(fèi)
- 4從 MSP430? MCU 到 MSPM0 MCU 的遷移指南
- 1.17MB | 2次下載 | 免費(fèi)
- 5有源低通濾波器設(shè)計(jì)應(yīng)用說明
- 1.12MB | 2次下載 | 免費(fèi)
- 6RA-Eco-RA2E1-48PIN-V1.0開發(fā)板資料
- 35.59 MB | 2次下載 | 免費(fèi)
- 7面向熱插拔應(yīng)用的 I2C 解決方案
- 685.57KB | 1次下載 | 免費(fèi)
- 8愛普生有源晶體振蕩器SG3225EEN應(yīng)用于儲(chǔ)能NPC、新能源
- 317.46 KB | 1次下載 | 免費(fèi)
本月
- 12024年工控與通信行業(yè)上游發(fā)展趨勢和熱點(diǎn)解讀
- 2.61 MB | 763次下載 | 免費(fèi)
- 2HFSS電磁仿真設(shè)計(jì)應(yīng)用詳解PDF電子教程免費(fèi)下載
- 24.30 MB | 128次下載 | 1 積分
- 3繼電保護(hù)原理
- 2.80 MB | 36次下載 | 免費(fèi)
- 4正激、反激、推挽、全橋、半橋區(qū)別和特點(diǎn)
- 0.91 MB | 32次下載 | 1 積分
- 5labview實(shí)現(xiàn)DBC在界面加載配置
- 0.57 MB | 21次下載 | 5 積分
- 6在設(shè)計(jì)中使用MOSFET瞬態(tài)熱阻抗曲線
- 1.57MB | 15次下載 | 免費(fèi)
- 7GBT 4706.1-2024家用和類似用途電器的安全第1部分:通用要求
- 7.43 MB | 14次下載 | 免費(fèi)
- 8AD18學(xué)習(xí)筆記
- 14.47 MB | 8次下載 | 2 積分
總榜
- 1matlab軟件下載入口
- 未知 | 935113次下載 | 10 積分
- 2開源硬件-PMP21529.1-4 開關(guān)降壓/升壓雙向直流/直流轉(zhuǎn)換器 PCB layout 設(shè)計(jì)
- 1.48MB | 420061次下載 | 10 積分
- 3Altium DXP2002下載入口
- 未知 | 233084次下載 | 10 積分
- 4電路仿真軟件multisim 10.0免費(fèi)下載
- 340992 | 191360次下載 | 10 積分
- 5十天學(xué)會(huì)AVR單片機(jī)與C語言視頻教程 下載
- 158M | 183329次下載 | 10 積分
- 6labview8.5下載
- 未知 | 81578次下載 | 10 積分
- 7Keil工具M(jìn)DK-Arm免費(fèi)下載
- 0.02 MB | 73804次下載 | 10 積分
- 8LabVIEW 8.6下載
- 未知 | 65985次下載 | 10 積分
評(píng)論
查看更多