Also, I tried to use the pixel_ring python code and use “pixel_ring.set_volume(10)” (and other numbers) to change the output volume. But maybe I misunderstand what that line does. Is it supposed to change the jack output volume? Because it doesn’t seem to do anything…
After a couple of hours trying to figure out how alsa + softvol works from various sources, here is my working /etc/asound.conf file , in the hope it may help newbies in alsa/sound conf like me.
This card (usb ReSpeaker 4 Mic Array) doesn’t allow sound volume hardware configuration : you need to create a “softvol” “virtual” device that will allow you to modify the sound volume before sending it to the card PCM device. Check by launching “alsamixer”, F3 to change card/device -> warning message.
[code] pcm.bcm2835 {
type hw
card ALSA
}
pcm.ArrayUAC10 {
type plug
slave.pcm “hw:1,0”
}
pcm.softvol {
type softvol
slave {
pcm “ArrayUAC10”
}
control {
name “Master”
card 0
}
}
pcm.!default {
type asym
playback.pcm “plug:softvol”
capture.pcm “ArrayUAC10”
}
[/code]
My configuration : Pi3 B+ with ReSpeaker 4 Mic Array v2 (UAC1.0) plugged via USB cable
This conf defaults to :
output via ReSpeaker Jack (to benefits from Noise Cancelation etc…)
Input (capture) from Array Mics
No reboot needed but…
Check with ‘alsamixer’ or ‘amixer’ : a new “Master” mixer sound control is now available :
My usecase : https://snips.ai/ (alexa/GHome (real/serious/capable) alternative voice assistant not using any Cloud, speech recognition is 100% made on the Pi : PRIVACY by design)