Voice Bonnet not playing audio

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/
Locked
User avatar
cfernandezruns
 
Posts: 5
Joined: Sun Mar 20, 2016 6:27 pm

Voice Bonnet not playing audio

Post by cfernandezruns »

I recently purchased a Voice Bonnet https://learn.adafruit.com/adafruit-voice-bonnet and I'm having trouble getting audio with my Raspberry Pi CM4 IO Board.

I completed the installation instructions for a headless Raspbian Lite install (2022-09-22 release).
Following the instructions, I logged in via ssh, and completed the installation steps.
I do see the Voice Bonnet listed with the UU flag at address 1a.
I do see the Voice Bonnet listed as a sound card:

Code: Select all

pi@raspberrypi:/etc $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: 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
The next step is to run speaker-test -c2. When I do this, I get no audio output at all. I have the two Adafruit-recommended speakershttps://www.adafruit.com/product/4445 connected to the voice bonnet. I've also tried plugging in a pair of headphones to the headphone jack - no audio there, either.

Are there additional steps that must be completed to get ALSA to play something out of the new sound card?

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Voice Bonnet not playing audio

Post by mikeysklar »

How about a more specific speaker test that is direct at card 2 device 0 based on the aplay output.

Code: Select all

speaker-test -c 2 -F S16_LE -r 48000 -D hw:2,0

User avatar
cfernandezruns
 
Posts: 5
Joined: Sun Mar 20, 2016 6:27 pm

Re: Voice Bonnet not playing audio

Post by cfernandezruns »

Hi mikeyskylar, thanks for the quick response.

I ran the command you suggested. Still not getting audio, but I was able to do some quick checks with my oscilloscope. When running your command, I can see data flowing on DOUT/pin 40/BCM GPIO 21. I can also see the LRCLK running on pin35/BCM GPIO 19. These are both 3.3V signals.

The signal that looks weird to me is BCLK. I was expecting to see a 48kHz, 3.3V clock. But instead, I'm seeing a ~2.0V DC line. When I stop the speaker-test, the BCLK line stays at 2.0V.

I'm wondering if this means there is an I/O conflict or something? Could another peripheral be enabled that is preventing BCLK from working properly?

Yellow = BCLK
Blue = DOUT
Pink = LRCLK
PXL_20221220_145021150.jpg
PXL_20221220_145021150.jpg (668.65 KiB) Viewed 61 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Voice Bonnet not playing audio

Post by mikeysklar »

Nice. Thanks for the scope shot.

Good thought on another driver possibly causing a conflict.

Try going over the "Detailed Install" section to review the changes that the i2samp script was applying. Another forum user recently reported having to skip the i2samp script entirely and do the manual install by hand suggesting that the i2samp script has lost some compatibility with the current Bullseye release.

https://learn.adafruit.com/adafruit-spe ... ll-2712959

viewtopic.php?p=948803&hilit=voice+bonnet#p948803

User avatar
cfernandezruns
 
Posts: 5
Joined: Sun Mar 20, 2016 6:27 pm

Re: Voice Bonnet not playing audio

Post by cfernandezruns »

The instructions you linked are for the Adafruit Speaker Bonnet, based on the MAX98357 amplifier.
I'm working with the Adafruit Voice Bonnet, which is based on the WM8960 audio codec.

I'm assuming that this is a typo. Correct? Or, is there something in the Speaker Bonnet manual instructions that also applies to the Voice Bonnet?

User avatar
cfernandezruns
 
Posts: 5
Joined: Sun Mar 20, 2016 6:27 pm

Re: Voice Bonnet not playing audio

Post by cfernandezruns »

Some more digging....

I can run the script with the Voice Bonnet removed from the headers. I can still see LRCLK and DOUT flowing, and BCLK is still stuck at ~2.0V.

This means that the unusual BCLK behavior is not related to the Voice Bonnet hardware itself. It could be a problem with my hardware, or it could be some kind of software configuration issue with the RPi/Voice Bonnet software running on my Compute Module 4.

According to page 50 of the WM8960 datasheet, BCLK and LRCLK must be provided by the host processor if the codec is operating in Slave mode (which I'm pretty sure it is, given the presence of LRCLK even with the Voice Bonnet removed). So, I'm pretty sure that the missing BCLK is why I'm not getting audio flowing.

Can you confirm that the Voice Bonnet software is intended to operate with the RPi in I2S Master mode?

User avatar
cfernandezruns
 
Posts: 5
Joined: Sun Mar 20, 2016 6:27 pm

Re: Voice Bonnet not playing audio

Post by cfernandezruns »

Update:

I tried switching to a second Compute Module 4 to see if I had a hardware issue with my module. Turns out, I did!

I re-installed everything according to the setup guide on the second CM4. On this board, the speaker-test command posted above gave me static immediately, alternating between the left and right speaker outputs on the Voice Bonnet.

The issue is now closed. I appreciate the help!

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Voice Bonnet not playing audio

Post by mikeysklar »

Thank you for trying another Pi and going through the installation again. Glad to hear that resolved it.

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”