alsa softvol does not show up in amixer

I have a orangepi pc and need to setup an alsa softvol pcm to control the i2s dac volume.

Therefore I have create the following /etc/asound.conf

pcm.!default { type plug slave.pcm "softvol"
}
pcm.softvol { type softvol slave { pcm "hw:1,0" } control { name "SoftVol" card 1 }
}

and here are the detected devices

root@orangepipcplus:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
card 1: snddaudio [snddaudio], device 0: SUNXI-TDM0 snddaudio-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
card 2: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0

For some reason controlling the volume with alsamixer does nothing. And if I change the control block in the asound.conf from SoftVol to e.g. Master no control with the name Master appears in alsamixer after a reboot.

So my nasty suspicion is that my /etc/asound.conf is not read by alsa!

The OS I am using is Armbian -> Debian.

I have another pi (nanopi) also running Armbian -> Debian using the same /etc/asound.conf and there everything is working.

4

1 Answer

The mixer will not show up until it is used for the first time. Per alsa.opensrc.org:

Note: The new volume control won't appear immediately! Only after the first usage of the newly defined device (e.g. with the command above), should amixer controls | grep <control name> display your new control. Mixers that were already started before the first usage (like KMix) have to be restarted to adopt the changes. If you still don't see the new control, try restarting ALSA or your PC.

Since your config sets the default to the softvol device, running speaker-test or using aplay to play a .wav file should be sufficient to make the volume control appear.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like