Dear all, I have an issue and do not know how to solve it. It seems pretty simple, but I searched everywhere but could not find a solution, and also not derivate any solution.
So there we go. I am using a Raspi 4b+
I have an exec node in my Nodered where I want to change the volume.
When running it in the terminal, a simple amixer sset Master 3%+ does the trick.
Because, when I run "amixer" in the terminal, I get this:
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 33309 [51%] [on]
Front Right: Playback 33309 [51%] [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 65536
Front Left: Capture 65536 [100%] [on]
Front Right: Capture 65536 [100%] [on]
In the exec node in Nodered, it does not work. When I simply run amixer, I get this in the payload:
Simple mixer control 'Headphone',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 0 [96%] [0.00dB] [on]
So, the issue is for me pretty clear: in the terminal the volume is controlled by the "Master", it works wonderfully, and I can also run mp3s via mplayer and it is fine.
In Nodered, there is no Master, but the "Headphone". I even turned off the "AV Jack" of the raspberry pi, so that it does not show anymore in the raspi-config - there I have only the USB Audio in the system options -> Audio , which is what I am using as the output speaker (i.e. it has only an USB cable, no sound jack).
So in my simple world, the solution would be to force the "amixer" in nodered to use the "Master" instead of "Headphone". Is this the solution? If it is, how to achieve it? If not, anybody has any idea on how to do it?
Thanks a lot!