It found out that is enough to call the function snd_pcm_open(). So I wrote a small program to "activate" the softvol mixer.
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <alsa/asoundlib.h>
static char *device = "default"; /* playback device */
int main(int argc, char *argv[]) {
snd_pcm_t *handle;
int err;
printf("Enable sofvol plugin\n");
if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
printf("Playback open error: %d,%s\n", err,snd_strerror(err));
exit(EXIT_FAILURE);
}
snd_pcm_close(handle);
exit(EXIT_SUCCESS);
}
After calling you request the current volume level.