0

Cannot get voice bonnet working on Pi 3B+ with latest OS
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Sat Apr 24, 2021 4:12 pm

Hello-

I purchased a voice bonnet and two of the mono speakers - plugged everything up and set it up with the provided instructions at https://learn.adafruit.com/adafruit-voice-bonnet. The i2cdetect command correctly shows UU under 10a and I even see a moving bar in the pulseaudio control panel when audio is playing, but no audio is actually coming out of the speakers. I'm using a 3B+ on the latest raspberry pi OS, I have no idea how to troubleshoot further - sudo aplay -l lists the sound card and I've upped the volume in alsamixer to 60 like the tutorial says. I'll be glad to provide any files like alsa config or something if needed. Can anyone assist?

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Mon Apr 26, 2021 4:45 pm

@RomanOnARiver,

We have been seeing more users strugglign with the bonnet recently. I think the confusion all likes within what "card number" your bonnet is showing up on. Can you paste in the output from `aplay- l`? I suspect your card is not on zero and that is how the system is setup. If your card is showing up on '1' or '2' then adjust these lines in the system-wide file changing the 0 values to etiher 1 or 2 based on the aplay output.

/usr/share/alsa/alsa.conf

Code: Select all | TOGGLE FULL SIZE
defaults.ctl.card 0
defaults.pcm.card 0


Another way to to verify the card your device is to run these three speaker-test examples:

Code: Select all | TOGGLE FULL SIZE
speaker-test -c 2 -F S16_LE -r 48000 -D hw:0,0
speaker-test -c 2 -F S16_LE -r 48000 -D hw:1,0
speaker-test -c 2 -F S16_LE -r 48000 -D hw:2,0

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Mon Apr 26, 2021 8:11 pm

Thank you for your response, here's the requested info:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~/Music $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


I made the change in the alsa.conf file which now reads:

Code: Select all | TOGGLE FULL SIZE
defaults.ctl.card 1
defaults.pcm.card 1


however none of the test commands produce any output. The first two run until I stop them, the 3rd one errors out:
Code: Select all | TOGGLE FULL SIZE
speaker-test 1.1.8

Playback device is hw:2,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -2,No such file or directory

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Tue Apr 27, 2021 4:00 pm

Based on the output from aplay -l it looks like the speaker-test audio is going out to the on-board 3.5mm jack and the second version is sending it to the voice bonnet output jack. The third command with hardware card 2 fails since you only have devices on 0 and 1.

Did you reboot after updating the alsa.conf?

Did any messages popup in dmesg related to the voice bonnet?

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Fri Apr 30, 2021 10:28 am

mikeysklar wrote:Based on the output from aplay -l it looks like the speaker-test audio is going out to the on-board 3.5mm jack and the second version is sending it to the voice bonnet output jack. The third command with hardware card 2 fails since you only have devices on 0 and 1.

Did you reboot after updating the alsa.conf?

Did any messages popup in dmesg related to the voice bonnet?


Yes I rebooted after changing alsa.conf.

I'm getting a lot of messages like this:

Code: Select all | TOGGLE FULL SIZE
[  +2.905487] wm8960 1-001a: ASoC: error at soc_component_write_no_lock on wm8960.1-001a: -121
[  +0.070509] wm8960 1-001a: ASoC: error at snd_soc_component_update_bits on wm8960.1-001a: -121
[  +0.070232] wm8960 1-001a: ASoC: error at snd_soc_component_update_bits on wm8960.1-001a: -121


However, upon trying to rebuild the code, I noticed:

Code: Select all | TOGGLE FULL SIZE
Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.17-v7+ -C /lib/modules/5.10.17-v7+/build M=/var/lib/dkms/seeed-voicecard/0.3/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.17-v7+ (armv7l)
Consult /var/lib/dkms/seeed-voicecard/0.3/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel
pi@raspberrypi:~/seeed-voicecard $


