RK3326方案中RK809开发指南
已有 2686 次阅读2020-2-6 17:35
|系统分类:嵌入式系统
RK817/RK809 内置 codec 是高性能音频编解码器:
High performance Audio CODEC
One internal PLL
Support microphone input
Support I2S as the digital signal interface for both DAC and ADC
Support Automatic Level Control(ALC),limiter and noise gating
Support programmable digital and analog gains
Audio resolution from 16bits to 32bits
Sample rate up to 192KHz
Provides master and slave work mode, software configurable
Support 3 I2S formats (normal, left-justified, right-justified)
Support PDM mode(external input PCLK)
实地输出的耳机驱动输出
不需要外部滤波电感的 1.3W class-D 音频功放
2 代码路径
sound/soc/codecs/rk817_codec.c
sound/soc/codecs/rk817_codec.h
3 dts 配置
3.1 dts 解析
Documentation/devicetree/bindings/sound/rockchip,rk817-codec.txt
- compatible: "rockchip,rk817-codec"
- clocks: a list of phandle + clock-specifer pairs, one for each entry in
2
clock-names.
- clock-names: should be "mclk".
- spk-ctl-gpios: spk mute enable/disable
用于外置功放使能脚, 如果产品上有使用外置功放, 请配置对应的使能脚
- hp-ctl-gpios: hp mute enable/disable
- spk-mute-delay-ms: spk mute delay time
- hp-mute-delay-ms: hp mute delay time
- spk-volume: DAC L/R volume digital setting for Speaker
配置喇叭输出音量, 0 最大, 255 最小
- hp-volume: DAC L/R volume digital setting for Headphone
配置耳机输出音量, 0 最大, 255 最小
* *
DDAC L/R volume setting
* 0db~-95db,0.375db/step,for example:
* 0: 0dB
* 10: -3.75dB
* 125: -46dB
* 255: -95dB
* -
capture-volume: ADC L/R volume digital setting for Microphone
配置录音输入音量, 0 最大, 255 最小
* *
DADC L/R volume setting
* 0db~-95db,0.375db/step,for example:
* 0: 0dB
* 10: -3.75dB
* 125: -46dB
* 255: -95dB
* -
mic-in-differential:
3
Boolean. Indicate MIC input is differential, rather than single-ended.
指定使用差分 MIC, 否则为单端 MIC, 所以使用差分 MIC 时加上此 property。
- pdmdata-out-enable:
Boolean. Indicate pdmdata output is enabled or disabled.
录音数据使用 PDM 数字接口。
- use-ext-amplifier:
Boolean. Indicate use external amplifier or not. 指定是否使用外部功放。
- adc-for-loopback:
Boolean. Indicate adc use for loopback or not.
指定 ADC 用于回采, 一般音箱类产品使用。