Test Jeston AGX Xavier 40 pin DMIC functiuon

Hi

I’ve been trying to use my AGX to test 40 pin header on jetpack 4.5, I’m going to try Digital Mic on Pin16/Pin32, I used jetson-io to set those to DMIC DAT/CLK, and I connect device “Adafruit 3492” to my board, and use the example from [here]

Stereo Capture

This example shows how to capture stereo data from DMIC3 via ADMAIF<i>.
For Jetson AGX Xavier:
amixer -c <cardname> cset name="ADMAIF<i> Mux" DMIC3
#Gain must be tuned as per sensitivity of the external mic
amixer -c <cardname> cset name="DMIC3 Boost Gain" 400
arecord -D hw:<cardname>,<i-1> -r 48000 -c 2 -f S16_LE <out.wav>

After I did those command, I could not record my voice, and I got error message:

Oct 26 14:27:51 aaeon-desktop kernel: [  342.939788] tegra194-pinctrl 2430000.pinmux: pin CAN1_STB_PBB0 already requested by 2430000.pinmux; cannot claim for tegra210-dmic.2
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940062] tegra194-pinctrl 2430000.pinmux: pin-216 (tegra210-dmic.2) status -22
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940190] tegra194-pinctrl 2430000.pinmux: could not request pin 216 (CAN1_STB_PBB0) from group can1_stb_pbb0  on device 2430000.pinmux
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940388] tegra210-dmic tegra210-dmic.2: Error applying setting, reverse things back
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940515] tegra210-dmic tegra210-dmic.2: Setting dmic pinctrl active state failed
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940639] tegra210-dmic tegra210-dmic.2: ASoC: startup() failed: -22
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940744] tegra-asoc: sound: ASoC: PRE_PMU: c Capture-DMIC3 DMIC Receive event failed: -22
Oct 26 14:27:51 aaeon-desktop kernel: [  342.940886] tegra194-pinctrl 2430000.pinmux: pin CAN1_STB_PBB0 already requested by 2430000.pinmux; cannot claim for tegra210-dmic.2
Oct 26 14:27:51 aaeon-desktop kernel: [  342.941516] tegra194-pinctrl 2430000.pinmux: pin-216 (tegra210-dmic.2) status -22
Oct 26 14:27:51 aaeon-desktop kernel: [  342.942134] tegra194-pinctrl 2430000.pinmux: could not request pin 216 (CAN1_STB_PBB0) from group can1_stb_pbb0  on device 2430000.pinmux
Oct 26 14:27:51 aaeon-desktop kernel: [  342.943249] tegra210-dmic tegra210-dmic.2: Error applying setting, reverse things back
Oct 26 14:27:51 aaeon-desktop kernel: [  342.951521] tegra210-dmic tegra210-dmic.2: Setting dmic pinctrl active state failed
Oct 26 14:27:51 aaeon-desktop kernel: [  342.959217] tegra210-dmic tegra210-dmic.2: ASoC: startup() failed: -22
Oct 26 14:27:51 aaeon-desktop kernel: [  342.965501] tegra-asoc: sound: ASoC: PRE_PMU: DMIC3 DMIC Transmit-DMIC3 Receive event failed: -22
Oct 26 14:27:56 aaeon-desktop dhcpd[6715]: DHCPREQUEST for 192.168.55.100 from 76:41:2f:fe:91:e6 (edward-G750JXA) via l4tbr0
Oct 26 14:27:56 aaeon-desktop dhcpd[6715]: DHCPACK on 192.168.55.100 to 76:41:2f:fe:91:e6 (edward-G750JXA) via l4tbr0
Oct 26 14:28:00 aaeon-desktop kernel: [  352.107332] tegra194-pinctrl 2430000.pinmux: pin CAN1_STB_PBB0 already requested by 2430000.pinmux; cannot claim for tegra210-dmic.2
Oct 26 14:28:00 aaeon-desktop kernel: [  352.107620] tegra194-pinctrl 2430000.pinmux: pin-216 (tegra210-dmic.2) status -22
Oct 26 14:28:00 aaeon-desktop kernel: [  352.107770] tegra194-pinctrl 2430000.pinmux: could not request pin 216 (CAN1_STB_PBB0) from group can1_stb_pbb0  on device 2430000.pinmux
Oct 26 14:28:00 aaeon-desktop kernel: [  352.107997] tegra210-dmic tegra210-dmic.2: Error applying setting, reverse things back
Oct 26 14:28:00 aaeon-desktop kernel: [  352.108143] tegra210-dmic tegra210-dmic.2: Setting dmic pinctrl idle state failed
Oct 26 14:28:00 aaeon-desktop kernel: [  352.108292] tegra194-pinctrl 2430000.pinmux: pin CAN1_STB_PBB0 already requested by 2430000.pinmux; cannot claim for tegra210-dmic.2
Oct 26 14:28:00 aaeon-desktop kernel: [  352.108501] tegra194-pinctrl 2430000.pinmux: pin-216 (tegra210-dmic.2) status -22
Oct 26 14:28:00 aaeon-desktop kernel: [  352.108646] tegra194-pinctrl 2430000.pinmux: could not request pin 216 (CAN1_STB_PBB0) from group can1_stb_pbb0  on device 2430000.pinmux
Oct 26 14:28:00 aaeon-desktop kernel: [  352.109445] tegra210-dmic tegra210-dmic.2: Error applying setting, reverse things back
Oct 26 14:28:00 aaeon-desktop kernel: [  352.110052] tegra210-dmic tegra210-dmic.2: Setting dmic pinctrl idle state failed

Please give me some advice, thanks

Hi edward1_lin,

This is a known limitation and caused by double-time pinmux configuration(first from Jetson-IO, second time from DMIC driver).
You can use either one of the below solutions to resolve the issue

  1. After flashing BSP, avoid setting pinmux for DMIC via Jetson-IO and try stereo capture directly.

or

  1. Use below WAR

    1. Modify tegra_dmic3 node in file from public kernel sources: Linux_for_Tegra/source/public/hardware/nvidia/platform/tegra/common/kernel-dts/audio/tegra-platforms-audio-dmic3-5-switch.dtsi
      as per patch below
      diff --git a/tegra-platforms-audio-dmic3-5-switch.dtsi b/tegra-platforms-audio-dmic3-5-switch.dtsi
      index b6b1a62…3e65bca 100644
      — a/tegra-platforms-audio-dmic3-5-switch.dtsi
      +++ b/tegra-platforms-audio-dmic3-5-switch.dtsi
      @@ -50,7 +50,4 @@
      };
      &tegra_dmic3 {
      - pinctrl-names = “dap_active”, “dap_inactive”;
      - pinctrl-0 = <&dmic3_dap_active_state>;
      - pinctrl-1 = <&dmic3_dap_inactive_state>;
      };
      This modification avoids pinmux configuration from DMIC driver

    2. Recompile kernel-dtb and flash it for the WAR to take effect

    3. Use Jetson IO tool to set pinmux for DMIC3 usage and try stereo capture now

Thanks

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.