AGX orin to enable dmic on J30 (40pin header)

Hi ,
How can I enable the dmic on J30(pin16 , pin32) ? I use L4T 35.3.1 should I modify any device tree ?

hello jesse_lin,

are you saying Digital MICrophones?
you may refer to developer guide, Configuring the Jetson Expansion Headers to launch Jetson‑IO for pin configurations.

Hi Jerry,
Yes, I mean Digital microphones.
I did it but it didn’t work. Could you give me some tips?

Hi Jerry,

We launch Jetson‑IO and configure header pins manually to (16) dmic3_dat, and (32) dmic3_clk.

The DTB file /boot/kernel_tegra234-p3701-0000-p3737-0000-user-custom.dtb be modified and created.

We check /boot/extlinux/extlinux.conf, it switch to LABEL JetsonIO: FDT /boot/kernel_tegra234-p3701-0000-p3737-0000-user-custom.dtb

Reboot AGX Orin Dev-Kit. And confirm the boot option below:

L4TLauncher: Attempting Direct Boot
L4T boot options
0: primary kernel
1: Custom Header Config: <HDR40 User Custom [2023-04-12-102057]>
Press 0-1 to boot selection within 3.0 seconds.
Press any other key to boot default (Option: 1)

reference Examples: DMIC Audio Setup and Development — Jetson Linux Developer Guide documentation

amixer -c APE cset name="ADMAIF3 Mux" DMIC3
amixer -c APE cset name="DMIC3 Boost Gain Volume" 400
arecord -D hw:APE,2 -r 48000 -c 2 -f S16_LE out.wav

The out.wav is not empty, but no sound is recorded.

We measure (32) dmic3_clk pin, no clock output. It is abnormal.

Please give us some advice.
Thanks.

Hi indy.lin,
Can you please provide the log with the below commands after configuring pinmux with Jetson IO tool for DMIC3 pins as SFIO.

cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups
cat /sys/kernel/debug/clk/clk_summary

Please execute the above two commands when arecord was active.

Hi mkumard,

The logs are launch arecord -D hw:APE,2 -r 48000 -c 2 -f S16_LE out.wav, and open another terminal to cat it.

pinconf-groups.log (39.3 KB)
clk_summary.log (79.0 KB)

Hi indy.lin,
Seems the pin functionality got interchanged with the DTS config. Can you try applying the attached patch for jetson io tool operation.

Follow the below steps

  1. Apply attached dts change and do a krebuild
    jetsonio.patch (1.3 KB)
  2. Copy the generated “tegra234-p3737-0000-p3701-0000-hdr40.dtbo” file to target path "/boot/ "
  3. Perform Jetson-IO tool configuration for DMIC3 pinmux.
  4. Reboot the target and check DMIC capture.

If still there is an issue, please attach the output of “cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups”

Hi mkumard,

Apply the attached jetson-io patch file, and we can now measure (32) dmic3_clk pin with 3.07MHz.
clk_summary-new.log (79.0 KB)
pinconf-groups-new.log (39.3 KB)

But still, no sound is recorded.

We double-check dmic3_clk output high level, and it is only 340mv. it is too low.

But the DMIC(JRM-4737DT-A) we test needs input clk Min level is Vdd*0.65(2.145V).

Hi indy.lin,
Good that you can see clock output.

On the Voltage issue, Let me discuss internally with concerned team and get back to you soon.

Hi mkumard,

Thank your support, and we will wait for your discussion results.

Hi mkumard,
Please understand, this is an urgent case, do we have a chance to get the solution today?

Hi,

We are checking at our end. Meanwhile, require some information from you

  1. Could you share the circuit schematic of how you have connected DMIC to 40 pin header

  2. Also, try below

Configure DMIC3 pinmux via Jetson-IO
Start recording without connecting external DMIC
Probe DMIC CLK and share your observations

Thanks

Hi atalambedu,

Sorry for the late reply.

We double-check the R35.2.1 and R35.3.1 official Jetson Linux release packages.

Strange things happened, the CH1:dmic3_dat(16) and CH-2:dmic3_clk(32) became normal statuses after applying jetsonio.patch and regenerated tegra234-p3737-0000-p3701-0000-hdr40.dtbo suddenly.

Now we can record voice through DIMC.

But the other issue is the record sound volume is very low, and even if we set “amixer -c APE cset name=“DMIC3 Boost Gain Volume” 25000”

How can we finetune the DMIC volume gain?

Thanks for your support and for giving us further advice.

Hi indy.lin,

Was there any improvement after increasing volume gain at DMIC end with below command?

amixer -c APE cset name="DMIC3 Boost Gain Volume" 25000

There is one more volume control module available in Audio processing engine of Jetson, which can be added to the audio path through below commands. See if this helps

amixer -c APE cset name="MVC1 Mux" DMIC3
amixer -c APE cset name="ADMAIF3 Mux" MVC1
amixer -c APE cset name="MVC1 Vol" 12602 #Modify this as per your need
amixer -c APE cset name="DMIC3 Boost Gain Volume" 25599
amixer -c APE cset name="DMIC3 Audio Bit Format" 32
amixer -c APE cset name="MVC1 Audio Bit Format" 32
arecord -D hw:APE,2 -r 48000 -c 2 -f S16_LE out.wav

Thanks

Hi atalambedu,

The below command has very few improvements.

amixer -c APE cset name="DMIC3 Boost Gain Volume" 25000

There is no difference even if we set it to the below command.

amixer -c APE cset name="DMIC3 Boost Gain Volume" 1

But following your instruction, we added the extra MVC1 control module, which has a vast improvement.

Finally, we use the below controls parameter:

amixer -c APE cset name="MVC1 Mux" DMIC3
amixer -c APE cset name="ADMAIF1 Mux" MVC1
amixer -c APE cset name="MVC1 Volume" 15100

The recorded sound volume is acceptable for our present demo.

Thanks for your kind support.

Pleased to hear that you could resolve the issue.

Closing this issue

Thanks