2010/9/29 Colin Guthrie gmane@colin.guthr.ie
- 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);