[alsa-devel] alsactl adds volume controls?

Raymond Yau superquad.vortex2 at gmail.com
Sun Oct 3 09:37:52 CEST 2010


2010/9/29 Colin Guthrie <gmane at colin.guthr.ie>

>
> 1. The point about opening "front" for both playback and capture in PA
> is valid but irrelevant in this case. We are, for the moment, only
> concerned about playback streams and ensuring that the mixers apparently
> used to control the volume for that stream are accurate.
>


PA open "front" device for playback and capture is one of the reason why so
many user complain about recording volume is too low since the softvol
plugin in front device only provide atteunation

It is possible for softvol plugin to reject a capture stream to use a name
containing "Playback" or a playback stream to use a name containing
"Capture"



    if (resolution <= 1 || resolution > 1024) {
        SNDERR("Invalid resolution value %d", resolution);
        return -EINVAL;
    }
+    if ( strstr(name, ((stream == SND_PCM_STREAM_PLAYBACK) ? "Capture":
"Playback")) > 0 ) {
+        SNDERR("Invalid name %s for %s stream", name,
+        stream ==  SND_PCM_STREAM_PLAYBACK ? "Playback" : "Capture" );
+       return -EINVAL;
+     }
    if (mode & SND_PCM_NO_SOFTVOL) {
        err = snd_pcm_slave_conf(root, slave, &sconf, 0);
        if (err < 0)
            return err;
        err = snd_pcm_open_named_slave(pcmp, name, root, sconf, stream,
                           mode, conf);
        snd_config_delete(sconf);


More information about the Alsa-devel mailing list