Search code examples
linuxubuntualsapulseaudio

Fix microphone volume for a user


I need to fix the microphone volume for any user in Ubuntu 16. What I want is to fix the volume, say, to %40, and keep it at that value for all times. It must be changed by no user except root. How can I do such a config? And with what tool?

Thanks.


Solution

  • All mixer controls of a card are managed with a single device node (/dev/snd/controlCx), so it is not possible to use file permissions for this.

    However, you could program a separate tool that calls snd_ctl_elem_lock() for the mixer control that no other program should be able to change.