Notes de débogage audio RK3588-ES8388

1. Introduction

  • Cet article est basé sur la plate-forme RK3588, résumé de débogage de la puce audio ES8388.
  • Carte son externe : ES8388

2. Débogage audio ES8388

2.1 Présentation du débogage, analyse des étapes de débogage

  • Étape ① configuration dts
  • Étape ② Compiler, programmer et déboguer

configuration 2.2 dts

  • Configuration du son système :
    es8388_sound: es8388-sound {
          
          
            status = "okay";
            compatible = "rockchip,multicodecs-card";
            rockchip,card-name = "rockchip-es8388";
            hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
            io-channels = <&saradc 3>;
            io-channel-names = "adc-detect";
            keyup-threshold-microvolt = <1800000>;
            poll-interval = <100>;
            spk-con-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
            hp-con-gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
            rockchip,format = "i2s";
            rockchip,mclk-fs = <256>;
            rockchip,cpu = <&i2s0_8ch>;
            rockchip,codec = <&es8388>;
            rockchip,audio-routing =
                "Headphone", "LOUT1",
                "Headphone", "ROUT1",
                "Speaker", "LOUT2",
                "Speaker", "ROUT2",
                "Headphone", "Headphone Power",
                "Headphone", "Headphone Power",
                "Speaker", "Speaker Power",
                "Speaker", "Speaker Power",
                "LINPUT1", "Main Mic",
                "LINPUT2", "Main Mic",
                "RINPUT1", "Headset Mic",
                "RINPUT2", "Headset Mic";
            pinctrl-names = "default";
            pinctrl-0 = <&hp_det>;
            play-pause-key {
          
          
                label = "playpause";
                linux,code = <KEY_PLAYPAUSE>;
                press-threshold-microvolt = <2000>;
            };
        };
    
  • Configuration du pilote de périphérique ES8388
    &i2c7 {
          
          
        status = "okay";
        es8388: es8388@11 {
          
          
            status = "okay";
            #sound-dai-cells = <0>;
            compatible = "everest,es8388", "everest,es8323";
            reg = <0x11>;
            clocks = <&cru I2S0_8CH_MCLKOUT>;
            clock-names = "mclk";
            assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
            assigned-clock-rates = <12288000>;
            pinctrl-names = "default";
            pinctrl-0 = <&i2s0_mclk>;
        };
    };
    

2.3 Compiler, graver, déboguer

  • Afficher les commandes de la carte son :cat /proc/asound/cards
    insérez la description de l'image ici

  • Copiez le fichier wav sur la carte :

    adb root
    adb remount
    adb push C:\adb\test.wav mnt
    
  • Écoutez de la musique sur RK Android (RK Android SDK est livré en standard avec l'outil Tiny-alsa) :

    adb shell
    cd /mnt
    tinyplay ./test.wav -D 0 -d 0
    
  • Enregistrement Android RK :

    tinycap /sdcard/test.wav 
    
    播放录音
    cd /sdcard
    tinyplay ./test.wav -D 0 -d 0
    
  • RK Linux pour jouer de la musique (RK Linux SDK est livré en standard avec l'outil alsa-utils)

     aplay  test.wav
    

    ou

    aplay -Dplughw:0,0 test.wav
    
    aplay -Dplughw:1,0 test.wav
    
    aplay -Dplughw:2,0 test.wav
    
    -Dplughw:x  表示指定第几个声卡
    

    ou

    aplay -D plughw:CARD=rockchipes8388 test.wav
    
  • Enregistrement RK Linux

    arecord -D hw:1,0 -d 10 -f cd -r 44100 -c 2 -t wav test.wav
    
    -d 10表示录制10秒声音,test.wav是保存的文件名称
    
    -D hw:x  表示指定第几个声卡
    
    -r 指定采样率,-f 指定每个采样点的位数--样本大小
    
    

Je suppose que tu aimes

Origine blog.csdn.net/weixin_44710103/article/details/128883163
conseillé
Classement