Firefly开源社区

打印 上一主题 下一主题

[技术讨论] ROC-RK3308B-CC-PLUS_Buildroot_v1.5.0a 使用外部codec platform_name 为空

23

积分

0

威望

0

贡献

技术小白

积分
23

ROC-RK3308B-CC-PLUS_Buildroot_v1.5.0a 使用外部codec platform_name 为空

发表于 2023-8-9 15:00:48      浏览:3087 | 回复:0        打印      只看该作者   [复制链接] 楼主
  • 固件类型: 自行编译的固件
  • SDK包名称: rk3308_linux_release_v1.5.0a_20221212
  • SDK更新到哪个COMMIT: 0000-00-00 00:00:00
  • SDK修改内容: 在sound/soc/codecs 下增加驱动文件并配置Kconfig和Makefile,在对应DTS中增加新声卡
  • Log日志: log.rar
问题描述及复现步骤:
在DTS中增加:
                es7210_sound: es7210-sound {
                        status = "okay";
                        compatible = "simple-audio-card";
                        simple-audio-card,format = "i2s";
                        simple-audio-card,name = "rockchip,es7210";
                        simple-audio-card,mclk-fs = <256>;
                        simple-audio-card,cpu {
                                        sound-dai = <&i2s_8ch_0>;
                                };
                        simple-audio-card,codec {
                                        sound-dai = <&es7210>;
                                };                       
                };


&i2s_8ch_0 {
        status = "okay";
        rockchip,no-dmaengine;
        #sound-dai-cells = <0>;
};


&i2s_8ch_1 {
        status = "okay";
        #sound-dai-cells = <0>;
        rockchip,no-dmaengine;
        pinctrl-names = "default";
        pinctrl-0 = <&i2s_8ch_1_m0_sclktx
                     &i2s_8ch_1_m0_lrcktx
                     &i2s_8ch_1_m0_sdo0
                     &i2s_8ch_1_m0_mclk>;
};



&i2c3 {
        status = "okay";
        pinctrl-0 = <&i2c3m1_xfer>;
        clock-frequency = <100000>;
       
        es7210: es7210@41 {
                #sound-dai-cells = <0>;
                compatible = "MicArray_3";
                reg = <0x41>;
                clocks = <&cru SCLK_I2S0_8CH_TX_OUT>;
                clock-names = "mclk";
                pinctrl-names = "default";

        };
};

驱动等已正常编译加载,但无法正常生成声卡,log提示platform name 为空,仔细跟踪后发现没有调用过snd_soc_register_platform函数,不知道在哪里增加这部分。
[    1.591878] snd-soc-dummy snd-soc-dummy: snd_soc_dummy_probe
[    1.591899] snd-soc-dummy snd-soc-dummy: codec register snd-soc-dummy
[    1.591923] snd-soc-dummy snd-soc-dummy: ASoC: dai register snd-soc-dummy #1
[    1.591939] snd-soc-dummy snd-soc-dummy: ASoC: Registered DAI 'snd-soc-dummy-dai'
[    1.591954] snd-soc-dummy snd-soc-dummy: ASoC: Registered codec 'snd-soc-dummy'
[    1.591967] snd-soc-dummy snd-soc-dummy: ASoC: platform register snd-soc-dummy
[    1.591981] snd-soc-dummy snd-soc-dummy: ASoC: snd_soc_add_platform '(null)'
[    1.591997] snd-soc-dummy snd-soc-dummy: ASoC: Registered platform 'snd-soc-dummy'
[    1.592658] asoc-simple-card es7210-sound: New simple-card: rockchip,es7210
[    1.592697] asoc-simple-card es7210-sound: Revert to legacy daifmt parsing
[    1.594614] rockchip-i2s-tdm ff300000.i2s: devm_snd_soc_register_component
[    1.594653] rockchip-i2s-tdm ff300000.i2s: ASoC: dai register ff300000.i2s #1
[    1.594671] rockchip-i2s-tdm ff300000.i2s: ASoC: Registered DAI 'ff300000.i2s'
[    1.595501] rockchip-i2s-tdm ff310000.i2s: devm_snd_soc_register_component
[    1.595535] rockchip-i2s-tdm ff310000.i2s: ASoC: dai register ff310000.i2s #1
[    1.595553] rockchip-i2s-tdm ff310000.i2s: ASoC: Registered DAI 'ff310000.i2s'


[    1.623008] es7210_modinit enter
[    1.623106] mmc_host mmc0: Bus speed (slot 0) = 147456000Hz (slot req 150000000Hz, actual 147456000HZ div = 0)
[    1.623174] begin->>>>>>>>>>es7210_i2c_probe!
[    1.623186] i2c info: i2c flags = 0 i2c addr=41 i2c name=MicArray_3
[    1.623194] i2c info:device id = MicArray_3
[    1.623209] es7210 3-0041: codec register 3-0041
[    1.623243] es7210 3-0041: ASoC: dai register 3-0041 #1
[    1.623255] es7210 3-0041: ASoC: Registered DAI 'ES7210 4CH ADC 3'
[    1.623269] es7210 3-0041: ASoC: Registered codec 'es7210.3-0041'
[    1.623656] asoc-simple-card es7210-sound: New simple-card: rockchip,es7210
[    1.623691] asoc-simple-card es7210-sound: Revert to legacy daifmt parsing
[    1.623889] asoc-simple-card es7210-sound:   name : ff300000.i2s-ES7210 4CH ADC 3
[    1.623904] asoc-simple-card es7210-sound:   format : 4001
[    1.623915] asoc-simple-card es7210-sound:   cpu : ff300000.i2s / 50176000
[    1.623926] asoc-simple-card es7210-sound:   codec : ES7210 4CH ADC 3 / 50176000
[    1.623939] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/es7210-sound[0]'
[    1.623950] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/es7210-sound[0]'
[    1.623971] asoc-simple-card es7210-sound: ASoC: binding ff300000.i2s-ES7210 4CH ADC 3 at idx 0
[    1.623985] asoc-simple-card es7210-sound: platform_name: (null)
[    1.623997] asoc-simple-card es7210-sound: platform_name: (null) platform->component.name:snd-soc-dummy
[    1.624009] asoc-simple-card es7210-sound: ASoC: platform (null) not registered



log.rar

9.79 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表