Beaglebone AI I2S microphone

I am trying to capture sound from a Circular Microphone Board (TIDA-01454) in a Beaglebone AI. I have succesfully configured the ADCs of the CMB via I2C, and checked that the I2S output is working correctly with an ADC, and everything is fine.

However my next step is to capture this I2S into my Beaglebone AI in order to process it. I am new into this but I think I have configured the pins correctly following this guide and this document. So my show-pins is like this:

3qvHv

And my DTS file is like this:

    #include "am5729-beagleboneai.dts"  
    // make it easy to determine which dtb you're currently running on  
    // (via /proc/device-tree/chosen/)  
    / {  
     chosen {  
      base_dtb = "am5729-beagleboneai-custom.dts";  
      base_dtb_timestamp = __TIMESTAMP__;  
     };  
    };  
    // eventually these should be available in a header  
    #define P9_14  (0x3400 + 4 * 107)  
    #define P9_16  (0x3400 + 4 * 108)  
    #define P9_19a (0x3400 + 4 * 16)  
    #define P9_19b (0x3400 + 4 * 95)  
    #define P9_20a (0x3400 + 4 * 17)  
    #define P9_20b (0x3400 + 4 * 94)  
    #define P9_31b  (0x3400 + 4 * 169) 
    #define P9_29b (0x3400 + 4 * 170)
    #define P9_18b (0x3400 + 4 * 173)
    // 
    /{
    
    pcm5102a: pcm5102a {
       #sound-dai-cells = <0>;
       compatible = "ti,pcm5102a";
       status = "okay";
    };
    
    
    sound {compatible = "simple-audio-card";
            simple-audio-card,format = "i2s";
            simple-audio-card,name = "PCM5102a";
            simple-audio-card,bitclock-master = <&sound1_master>;
            simple-audio-card,frame-master = <&sound1_master>;
            simple-audio-card,bitclock-inversion;
            
            
            simple-audio-card,cpu {
                    sound-dai = <&mcasp1>;
            };
            sound1_master: simple-audio-card,codec {
                #sound-dai-cells = <0>;
                sound-dai = <&pcm5102a>;
                
            };
          };
    };
    
    // enable i2c-3 on P9.19 (scl) + P9.20 (sda)  
    &i2c4 {  
     status = "okay";  
     clock-frequency = <400000>;  
     pinctrl-names = "default";  
     pinctrl-0 = <&i2c4_pins>;  
    
    };
    
    &mcasp1 {
        #sound-dai-cells = <0>;
        status = "okay";
        pinctrl-names = "default";  
        pinctrl-0 = <&mcasp1_pins>;  
        op-mode = <0>;    /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        num-serializer = <4>;
        /* 16 serializers */
        serial-dir = < /* 1 TX 2 RX 0 unused */
                 2 0 0 0
            >;
        rx-num-evt = <1>;
        tx-num-evt = <1>;
    };  
    
    
    
    
    &dra7_pmx_core {  
     i2c4_pins: i2c4 {  
      pinctrl-single,pins = <  
       DRA7XX_CORE_IOPAD( P9_19a, PIN_INPUT_PULLUP | MUX_MODE7  )  // scl  
       DRA7XX_CORE_IOPAD( P9_19b, PIN_INPUT_PULLUP | MUX_MODE14 )  // (shared pin)  
       DRA7XX_CORE_IOPAD( P9_20a, PIN_INPUT_PULLUP | MUX_MODE7  )  // sda  
       DRA7XX_CORE_IOPAD( P9_20b, PIN_INPUT_PULLUP | MUX_MODE14 )  // (shared pin)  
      >;  
     };
     mcasp1_pins: mcasp1_pins {
      pinctrl-single,pins = <
       DRA7XX_CORE_IOPAD(P9_31b, PIN_INPUT | MUX_MODE0) // 31b 0  mcasp1_aclkx  BIT CLOCK
       DRA7XX_CORE_IOPAD(P9_29b, PIN_INPUT | MUX_MODE0) // 29b 0  mcasp1_fsx    FRAME SYNC
       DRA7XX_CORE_IOPAD(P9_18b, PIN_INPUT | MUX_MODE0) // 18b 0  mcasp1_axr0   I2S INPUT
      >;
     };  
    };  
    // enable pwm-2 on P9.14 (out-A) + P9.16 (out-B)  
    &epwmss2 {  
     status = "okay";  
    };  
    &ehrpwm2 {  
     status = "okay";  
     pinctrl-names = "default";  
     pinctrl-0 = <&ehrpwm2_pins>;  
    };  
    &dra7_pmx_core {  
     ehrpwm2_pins: ehrpwm2 {  
      pinctrl-single,pins = <  
       DRA7XX_CORE_IOPAD( P9_14, PIN_OUTPUT_PULLDOWN | MUX_MODE10 )  // out A  
       DRA7XX_CORE_IOPAD( P9_16, PIN_OUTPUT_PULLDOWN | MUX_MODE10 )  // out B  
      >;  
     };  
    };

However I think it doesn’t detect it as a capture device. Since the grep and arecord command return this:

  debian@beaglebone:/var/lib/cloud9$ dmesg |grep sound                                                      
    [    1.385258] asoc-simple-card sound: pcm5102a-hifi <-> 48460000.mcasp mapping ok
    debian@beaglebone:/var/lib/cloud9$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    debian@beaglebone:/var/lib/cloud9$

So what am I missing?

1 Like