Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alsamixer Raspberry Pi OS volume control not working #24

Closed
ericktruter opened this issue May 31, 2020 · 5 comments
Closed

Alsamixer Raspberry Pi OS volume control not working #24

ericktruter opened this issue May 31, 2020 · 5 comments

Comments

@ericktruter
Copy link

Since the Raspbery Pi OS update 28 May the Alsamixer is no longer working for volume control.

Before May 28 the audio device was "one" card with multiple devides:

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0

But now it is multiple cards with one device:

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3

My current config as before the OS update:

/etc/mopidy/mopidy.conf

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[audio]
mixer = alsamixer
#mixer = software
output = alsasink
mixer_volume = 100

[alsamixer]
card = 0
control = PCM
min_volume = 30
max_volume = 100
volume_scale = cubic

[http]
enabled = true
hostname = 0.0.0.0
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname
allowed_origins =
csrf_protection = false

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = listall,listallinfo
default_playlist_scheme = m3u

[file]
enabled = true
media_dirs = /home/pi/Music
follow_symlinks = false
metadata_timeout = 1000

Testing using CLI and mpc with the mixer set to alsamixer, the volume is n/a
pi@raspberrypi:~ $ mpc
volume: n/a repeat: off random: off single: off consume: off

And trying to set volume
pi@raspberrypi:~ $ mpc volume 10
mpd error: problems setting volume

But using mixer = software it works. So it seems mopidy-alsamixer is either no allowed to interface with alsa or something is different. I did try giving Mopidy user access to video and audio groups

sudo adduser mopidy video
sudo adduser mopidy audio

@kingosticks
Copy link
Member

Have the control names also changed?

alsamixer/control: Which ALSA control to use. Defaults to Master. Other typical values includes PCM. Run the command amixer scontrols to list available controls on your system

@ericktruter
Copy link
Author

Old:
pi@raspberrypi:~ $ amixer
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 400 [100%] [4.00dB] [on]

New:
pi@raspberrypi:~ $ amixer
Simple mixer control 'Headphone',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 400 [100%] [4.00dB] [on]

Do I just need to change it to "Headphone" ?

@ericktruter
Copy link
Author

Ok, that was obvious then, clearly I'm too tired.

Thanks very much, it now works as expects.

pi@raspberrypi:~ $ mpc
volume:100% repeat: off random: off single: off consume: off
pi@raspberrypi:~ $ mpc volume 10
volume: 8% repeat: off random: off single: off consume: off

@kingosticks
Copy link
Member

Not at all, I'm sure this will be helpful to others.

@Alexdc-12
Copy link

Just helped me! Wiped my device and started again to get same issue! I had changed from pi 2 to pi4 and thought that was problem. Guess it was is upgrade!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants