Raspberry-Pi-Installer-Scripts icon indicating copy to clipboard operation
Raspberry-Pi-Installer-Scripts copied to clipboard

ALSA config in home directory should be .asoundrc not asound.con

Open lovemonkey257 opened this issue 4 months ago • 2 comments

Script Command

i2samp.py

Operating System

Raspberry Pi 5 Model B Rev 1.0 PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)"

Hardware

Raspberry Pi 5 (also the same for Pi Zero 2W)

Behavior

https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/main/i2samp.py#L59

Description

The script creates ~/asound.conf then copies it to /etc shell.move("~/asound.conf", "/etc/asound.conf"). My understanding is the home directory config should be called .asoundrc.

This differs from the detailed instructions at https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/raspberry-pi-usage and https://learn.adafruit.com/adafruit-speaker-bonnet-for-raspberry-pi/i2s-tweaks. These detail two different configs and also assume that the card is installed is card 0. In my case this only happens if I disable the HDMI sound in /boot/firmware/config.txt otherwise it's card 2.

dtoverlay=vc4-kms-v3d,noaudio

While I can get the speakerbonnet to work, controlling the volume appears to be rather fragile. The project I'm working on was working fine and I've now managed to break the volume (no idea how). It is very frustrating.

There does appear to be differences between running Lite and in a GUI. Not helped by the general confusion in the use of PulseAudio and ALSA.

I did notice that you recently have moved the googlevoicehat-soundcard which is going to confuse matters more.

Any clarification/help would be much appreciated.

Additional information

My /boot/firmware/config.txt contains these relevant commands which enables SPI, IC2, I2S, disables HDMI audio, enables the MAX98357a driver, which then becomes the sole audio driver.

dtparam=i2s=on
dtparam=spi=on
dtparam=audio=off
dtoverlay=max98357a
dtoverlay=i2s-mmap

lovemonkey257 avatar Aug 28 '25 17:08 lovemonkey257

It's not making a copy of it, it's moving it to /etc.

makermelissa avatar Aug 28 '25 17:08 makermelissa

Doh. You are absolutely correct. It's been a long day.

Can I confirm that the i2samp script is the source of truth regarding the ALSA config? Specifically, /etc/asound.conf is all the config needed to get the volume working with the Bonnet?

lovemonkey257 avatar Aug 28 '25 18:08 lovemonkey257