Respeaker 2 MiC hat: Does it support Jetson Nano or is that in the roadmap

If Jeston nano supports respeaker 4mic, what would you most like to do? How much of an improvement does this app have over 2mic? @ismailryt

how about using a Respeaker USB mic array? It is plug and play. if that works for your project?

Oh great, actually im asking because i already have 4 mic array.

Sure then, im gonna buy and try this one thanks

Thanks for you implementation @turmary :clap:

However I couldn’t get the installation working with your instructions. Do you know what might happen ? , here is what I did:

nano@jetson:~$ cd; git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
Cloning into 'seeed-linux-dtoverlays'...
remote: Enumerating objects: 945, done.
remote: Counting objects: 100% (945/945), done.
remote: Compressing objects: 100% (689/689), done.
remote: Total 945 (delta 335), reused 819 (delta 224), pack-reused 0
Receiving objects: 100% (945/945), 1.55 MiB | 192.00 KiB/s, done.
Resolving deltas: 100% (335/335), done.
nano@jetson:~$ cd seeed-linux-dtoverlays/
nano@jetson:~/seeed-linux-dtoverlays$ ls
COPYING  debian  Documentation  dtc-overlay.sh  examples  extras  include  Makefile  modules  ov
nano@jetson:~/seeed-linux-dtoverlays$ export CUSTOM_MOD_FILTER_OUT="lis3lv02d mcp25xxfd gt9xx se
nano@jetson:~/seeed-linux-dtoverlays$ KBUILD=/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aa
ls: cannot access '/lib/modules/4.9.140-tegra/extra/seeed': No such file or directory
ls: cannot access 'overlays/bb/*.dtbo': No such file or directory
ls: cannot access '/lib/modules/4.9.140-tegra/extra/seeed': No such file or directory
ls: cannot access 'overlays/bb/*.dtbo': No such file or directory
  DTC     overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo
  LD      /home/nano/seeed-linux-dtoverlays/modules/p9813/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/p9813/p9813.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/p9813/p9813.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/p9813/p9813.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/jtsn-wm8960/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/jtsn-wm8960/snd-soc-wm8960.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/jtsn-wm8960/snd-soc-wm8960.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/jtsn-wm8960/snd-soc-wm8960.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/hd44780/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/hd44780/hd44780-i2c.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/hd44780/hd44780-dev.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/mpr121/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121_touchkey.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121.o
  Building modules, stage 2.
  MODPOST 2 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121.ko
  CC      /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121_touchkey.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/mpr121/mpr121_touchkey.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/bme280/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/bme280/bme280.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/bme280/bme280.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/bme280/bme280.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/sht3x/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/sht3x/sht3x.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/sht3x/sht3x.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/sht3x/sht3x.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/e-ink/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.o
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c: In function β€˜eink_tty_write’:
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:90:37: warning: passing argument 4 of
  return kernel_write(f, buf, count, &pos);
                                     ^
