固件类型:自行编译的固件
SDK包名称:rk3399_linux_release_v2.5.1_20210301_split_dir
SDK修改内容:设备树增加dummy-codec节点,使用I2S0
Log日志:i2s的开机日志.zip
需求:使用I2S0播放声音。
在设备树中增加dummy-codec和simple-audio-card节点,内核配置增加CONFIG_SND_SOC_DUMMY_CODEC=y,
重新编译SDK后,I2S0的几个引脚都有输出,但是播放无声,使用示波器观察I2S_CLK发现波形很不标准,应该是I2S_CLK波形不标准导致无正常播放声音。
载板使用是官方载板。
请问这个问题应该如何解决,以下是示波器拍照图片和设备树文件。
/dts-v1/;
#include “rk3399-firefly-port.dtsi”
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/display/media-bus-format.h>
/ {
test-power {
status = “okay”;
};
rt5640-sound {
status = "disabled";
simple-audio-card,cpu {
sound-dai = <&i2s1>;
};
simple-audio-card,codec {
sound-dai = <&rt5640>;
};
};
adc-keys {
compatible = "adc-keys";
io-channels = <&saradc 1>;
io-channel-names = "buttons";
poll-interval = <300>;
keyup-threshold-microvolt = <1800000>;
esc-key {
linux,code = <KEY_ESC>;
label = "esc";
press-threshold-microvolt = <0>;
};
};
fan_ctl: fan-ctl-regulator {
compatible = "regulator-fixed";
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio3 10 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
regulator-name = "fan_ctl";
pinctrl-0 = <&fan_drv>;
};
NPU5801_PWR_EN: HUB20-PWR-EN {
compatible = "regulator-fixed";
enable-active-high;
regulator-always-on;
regulator-boot-on;
gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&npu5801_pwr_en>;
regulator-name = "vcc5v0_5801_en";
status = "okay";
};
dummy_codec: dummy-codec {
compatible = "rockchip,dummy-codec";
#sound-dai-cells = <0>;
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
pinctrl-names = "default";
pinctrl-0 = <&i2s_8ch_mclk>;
status = "okay";
};
dummy-sound {
status = "okay";
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "rockchip,dummy-codec";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&i2s0>;
};
simple-audio-card,codec {
sound-dai = <&dummy_codec>;
};
};
};
&gmac {
/delete-property/ snps,force_thresh_dma_mode;
tx_delay = <0x2F>;
rx_delay = <0x1E>;
};
&vcc_sd_h {
rockchip,pins = <1 22 RK_FUNC_GPIO &pcfg_pull_up>;
};
&vcc_sd {
gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
};
&hdmi_dp_sound {
status = “okay”;
};
&i2c2 {
status = “disabled”;
i2c-scl-rising-time-ns = <300>;
i2c-scl-falling-time-ns = <15>;
sensor@4c {
status = "disabled";
compatible = "gs_mc3230";
reg = <0x4c>;
type = <SENSOR_TYPE_ACCEL>;
irq_enable = <0>;
poll_delay_ms = <30>;
layout = <1>;
};
};
&rt5640 {
hp-det-adc-value = <900>;
aux-det-adc-value = <900>;
hp-con-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>;
io-channels = <&saradc 3>,<&saradc 2>;
io-channel-names = “hp-det”,“aux-det”;
status = “disabled”;
};
&rt5640_hpcon{
rockchip,pins = <3 16 RK_FUNC_GPIO &pcfg_pull_none>;
};
&vcca1v8_codec {
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
};
&spi1 {
dev-port = <0>;
status = “okay”;
};
&spi_wk2xxx {
status = “okay”;
reset-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
irq-gpio = <&gpio2 8 IRQ_TYPE_EDGE_FALLING>;
cs-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
};
&vcc3v3_3g {
gpio = <&gpio2 28 GPIO_ACTIVE_HIGH>;
};
&vcc3v3_pcie {
/delete-property/ gpio;
};
&pcie0 {
ep-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
};
&uart4 {
status = “disabled”;
};
&dp_in_vopb {
status = “disabled”;
};
&hdmi_in_vopl {
status = “disabled”;
};
&wdt {
status = “disabled”;
};
&io_domains {
bt656-supply = <&vcc_3v0>;
};
&vcc2v8_dvp {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
&vcca1v8_codec {
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <900000>;
};
&fusb0 {
status = “disabled”;
};
&cdn_dp {
status = “disabled”;
};
&tcphy0 {
/delete-property/ extcon;
status = “okay”;
};
&u2phy0 {
status = “okay”;
/delete-property/ extcon;
u2phy0_otg: otg-port {
rockchip,vbus-always-on;
vbus-5v-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};
&usbdrd3_0 {
status = “okay”;
/delete-property/ extcon;
};
&usbdrd_dwc3_0 {
dr_mode = “host”;
};
&route_hdmi {
status = “okay”;
};
&rk808 {
/delete-property/ pmic,stby-gpio;
/delete-property/ pmic,hold-gpio;
};
&vcc_mipi {
status = “okay”;
};
&dvdd_1v2 {
status = “okay”;
};
&ov13850 {
pwdn-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
status = “okay”;
};
&ov13850_1 {
pwdn-gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
status = “okay”;
};
&rkisp1_0 {
status = “okay”;
};
&mipi_dphy_rx0 {
status = “okay”;
};
&isp0_mmu {
status = “okay”;
};
&rkisp1_1 {
status = “okay”;
};
&mipi_dphy_tx1rx1 {
status = “okay”;
};
&isp1_mmu {
status = “okay”;
};
&pinctrl {
pinctrl-names = “default”;
pinctrl-0 = <&host_hub_vcc>;
npu_pwr_en {
// control VCC5V0_HOST3
npu5801_pwr_en: npu5801-pwr-en {
rockchip,pins =
<0 2 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
host-hub-vcc {
host_hub_vcc: host-hub-vcc {
rockchip,pins =
<2 4 RK_FUNC_GPIO &pcfg_output_high>,
<4 29 RK_FUNC_GPIO &pcfg_output_high>;
};
};
pcie {
pcie_3g_drv: pcie-3g-drv {
rockchip,pins =
<2 6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
vcc_sd {
vcc_sd_h: vcc-sd-h {
rockchip,pins =
<1 22 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
fan-ctl {
fan_drv: fan-drv {
rockchip,pins = <3 10 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
tchip_askquestions
i2s的开机日志.zip (20.8 KB)
rk3399-firefly-aiojd4.zip (1.75 KB)


