ReSpeaker 2-Mics Pi HAT Jetson Nano - Step 2 build dtbo & driver failed KBUILD

Hello,

I have Jetson Nano with Ubuntu 20.04.1 LTS.

I am experiencing ReSpeaker 2-Mics Pi HAT installation ERROR at step KBUILD as per instructions for Jetson Nano Ubuntu 18.04.

I have verified the location of /usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64 folder and it does contains folders … kernel-4.9, nvgpu, and nvidia, etc.

If anyone has any suggestions is greatly appreciated.

STEP 2. Build dtbo & driver

KBUILD=/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9 make all_jetsonnano

Building modules, stage 2.
MODPOST 1 modules
CC /root/seeed-linux-dtoverlays/modules/hcsr04/hcsr04.mod.o
LD [M] /root/seeed-linux-dtoverlays/modules/hcsr04/hcsr04.ko
LD /root/seeed-linux-dtoverlays/modules/CAN-HAT/built-in.o
CC [M] /root/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o
In file included from /root/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:
/root/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:15:10: fatal error: linux/can/rx-offload.h: No such file or directory
15 | #include <linux/can/rx-offload.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:336: /root/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o] Error 1
make[1]: *** [Makefile:1629: module/root/seeed-linux-dtoverlays/modules/CAN-HAT] Error 2
make: *** [Makefile:151: all_jetsonnano] Error 2

Please do rm -rf seeed-linux-dtoverlays/modules/CAN-HAT/ , then build again

That did the trick for the installation, thank you.

However, it appears the soundcard is not yet completely registered on the Jetson Nano.

When I issue command arecord -l, I do not see any listed devices.

**** List of CAPTURE Hardware Devices **** returns empty list.

When I issue command aplay -l, I see only the tegrahda device 3 from the HDMI monitor.

**** List of PLAYBACK Hardware Devices ****
card 0: tegrahda [tegra-hda], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Analyzing journalctl -b …
kernel: tegra-asoc: sound: ASoC: CODEC DAI wm8960-hifi not registered
kernel: tegra-asoc: sound: snd_soc_register_card failed (-517)
kernel: snd_soc_wm8960: loading out-of-tree module taints kernel.
kernel: wm8960 1-001a: Failed to issue reset
kernel: wm8960: probe of 1-001a failed with error -110

Analyzing /var/log/dmesg …
kernel: tegra-asoc: sound: ASoC: CODEC DAI wm8960-hifi not registered
kernel: tegra-asoc: sound: snd_soc_register_card failed (-517)
kernel: wm8960 1-001a: Failed to issue reset
kernel: wm8960: probe of 1-001a failed with error -110

In general, the following log appears, indicating that the hardware connection is incorrect.

kernel: wm8960 1-001a: Failed to issue reset
kernel: wm8960: probe of 1-001a failed with error -110

The sound card was the culprit, replaced with second sound card worked just fine.

I noticed the mic-L is accurate capturing sounds while the mic-R has lots of noises, it is not capturing sounds. In the app, set as mono and Left balance monitor.

Any ideas or suggestions?

For the far field microphone, it can record more sound and also record noise.