当前位置:   article > 正文

rk3588 I2S调试

rk3588 I2S调试

1、audio out I2S dts config

  1. &i2s1_8ch {
  2. #sound-dai-cells = <0>;
  3. pinctrl-0 = <&i2s1m0_lrck
  4. &i2s1m0_sclk
  5. &i2s1m0_mclk
  6. &i2s1m0_sdo0>;
  7. status = "okay";
  8. };
  9. dummy_codec: dummy-codec {
  10. compatible = "rockchip,dummy-codec";
  11. #sound-dai-cells = <0>;
  12. //clocks = <&cru SCLK_I2S1_8CH_TX_OUT>;
  13. clock-names = "mclk";
  14. assigned-clocks = <&cru I2S1_8CH_MCLKOUT>;
  15. assigned-clock-rates = <12288000>;
  16. pinctrl-names = "default";
  17. };
  18. i2s1_sound: i2s1-sound {
  19. compatible = "simple-audio-card";
  20. simple-audio-card,name = "rockchip-i2s-sound";
  21. status = "okay";
  22. simple-audio-card,format = "i2s";
  23. simple-audio-card,mclk-fs = <256>;
  24. simple-audio-card,cpu {
  25. sound-dai = <&i2s1_8ch>;
  26. };
  27. simple-audio-card,codec {
  28. sound-dai = <&dummy_codec>;
  29. };
  30. };

2、audio  in I2S dts config

  1. lkes7243 {
  2. compatible = "rockchip,lkes7243";
  3. pinctrl-0 = <&lkencodeic_pins>;
  4. es_sda = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
  5. es_scl = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>;
  6. status = "okay";
  7. };
  8. &i2s0_8ch {
  9. status = "okay";
  10. pinctrl-0 = <&i2s0_lrck
  11. &i2s0_sclk
  12. &i2s0_sdi0
  13. &i2s0_mclk>;
  14. };
  15. es7243e_codec: es7243e-codec {
  16. compatible = "rockchip,dummy-codec";
  17. #sound-dai-cells = <0>;
  18. clock-names = "mclk";
  19. assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
  20. assigned-clock-rates = <12288000>;
  21. pinctrl-names = "default";
  22. };
  23. es7243e_i2s0_sound: es7243e-i2s0-sound {
  24. status = "okay";
  25. compatible = "simple-audio-card";
  26. simple-audio-card,format = "i2s";
  27. simple-audio-card,mclk-fs = <256>;
  28. simple-audio-card,name = "rockchip,es7243e";
  29. simple-audio-card,dai-link@0 {
  30. format = "i2s";
  31. cpu {
  32. sound-dai = <&i2s0_8ch>;
  33. };
  34. codec {
  35. sound-dai = <&es7243e_codec>;
  36. };
  37. };
  38. };

3、硬件分析

audio in和 audio out的i2s都是直连的,所以本质上配置i2s并无区别,使用的是模拟的iic,es7243初始化一次之后就不用了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/978363
推荐阅读
  

闽ICP备14008679号