And here are the contents of that file:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~/seeed-voicecard $ sudo cat /var/lib/dkms/seeed-voicecard/0.3/build/make.log
DKMS make.log for seeed-voicecard-0.3 for kernel 5.10.17-v7+ (armv7l)
Fri 30 Apr 2021 10:30:05 AM EDT
make: Entering directory '/usr/src/linux-headers-5.10.17-v7+'
  CC [M]  /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o
  CC [M]  /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o
  CC [M]  /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o
  CC [M]  /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_startup’:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:99:9: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  if (rtd->cpu_dai->driver->playback.channels_min) {
         ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:100:40: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
   priv->channels_playback_default = rtd->cpu_dai->driver->playback.channels_min;
                                        ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:102:9: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  if (rtd->cpu_dai->driver->capture.channels_min) {
         ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:103:39: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
   priv->channels_capture_default = rtd->cpu_dai->driver->capture.channels_min;
                                       ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:105:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_override;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:106:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_override;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:107:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_override;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:108:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_override;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_shutdown’:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:120:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_default;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:121:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_default;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:122:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_default;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:123:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_default;
     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_hw_params’:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:134:37: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’
  struct snd_soc_dai *codec_dai = rtd->codec_dai;
                                     ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:135:35: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
                                   ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_trigger’:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:199:31: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’
  struct snd_soc_dai *dai = rtd->codec_dai;
                               ^~
In file included from ./include/linux/device.h:15:0,
                 from /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:19:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:208:8: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’?
   dai->playback_active, dai->capture_active);
        ^
./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                               ^~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:208:30: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’?
   dai->playback_active, dai->capture_active);
                              ^
./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                               ^~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:230:12: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’?
   if (dai->capture_active && substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
            ^~~~~~~~~~~~~~
            stream_active
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_dai_init’:
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:340:33: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’
  struct snd_soc_dai *codec = rtd->codec_dai;
                                 ^~
/var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:341:31: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’
  struct snd_soc_dai *cpu = rtd->cpu_dai;
                               ^~
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:28:0:
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c: In function ‘wm8960_configure_clocking’:
/var/lib/dkms/seeed-voicecard/0.3/build/sound-compatible-4.18.h:34:36: error: implicit declaration of function ‘snd_soc_component_read32’; did you mean ‘snd_soc_component_read’? [-Werror=implicit-function-declaration]
 #define snd_soc_read               snd_soc_component_read32
                                    ^
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:619:15: note: in expansion of macro ‘snd_soc_read’
  u16 iface1 = snd_soc_read(codec, WM8960_IFACE1);
               ^~~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c: At top level:
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:3: error: ‘const struct snd_soc_dai_ops’ has no member named ‘digital_mute’
  .digital_mute = wm8960_mute,
   ^~~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .digital_mute = wm8960_mute,
                  ^~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:18: note: (near initialization for ‘wm8960_dai_ops.prepare’)
In file included from ./include/linux/device.h:15:0,
                 from ./include/linux/acpi.h:15,
                 from ./include/linux/i2c.h:13,
                 from /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:21:
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c: In function ‘ac108_hw_params’:
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:656:9: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’?
    dai->playback_active, dai->capture_active);
         ^
./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                               ^~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:656:31: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’?
    dai->playback_active, dai->capture_active);
                               ^