In file included from /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:16:0:
./include/linux/fs.h:2758:16: note: expected β€˜loff_t {aka long long int}’ but argument is of typ
 extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t);
                ^~~~~~~~~~~~
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c: In function β€˜eink_tty_read’:
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:146:23: warning: passing argument 2 o
    if (kernel_read(f, &ch, 1, &pos) == 1) {
                       ^
In file included from /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:16:0:
./include/linux/fs.h:2751:12: note: expected β€˜loff_t {aka long long int}’ but argument is of typ
 extern int kernel_read(struct file *, loff_t, char *, unsigned long);
            ^~~~~~~~~~~
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:146:28: warning: passing argument 3 o
    if (kernel_read(f, &ch, 1, &pos) == 1) {
                            ^
In file included from /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:16:0:
./include/linux/fs.h:2751:12: note: expected β€˜char *’ but argument is of type β€˜int’
 extern int kernel_read(struct file *, loff_t, char *, unsigned long);
            ^~~~~~~~~~~
/home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:146:31: warning: passing argument 4 o
    if (kernel_read(f, &ch, 1, &pos) == 1) {
                               ^
In file included from /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.c:16:0:
./include/linux/fs.h:2751:12: note: expected β€˜long unsigned int’ but argument is of type β€˜loff_t
 extern int kernel_read(struct file *, loff_t, char *, unsigned long);
            ^~~~~~~~~~~
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/e-ink/eink-tty.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/hcsr04/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/hcsr04/hcsr04.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/hcsr04/hcsr04.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/hcsr04/hcsr04.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/adxl34x/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.o
  Building modules, stage 2.
  MODPOST 2 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.ko
  CC      /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.mod.o
  LD [M]  /home/nano/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.ko
  LD      /home/nano/seeed-linux-dtoverlays/modules/vl53l0x/built-in.o
  CC [M]  /home/nano/seeed-linux-dtoverlays/modules/vl53l0x/vl53l0x.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/nano/seeed-linux-dtoverlays/modules/vl53l0x/vl53l0x.mod.o
  LD [M]  /home/nano/seeed-linux-dtoerlays/modules/vl53l0x/vl53l0x.ko
[sudo] password for nano:
ls: cannot access '/lib/modules/4.9.140-tegra/extra/seeed': No such file or directory
ls: cannot access 'overlays/bb/*.dtbo': No such file or directory
ls: cannot access '/lib/modules/4.9.140-tegra/extra/seeed': No such file or directory
ls: cannot access 'overlays/bb/*.dtbo': No such file or directory
mkdir -p /lib/firmware/
cp -v overlays/jetsonnano/*.dtbo /lib/firmware/
'overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo' -> '/lib/firmware/jetson-seeed-2mic-wm8960.d
mkdir -p /lib/modules/4.9.140-tegra/extra/seeed || true
nano@jetson:~/seeed-linux-dtoverlays$ ls overlays/bb/
BB-GPIO-GROVE-BUTTON.dts  BB-GPIO-HCSR04.dts  BB-I2C1-ADXL34X.dts  BB-I2C1-JHD1802.dts  BB-I2C2-
BB-GPIO-GROVE-LED.dts     BB-GPIO-P9813.dts   BB-I2C1-BME280.dts   BB-I2C2-ADXL34X.dts  BB-I2C2-
nano@jetson:~/seeed-linux-dtoverlays$ ls overlays/bb/*.dtbo
ls: cannot access 'overlays/bb/*.dtbo': No such file or directory
nano@jetson:~/seeed-linux-dtoverlays$ ls overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo
overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo
nano@jetson:~/seeed-linux-dtoverlays$ sudo cp overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo
nano@jetson:~/seeed-linux-dtoverlays$ sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "Seeed
Traceback (most recent call last):
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 64, in <module>
    main()
  File "/opt/nvidia/jetson-io/config-by-hardware.py", line 50, in main
    jetson = board.Board()
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 149, in __init__
    self.dtb = _board_get_dtb(self.compat, self.model, dtbdir)
  File "/opt/nvidia/jetson-io/Jetson/board.py", line 88, in _board_get_dtb
    raise RuntimeError("No DTB found for %s!" % model)
RuntimeError: No DTB found for NVIDIA Jetson Nano Developer Kit!
nano@jetson:~/seeed-linux-dtoverlays$ pt search linux-headers-$(uname -r)
-bash: pt: command not found
nano@jetson:~/seeed-linux-dtoverlays$ apt search linux-headers-$(uname -r)
Sorting... Done
Full Text Search... Done
nano@jetson:~/seeed-linux-dtoverlays$ uname -r
4.9.140-tegra
nano@jetson:~/seeed-linux-dtoverlays$ ls /lib/modules/
4.9.140-tegra

I solved the issue error message β€˜No DTB found for NVIDIA Jetson Nano Developer Kit!’. with the commands listed here:

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fhw_setup_jetson_io.html

But I’m still not able to turns the respeaker led or using grove modules

This driver only support wm8960 on Respeaker 2-Mics, not support LED or other grove modules.
LED driver python script could be found on https://github.com/respeaker/mic_hat/blob/master/apa102.py.

Other grove modules lack of device tree on jetson platform, maybe you can try python script on https://github.com/Seeed-Studio/grove.py

Thank you for clarification.

I test the led with the repository https://github.com/respeaker/mic_hat but I couldn’t get the led to turn on. Here is the error that I got.

nano@jetson:~/mic_hat$ python3 pixels.py
Traceback (most recent call last):
  File "pixels.py", line 130, in <module>
    pixels = Pixels()
  File "pixels.py", line 25, in __init__
    self.dev = apa102.APA102(num_led=self.PIXELS_N)
  File "/home/nano/mic_hat/apa102.py", line 93, in __init__
    self.spi.open(bus, device)  # Open SPI port 0, slave device (CS) 1
FileNotFoundError: [Errno 2] No such file or directory

Seems like it’s not able to open SPI port ? In raspberry you have to open the port using raspi-config, I tried with /opt/nvidia/jetson-io/config-by-hardware.py in the jetson nano but I didn’t change anything.

The second test about recording and playing echo didn’t work:

  • I connected a JST speaker to the respeaker hat but I don’t have any output out of it.
  • I tried to record something with the mics of the respeaker but that didn’t work
  • However, when I connect an external speaker to the jack port and it works.

Do you think that alsa configuration is missing ? I remember having a lot of problems with the file /etc/asound.conf in the raspberry.

Thanks again for you answer @turmary

You could try command

alsamixer -c 1

to adjust four ALSA widgets prefixed with β€œx Speaker”, which will enable JST SLOT(right SPEAKER) output.
I will fix them in alsa configuration file

extras/wm8960_asound.state-jetson-nano

later.

Thanks again for your answer turmary. I adjusted the volume levels as you could see above and there is still no sound from jst speaker.

Alsamixer volume details
β”‚                                                                                                                                                                                                
β”‚
β”‚                                   β”Œβ”€β”€β”                                   β”Œβ”€β”€β”                                   β”Œβ”€β”€β”                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
←                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                   β”‚β–’β–’β”‚                                                                           β”‚
β”‚                                   β””β”€β”€β”˜                                   β””β”€β”€β”˜                                   β””β”€β”€β”˜                                   β”Œβ”€β”€β”                                    β”‚
β”‚                                                                                                                                                        β”‚OOβ”‚                                    β”‚
β”‚                                                                                                                                                        β””β”€β”€β”˜                                    β”‚
β”‚                                 100<>100                                 100                                    100                                                                            β”‚
β”‚                                x Speaker                             x Speaker AC                           x Speaker DC             <        x Speaker Playback ZC         >

I will wait patiently for your fix in extras/wm8960_asound.state-jetson-nano. Thanks

I update the device tree, the speaker now is OK.
Not care about extras/wm8960_asound.state-jetson-nano.

The JST speaker works ! :tada: I used the same installation instructions that you cited above.

Thank you very much! Nice work!

Do you know if there are any plans to make the button and the led work ?

@cristian_brokate What exactly did you execute to fix β€œNo DTB found” error on Jetson Nano B01 board?

I did this:
sudo mkdir /boot/dtb
sudo cp -v /boot/tegra210-p3448-0000-p3449-0000-[ab]0[02].dtb /boot/dtb/

After that I just rebooted and then /opt/nvidia/jetson-io/Jetson/board.py command worked.

From https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fhw_setup_jetson_io.html

1 Like

hi, cristian
Please try this device tree https://github.com/Seeed-Studio/seeed-linux-dtoverlays/blob/master/overlays/jetsonnano/jetson-seeed-2mic-voicecard.dts,
which enabled SPI pinmux.

In my Jetson Nano v4.4 Image, /dev/spidev{0,1}.{0,1} are already exist.
All we should do is setting the SPI pinmux.

Although the SPI pinmux could be enabled by /opt/nvidia/jetson-io/config-by-*. ,which will generate a SPI enabled device tree overlay object.
But only one device tree overlay could be exclusively selected at one time in the jetson nano system.
So I compound the wm8960 & spi together into jetson-seeed-2mic-voicecard.dts.

Remember to remove /boot/jetson-seeed-2mic-wm8960.dtbo

Hi Turmary,

Thanks for your complete answer !

I complied the jetson-seeed-2mic-wm8960.dtbo using the device tree with spidev support, using the same flags as before. Then I removed and replaced the /boot/jetson-seeed-2mic-wm8960.dtbo with the new one.

But I still have the same results as I said here: Respeaker 2 MiC hat: Does it support Jetson Nano or is that in the roadmap

Is this example repository adapted to the jetson nano ? does it work for you ?

In my jetson nano I have /dev/spidev0,0 and /dev/spidev1.0

Yes, it works on JetPack v4.4 Image.
We driver a sensor with spi interface on /dev/spidev0.0

The error report your system lose /dev/spidev0.1

   self.spi.open(bus, device)  # Open SPI port 0, slave device (CS) 1
FileNotFoundError: [Errno 2] No such file or directory

You need change the code to set argument device to 0.
Then use this device tree overlay.

I changed the device to 0 and I don’t have an error when I run python3 pixels.py.
But the respeaker leds don’t turn on as they should have.

Post installation, the Mic is not detected by Chromium browser. Should we do any additional configuration for it to work? asound.conf is missing β€œpcm.mic” tree, could that be the reason? Strangely, audio out via 3.5mm jack on the 2 MIC HAT works from chromium browser.

Hello turmary,
I have followed mentioned steps but could not install.

  1. My environment: Jetson nano B01 with source R32.4.3 or JetPack Image 4.4
  2. While executing step-2.2 i am getting this error β€œ/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:15:10: fatal error: linux/can/rx-offload.h: No such file or directory”:

Blockquote

ubuntu@desktop:~/seeed-linux-dtoverlays$ KBUILD=/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9 make all_jetsonnano
Building modules, stage 2.
MODPOST 2 modules
Building modules, stage 2.
MODPOST 1 modules
Building modules, stage 2.
MODPOST 1 modules
CC [M] /home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o
In file included from /home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:0:
/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:15:10: fatal error: linux/can/rx-offload.h: No such file or directory
#include <linux/can/rx-offload.h>
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:335: recipe for target β€˜/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o’ failed
make[2]: *** [/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o] Error 1
Makefile:1629: recipe for target β€˜module/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT’ failed
make[1]: *** [module/home/jetson/seeed-linux-dtoverlays/modules/CAN-HAT] Error 2
Makefile:150: recipe for target β€˜all_jetsonnano’ failed
make: *** [all_jetsonnano] Error 2
ubuntu@desktop:~/seeed-linux-dtoverlays$

Blockquote

Is is because of latest jetpack version or something i have missed?
Any help much appreciated.!

Sorry, this is some idiot who’s committed the wrong code to the master branch.I’ll fix it as soon as I can.