Speaker Bonnet Volume Control?

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Speaker Bonnet Volume Control?

Post by AlexMaghen »

Have installed the hardware and followed the software instructions carefully to get this bonnet running on my Pi Zero. If I do "aplay xyz.wav" now, it plays off the bonnet speakers and all is well.

Also, when I go into alsamixer it shows "snd_rpi_hifiberry_dac" as the Card and shows one Playback called "PCM".

The only problem is that no matter how I adjust the level bar in alsamixer, it doesn't change the output volume. If I try "amixer set PCM 25%", same thing. No effect on the output.

I'm a little confused about what I'm doing wrong in the command line to control the output volume.

Thanks for your help!

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Speaker Bonnet Volume Control?

Post by AlexMaghen »

Another piece of info: I noticed in the documentation something about it not handling Mono files. What's weird is that WAVs were Mono but it was playing them back fine. In any case, I thought maybe somehow the fact that they were Mono was keeping the volume control from working. So I made them Stereo. No effect. Volume adjustment still doesn't work.

Any help, much appreciated!

Alex

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Speaker Bonnet Volume Control?

Post by AlexMaghen »

Dear Adafruit people and community - I'm sorry to pester but this is driving me nuts. Anyone have any thoughts as to what I might be doing wrong here?

Thanks!

Alex

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Speaker Bonnet Volume Control?

Post by adafruit_support_carter »

When setting up the software, did you follow this step for enabling software volume control?
https://learn.adafruit.com/adafruit-spe ... ol-2711421

User avatar
AlexMaghen
 
Posts: 37
Joined: Wed Jan 20, 2016 8:17 pm

Re: Speaker Bonnet Volume Control?

Post by AlexMaghen »

adafruit_support_carter wrote: Thu Nov 17, 2022 3:12 pm When setting up the software, did you follow this step for enabling software volume control?
https://learn.adafruit.com/adafruit-spe ... ol-2711421
Hi. Thanks for this! Question: I think I've done this already (though honestly, not sure - gotta check or redo it). But on the Adafruit site there's this warning:

"2017-11-2 Raspbian PIXEL ('full') has broken something in volume control. I2S works, but there's no software volume setup, if you need this, try Raspbian Lite - will try to fix as soon as we figure out why :)"

I did "cat /etc/os-release" and got this...

Code: Select all

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
I cannot tell if this means that I won't be able to control volume at all with the OS I have installed. Do you know?

Alex

User avatar
jkotecki
 
Posts: 4
Joined: Wed Dec 25, 2013 10:38 pm

Re: Speaker Bonnet Volume Control?

Post by jkotecki »

I have installed the Raspberry Pi OS Lite 32bit on my Raspberry Pi Zero W Rev 1.1 with the speaker bonnet and followed the instructions. Playback works, but I am not able to adjust the volume. When I'm in the alsamixer, the up and down arrows don't do anything. I have been searching for a solution to no avail.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Speaker Bonnet Volume Control?

Post by adafruit_support_carter »

Not sure what's happening here. Just went through the install process:
https://learn.adafruit.com/adafruit-spe ... y-pi-usage
on a Pi Zero W starting with the 2022/09/22 Raspberry Pi Lite OS image.

After running the script and going through the reboots, a volume indicator shows up in alsamixer:
Screenshot from 2022-12-15 15-01-10.png
Screenshot from 2022-12-15 15-01-10.png (28.55 KiB) Viewed 52 times
Also, changing the level here did change the volume on the speakers. To test, would change the level in alsamixer, then exit, and run:

Code: Select all

speaker-test -l5 -c2 -t wav
In my case, I did not need to do the additional steps in the "I2S Audio Tweaks" section of the guide. The install script seems to have taken care of everything.

User avatar
jkotecki
 
Posts: 4
Joined: Wed Dec 25, 2013 10:38 pm

Re: Speaker Bonnet Volume Control?

Post by jkotecki »

Interesting. I just installed Buster and changed the i2samp.sh script to say that it was supported, and now it's working as I expect. If I use the latest image and run the script, the alsamixer comes up but I am not able to adjust the volume.

User avatar
jkotecki
 
Posts: 4
Joined: Wed Dec 25, 2013 10:38 pm

Re: Speaker Bonnet Volume Control?

Post by jkotecki »

I just installed this image (https://downloads.raspberrypi.org/raspi ... ite.img.xz) and ran the i2samp.sh script to install, and the volume doesn't work. But doing the same steps with this image (https://downloads.raspberrypi.org/raspi ... f-lite.zip) does work. Obviously, they are different OS's and therefore different software versions. The version of alsamixer with Buster is 1.1.8 and Bullseye is 1.2.4.
Screen Shot 2022-12-15 at 9.45.18 PM.png
Screen Shot 2022-12-15 at 9.45.18 PM.png (364.57 KiB) Viewed 51 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”