./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                               ^~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:667:61: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’?
  if ((substream->stream == SNDRV_PCM_STREAM_CAPTURE && dai->playback_active)
                                                             ^~~~~~~~~~~~~~~
                                                             playback_widget
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:668:62: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’?
   || (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && dai->capture_active)) {
                                                              ^~~~~~~~~~~~~~
                                                              stream_active
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c: At top level:
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:3: error: ‘const struct snd_soc_dai_ops’ has no member named ‘digital_mute’
  .digital_mute = ac108_aif_mute,
   ^~~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .digital_mute = ac108_aif_mute,
                  ^~~~~~~~~~~~~~
/var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:18: note: (near initialization for ‘ac108_dai_ops.bespoke_trigger’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o] Error 1
/var/lib/dkms/seeed-voicecard/0.3/build/ac101.c: In function ‘ac101_aif_shutdown’:
/var/lib/dkms/seeed-voicecard/0.3/build/ac101.c:963:16: error: ‘struct snd_soc_dai’ has no member named ‘active’
  if (!codec_dai->active) {
                ^~
/var/lib/dkms/seeed-voicecard/0.3/build/ac101.c: In function ‘ac101_hw_params’:
/var/lib/dkms/seeed-voicecard/0.3/build/ac101.c:1085:19: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’?
    if (codec_dai->capture_active && dmic_used && codec_aif1_fs[i].samp_rate == 44100) {
                   ^~~~~~~~~~~~~~
                   stream_active
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o] Error 1
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o] Error 1
make: *** [Makefile:1804: /var/lib/dkms/seeed-voicecard/0.3/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.10.17-v7+'

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Fri Apr 30, 2021 1:26 pm

@RomanOnARiver,

Thanks this output is helpful. I appreciate you pasting it all in neatly.

Did you try the recommendation of building for the compat-kernel that you received from the initial error.

Code: Select all | TOGGLE FULL SIZE
Please try to compile with the option --compat-kernel


Code: Select all | TOGGLE FULL SIZE
sudo ./install.sh  --compact-kernel


Also just to make sure you have all the necessary components in place:

Code: Select all | TOGGLE FULL SIZE
sudo apt install build-essential


I suspect the above will eventually work with SEEED and Pi OS sort things out, but it looks like everything after the 5.4 kernel has not been working with the SEEED kernel module. The most recent solution I've come across to resolve this is to block most of the kernel updates after installation and pin yourself on the older kernel.

Code: Select all | TOGGLE FULL SIZE
echo "raspberrypi-bootloader hold" | sudo dpkg --set-selections
echo "raspberrypi-kernel hold" | sudo dpkg --set-selections
echo "raspberrypi-kernel-headers hold" | sudo dpkg --set-selections
echo "libraspberrypi0 hold" | sudo dpkg --set-selections
echo "libraspberrypi-bin hold" | sudo dpkg --set-selections
echo "libraspberrypi-dev hold" | sudo dpkg --set-selections
echo "libraspberrypi-doc hold" | sudo dpkg --set-selections


https://www.raspberrypi.org/forums/view ... p?t=303426

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Fri Apr 30, 2021 1:42 pm

mikeysklar wrote:@RomanOnARiver,

Thanks this output is helpful. I appreciate you pasting it all in neatly.

Did you try the recommendation of building for the compat-kernel that you received from the initial error.

Code: Select all | TOGGLE FULL SIZE
Please try to compile with the option --compat-kernel


Code: Select all | TOGGLE FULL SIZE
sudo ./install.sh  --compact-kernel


Also just to make sure you have all the necessary components in place:

Code: Select all | TOGGLE FULL SIZE
sudo apt install build-essential


I suspect the above will eventually work with SEEED and Pi OS sort things out, but it looks like everything after the 5.4 kernel has not been working with the SEEED kernel module. The most recent solution I've come across to resolve this is to block most of the kernel updates after installation and pin yourself on the older kernel.

Code: Select all | TOGGLE FULL SIZE
echo "raspberrypi-bootloader hold" | sudo dpkg --set-selections
echo "raspberrypi-kernel hold" | sudo dpkg --set-selections
echo "raspberrypi-kernel-headers hold" | sudo dpkg --set-selections
echo "libraspberrypi0 hold" | sudo dpkg --set-selections
echo "libraspberrypi-bin hold" | sudo dpkg --set-selections
echo "libraspberrypi-dev hold" | sudo dpkg --set-selections
echo "libraspberrypi-doc hold" | sudo dpkg --set-selections


https://www.raspberrypi.org/forums/view ... p?t=303426



Here's my output from the build with --compat-kernel:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~/seeed-voicecard $ sudo ./install.sh --compat-kernel
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease             
Hit:3 https://deb.nodesource.com/node_10.x buster InRelease               
Reading package lists... Done                       
Building dependency tree       
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
raspberrypi-kernel is already the newest version (1.20210303-1).
raspberrypi-kernel-headers is already the newest version (1.20210303-1).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-raspi
E: Unable to locate package linux-headers-raspi
E: Unable to locate package linux-image-raspi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dkms is already the newest version (2.6.1-4).
git is already the newest version (1:2.20.1-2+deb10u3).
i2c-tools is already the newest version (4.1-1).
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Error! There are no instances of module: seeed-voicecard
0.3 located in the DKMS tree.

Creating symlink /var/lib/dkms/seeed-voicecard/0.3/source ->
                 /usr/src/seeed-voicecard-0.3

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.17-v7+ -C /lib/modules/5.10.17-v7+/build M=/var/lib/dkms/seeed-voicecard/0.3/build......
cleaning build area...

DKMS: build completed.

snd-soc-wm8960.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7+/kernel/sound/soc/codecs/

snd-soc-ac108.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7+/kernel/sound/soc/codecs/

snd-soc-seeed-voicecard.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.17-v7+/kernel/sound/soc/bcm/

depmod....

DKMS: install completed.
git init
Initialized empty Git repository in /etc/voicecard/.git/
git add --all
git commit -m "origin configures"
[master (root-commit) 0be1ce4] origin configures
 7 files changed, 1482 insertions(+)
 create mode 100644 ac108_6mic.state
 create mode 100644 ac108_asound.state
 create mode 100644 asound_2mic.conf
 create mode 100644 asound_4mic.conf
 create mode 100644 asound_6mic.conf
 create mode 100644 dkms.conf
 create mode 100644 wm8960_asound.state
Created symlink /etc/systemd/system/sysinit.target.wants/seeed-voicecard.service → /lib/systemd/system/seeed-voicecard.service.
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------


However after rebooting, setting the volume in alsamixer to 60, I'm still getting the following error on speaker-test with 2,0 (the other two suggested did the same as before - silent until killed):

Code: Select all | TOGGLE FULL SIZE
speaker-test 1.1.8

Playback device is hw:2,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_hw.c:1822:(_snd_pcm_hw_open) Invalid value for card
Playback open error: -2,No such file or directory


with sudo aplay -l saying:

Code: Select all | TOGGLE FULL SIZE
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


I noticed I'm still running a newer kernel, I'm looking for the right package to install to downgrade the kernel, in Ubuntu it would be called linux-image-5.4 linux-headers-5.4 or something to that effect, I'm not seeing that in the repositories.

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Mon May 03, 2021 1:09 pm

Using the speaker-test example will always work (not errors running) for the first two cards as you have usable devices. It will always fail when calling hw:2,0 as you do not have any hardware on card #2. As you can see from the aplay -l output your SEEED audio device is card #1 so please ignore all Card #0 or #2 command syntax and always fill out your commands with hw:1,0.

In terms of using a different kernel checkout some of the details for using different drivers here for the 5.4 and 5.9 kernel which I think you have been over.

https://learn.adafruit.com/adafruit-voi ... -3071738-2

This is how to pin a kernel back. We had to do this recently for some TFTs to be supported with older kernels.

https://learn.adafruit.com/adafruit-min ... leshooting

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Mon May 03, 2021 4:44 pm

I've gotten it at a point where pulseaudio control center is showing audio is playing, bar moving and all that, no sound actually is coming out. I'm not sure where to go from here, this is just getting frustrating how long I've been at this, but I appreciate your assistance.

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Tue May 04, 2021 10:57 am

@RomanOnARiver,

Thank you for your patience. I know this is trying, but you are making good progress.

That is great that you see the visual audio playback. What changes did you have to make to see that come up? Was it just a matter of selecting the correct card#?

When playing back the audio are you connected to the SEEED audio out port? What device have you selected for audio output? It's easy to select different audio out sources from the Pi OS drop down top right of the desktop (speaker icon). You can also use raspi-config to some degree.

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Fri May 07, 2021 2:45 pm

mikeysklar wrote:@RomanOnARiver,

Thank you for your patience. I know this is trying, but you are making good progress.

That is great that you see the visual audio playback. What changes did you have to make to see that come up? Was it just a matter of selecting the correct card#?

When playing back the audio are you connected to the SEEED audio out port? What device have you selected for audio output? It's easy to select different audio out sources from the Pi OS drop down top right of the desktop (speaker icon). You can also use raspi-config to some degree.


After doing the first three steps from this page: https://github.com/HinTak/seeed-voiceca ... pulseaudio I got this:

Image however I cannot hear any actual audio from the speakers.

Raspberry Pi OS has moved to PulseAudio as default, which is where I got the idea that the driver may not be installing correctly for that. Audio output is correctly seed to the seeed-2mic-voicecard as is audio input.

Some hopefully relevant commands:

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ pacmd list-sinks
2 sink(s) available.
    index: 0
   name: <alsa_output.platform-bcm2835_audio.analog-stereo>
   driver: <module-alsa-card.c>
   flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME
   state: IDLE
   suspend cause: (none)
   priority: 9009
   volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
           balance 0.00
   base volume: 65536 / 100% / 0.00 dB
   volume steps: 65537
   muted: no
   current latency: 51.64 ms
   max request: 10 KiB
   max rewind: 10 KiB
   monitor source: 0
   sample spec: s16le 2ch 44100Hz
   channel map: front-left,front-right
                Stereo
   used by: 0
   linked by: 1
   fixed latency: 59.95 ms
   card: 0 <alsa_card.platform-bcm2835_audio>
   module: 6
   properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "bcm2835 Headphones"
      alsa.id = "bcm2835 Headphones"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "0"
      alsa.card_name = "bcm2835 Headphones"
      alsa.long_card_name = "bcm2835 Headphones"
      alsa.driver_name = "snd_bcm2835"
      device.bus_path = "platform-bcm2835_audio"
      sysfs.path = "/devices/platform/soc/3f00b840.mailbox/bcm2835_audio/sound/card0"
      device.form_factor = "internal"
      device.string = "hw:0"
      device.buffering.buffer_size = "10576"
      device.buffering.fragment_size = "2640"
      device.access_mode = "mmap"
      device.profile.name = "analog-stereo"
      device.profile.description = "Analog Stereo"
      device.description = "Built-in Audio Analog Stereo"
      alsa.mixer_name = "Broadcom Mixer"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card"
   ports:
      analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
         properties:
            
   active port: <analog-output>
  * index: 1
   name: <alsa_output.platform-soc_sound.stereo-fallback>
   driver: <module-alsa-card.c>
   flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME
   state: IDLE
   suspend cause: (none)
   priority: 9000
   volume: front-left: 68812 / 105% / 1.27 dB,   front-right: 68812 / 105% / 1.27 dB
           balance 0.00
   base volume: 52057 /  79% / -6.00 dB
   volume steps: 65537
   muted: no
   current latency: 59.84 ms
   max request: 10 KiB
   max rewind: 10 KiB
   monitor source: 1
   sample spec: s16le 2ch 44100Hz
   channel map: front-left,front-right
                Stereo
   used by: 0
   linked by: 1
   fixed latency: 59.95 ms
   card: 1 <alsa_card.platform-soc_sound>
   module: 7
   properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "bcm2835-i2s-wm8960-hifi wm8960-hifi-0"
      alsa.id = "bcm2835-i2s-wm8960-hifi wm8960-hifi-0"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "1"
      alsa.card_name = "seeed-2mic-voicecard"
      alsa.long_card_name = "seeed-2mic-voicecard"
      alsa.driver_name = "snd_soc_simple_card"
      device.bus_path = "platform-soc:sound"
      sysfs.path = "/devices/platform/soc/soc:sound/sound/card1"
      device.form_factor = "internal"
      device.string = "hw:1"
      device.buffering.buffer_size = "10576"
      device.buffering.fragment_size = "2644"
      device.access_mode = "mmap"
      device.profile.name = "stereo-fallback"
      device.profile.description = "Stereo"
      device.description = "Built-in Audio Stereo"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card"
   ports:
      analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
         properties:
            device.icon_name = "audio-speakers"
      analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: unknown)
         properties:
            device.icon_name = "audio-headphones"
   active port: <analog-output-speaker>


Code: Select all | TOGGLE FULL SIZE
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Sat May 08, 2021 8:38 pm

Can you post a screenshot from the volume control app for what it seen when you select the output devices tab?

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Mon May 10, 2021 4:54 pm

mikeysklar wrote:Can you post a screenshot from the volume control app for what it seen when you select the output devices tab?


Image

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by mikeysklar on Mon May 10, 2021 5:36 pm

Thanks for that.

I see that both of the output devices have a red "X" over the speaker indicating that sounds output is muted. Can you uncheck them and try each one at a time?

There are also advanced tabs on each of those output devices that might have additional options.

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: Cannot get voice bonnet working on Pi 3B+ with latest OS

by RomanOnARiver on Mon May 10, 2021 6:10 pm

The icon is deceptive because it has an x over it either way, but the button is "indented" when it's actually muted.

For the moment I have to put the project on hold, when I have time to get back to this, would you be willing to remote into my machine and see if you can't troubleshoot it better than I could? Because I'm at a loss.

RomanOnARiver
 
Posts: 10
Joined: Sun Nov 22, 2015 8:32 pm

Please be positive and constructive with your questions and comments.