On 31/12/2021 16:21, Terry Coles wrote:
I'm beginning to think that upgrading the music and bells Pis to bullseye
might have been a bit premature. I cannot get amixer to work properly. The
sound card is an Adafruit Speaker Bonnet. The code shown below worked under
buster.
Here is the configuration:
pi@minster-bells:~ $ amixer
Simple mixer control 'PCM',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 255
Front Left: 255 [100%]
Front Right: 255 [100%]
I need the volume to be controllable from my Python program, so I set it once
at the beginning when the program is launched, eg:
amixer -c 0 set PCM 100
(where the value is a variable in reality, but this doesn't work either.)
I get:
amixer: Invalid command!
Any thoughts on what could be wrong? speaker-test and playing an mp3 file works
fine using mpg123. I just can't set the volume.
On my desktop (Kubuntu 20.04)
Amixer gives:
peterm@peterm-MBB-34204H:~$ amixer
Simple mixer control 'Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%]
Front Right: Playback 31 [100%]
Simple mixer control '3D Control - Switch',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'PCM',0
Capabilities: pvolume pswitch pswitch-joined cswitch
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 24 [77%] [on] Capture [off]
Front Right: Playback 24 [77%] [on] Capture [off]
Simple mixer control 'Synth',0
...... and a whole bunch more
I notice that the setup is different. Does it need to be 'pvolume' in yours?
Peter
--
Next meeting: Online, Jitsi, Tuesday, 2022-01-04 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... http://dorset.lug.org.uk
New thread, don't hijack: mailto:dorset@mailman.lug.org.uk