This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM68: Audio Support

Part Number: PROCESSOR-SDK-AM68
Other Parts Discussed in Thread: AM68A

Tool/software:

I saw that audio support has been added in the latest version of the SDK. I have a requirement of configuring mics on the board. How would I go about implementing this?

  • Hi Faheem,

    You would need to add the microphones to the device tree and enable the microphone drivers within the kernel config.

    You can look at the yaml file of the microphone for the microphone's node, and the k3-j721s2-common-proc-board.dts for inspiration on the McASP nodes.

    You will have to create your own McASP node based on the pins within the 40-pin header on the SK board (if you are using the SK board).

    Best,
    Jared

  • Hi Jared,
    I followed your steps and loaded the modules and drivers for the mic but it isn't being detected as a device when I type out arecord -l. Is there a more detailed explanation or references available?

  • Hi Faheem,

    Can you post your dmesg logs as well as your device tree?

    Your mic not enumerating could be due to many different issues.

    Best,
    Jared

  • I am using the TI AM68A controller and need to connect 5 microphones to the board. How can I implement this simply, and which type of microphone is suitable?

  • Hi Mohammed,

    I assume this is your custom board as we don't have 5 microphones pinned out on the SK-AM68A.

    The easiest way to accomplish this would be to connect 5 I2S microphones to the 5 separate McASP modules.

    The McASP nodes support Time-Division Multiplexed (TDM) streams, Inter-IC Sound (I2S) protocols, and Digital audio Interface Transmission (DIT). More details can be found within the TRM.

    You can also read the McASP design guide as well.

    Best,
    Jared

  • How many microphones can be directly connected to the 40-pin header on the SK board, and how should they be connected? Can you provide the steps?

  • Hi Mohammed,

    1 McASP device can be connected to the 40-pin header on the SK board. The pins are listed in the user guide: https://www.ti.com/lit/ug/spruj68/spruj68.pdf

    After that, you'll need to follow the steps I sent above:

    You would need to add the microphones to the device tree and enable the microphone drivers within the kernel config.

    You can look at the yaml file of the microphone for the microphone's node, and the k3-j721s2-common-proc-board.dts for inspiration on the McASP nodes.

    You will have to create your own McASP node based on the pins within the 40-pin header on the SK board (if you are using the SK board).

    Best,
    Jared

  • Hi Jared McArthur,

    Can I connect 5 microphones to the 40-pin header on the SK board ? if yes which method ? can i use TDM method ?

  • Hi Mohammed,

    TDM supports daisy chaining, so if you had microphones that support TDM, it would be possible.

    We don't have any examples of this though.

    Best,
    Jared

  • Hi Jared,

    Thank you for your response.

    This is not a custom board—I am using the standard AM68A development board. As you mentioned, the SK board has only one microphone pinout via the 40-pin expansion header, which limits direct connectivity for multiple microphones.

    However, I understand that the AM68A features five McASP modules, and you suggested connecting 5 I2S microphones to these separate McASP instances. My question is: does this mean each microphone should be connected to a different McASP module, such as MCASP0 to MCASP4?

    From the TRM, I noted the following serializer configurations:

    • MCASP0: 16 serializers

    • MCASP1: 5 serializers

    • MCASP2: 5 serializers

    • MCASP3: 3 serializers

    • MCASP4: 5 serializers

    Could you please clarify what "serializers" refer to in this context? My understanding is that serializers can be configured as transmitters or receivers and handle serial audio streams. How do these serializers relate to connecting microphones?

    Additionally, since only one McASP signal appears to be exposed via the 40-pin header, how can we access other McASP modules practically on the SK board? Is it possible through additional expansion connectors or configuration?

    Lastly, I’ve also explored the idea of connecting 5 microphones to a single I2S pin using a daisy-chain method . Could you please elaborate on the differences between using 5 McASP modules versus daisy-chaining over a single I2S?

  • Hi Mohammed,

    My question is: does this mean each microphone should be connected to a different McASP module, such as MCASP0 to MCASP4?

    This would be the most simple setup.

    Could you please clarify what "serializers" refer to in this context? My understanding is that serializers can be configured as transmitters or receivers and handle serial audio streams. How do these serializers relate to connecting microphones?

    The serializers are essentially the number of lines that you can connect to each McASP modules. MCASP0 could hypothetically handle 16 channel audio. They can be set as receivers or transmitters.

    If you had a two channel speaker, you could attach 2 serializers to the speaker for stereo sound.

    Additionally, since only one McASP signal appears to be exposed via the 40-pin header, how can we access other McASP modules practically on the SK board? Is it possible through additional expansion connectors or configuration?

    It isn't practical to access the other McASP modules.

    Lastly, I’ve also explored the idea of connecting 5 microphones to a single I2S pin using a daisy-chain method . Could you please elaborate on the differences between using 5 McASP modules versus daisy-chaining over a single I2S?

    The difference, is that each McASP module would handle a separate microphone. This is relatively simple to accomplish in the device tree, and each mic would enumerate as a separate device.

    With the daisy chained method, one McASP will handle the microphones. I haven't seen any examples of daisy-chained I2S devices in the device tree, but it should be possible; I just haven't seen it.

    Best,
    Jared

  • The serializers are essentially the number of lines that you can connect to each McASP modules. MCASP0 could hypothetically handle 16 channel audio. They can be set as receivers or transmitters.

    If you had a two channel speaker, you could attach 2 serializers to the speaker for stereo sound

    Sure! Here's a corrected and clear version of your paragraph with improved grammar and clarity:


    Hi Jared McArthur ,



    According to the reference document SPRJU68, the 40-pin expansion header on the AM68A board provides access to the following McASP1 pins:

    Pin No Pin Name Description Dir
    12 I2S_SCLK McASP #1 ACLKX (AA24)    Bi-Dir
    35 I2S_FS McASP #1 FSX (V28)     Bi-Dir
    38 I2S_DIN McASP #1 AXR (T28)     Bi-Dir
    40 I2S_DOUT McASP #1  AXR (U25)     Bi-Dir

    So, my question is:

    Does this mean that only one microphone can be directly connected through the available I2S/McASP1 signals on the 40-pin header?

    However, I want to connect five microphones. I read that McASP1 supports 5 AXR pins (serial data lines). Is it possible to configure additional AXR pins through the 40-pin expansion header? 

    Can you provide an explanation or any document on how to configure the McASP module on the 40-pin header?

    According to the GPIO mapping table, I found that the following additional AXR pins from McASP0 are mapped to the 40-pin header:

    McASP Pin GPIO Function Direction Remarks
    MCASP0_AXR8 GPIO0_36 40pin Expansion Header Signal (GPIO) Bi-dir Expansion Board Specific (Pin 13)                           
    MCASP0_AXR13 GPIO0_41 40pin Expansion Header Signal (GPIO) Bi-dir Expansion Board Specific (Pin 36)
    MCASP0_AXR14 GPIO0_42 40pin Expansion Header Signal (GPIO) Bi-dir Expansion Board Specific (Pin 11)

    So, my question is:

    Can I configure McASP0 with these 3 AXR pins (AXR8, AXR13, AXR14) from the 40-pin header, and use them to connect 3 microphones?

    If yes, is it also possible to use McASP1 and McASP0 simultaneously via the 40-pin header — so that I can connect more than one microphone (e.g., 5 microphones total)?

    Please confirm if this is possible, and how the configuration would work.

    iam using an EVM board,





  • Hi Mohammed,

    Does this mean that only one microphone can be directly connected through the available I2S/McASP1 signals on the 40-pin header?

    Yes, unless you daisy chain the microphones.

    However, I want to connect five microphones. I read that McASP1 supports 5 AXR pins (serial data lines). Is it possible to configure additional AXR pins through the 40-pin expansion header? 

    No, there are no more MCASP1 AXR pins pinned out to the 40-pin expansion header.

    Can you provide an explanation or any document on how to configure the McASP module on the 40-pin header?

    You need to set the pinmuxing, codec, and mcasp settings to attach a microphone. You can look at the k3-j721s2-common-proc-board.dts for an example.

    ...
    
    	codec_audio: sound {
    		compatible = "ti,j7200-cpb-audio";
    		model = "j721e-cpb";
    
    		ti,cpb-mcasp = <&mcasp4>;
    		ti,cpb-codec = <&pcm3168a_1>;
    
    		clocks = <&k3_clks 213 0>, <&k3_clks 213 1>,
    			 <&k3_clks 157 299>, <&k3_clks 157 328>;
    		clock-names = "cpb-mcasp-auxclk", "cpb-mcasp-auxclk-48000",
    			      "cpb-codec-scki", "cpb-codec-scki-48000";
    	};
    
    ...
    
        mcasp4_pins_default: mcasp4-default-pins {
        	pinctrl-single,pins = <
        		J721S2_IOPAD(0x0c8, PIN_OUTPUT_PULLDOWN, 1) /* (AD28) MCASP4_ACLKX */
        		J721S2_IOPAD(0x06c, PIN_OUTPUT_PULLDOWN, 1) /* (V26) MCASP4_AFSX */
        		J721S2_IOPAD(0x068, PIN_INPUT_PULLDOWN, 1) /* (U28) MCASP4_AXR1 */
        		J721S2_IOPAD(0x0c4, PIN_OUTPUT_PULLDOWN, 1) /* (AB26) MCASP4_AXR2 */
        		J721S2_IOPAD(0x070, PIN_OUTPUT_PULLDOWN, 1) /* (R27) MCASP4_AXR3 */
        	>;
        };
    
    ...
    
    &mcasp4 {
    	status = "okay";
    	#sound-dai-cells = <0>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mcasp4_pins_default>;
    	op-mode = <0>;          /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    	auxclk-fs-ratio = <256>;
    	serial-dir = <	/* 0: INACTIVE, 1: TX, 2: RX */
    		0 2 1 1
    		0 0 0 0
    		0 0 0 0
    		0 0 0 0
    	>;
    };
    
    

    Your pinmuxing, codec, and mcasp settings will be different, but the general process is the same.

    Can I configure McASP0 with these 3 AXR pins (AXR8, AXR13, AXR14) from the 40-pin header, and use them to connect 3 microphones?

    No. You don't have the clock or frame sync lines connected to the microphones.

    Best,
    Jared