Re: Softvol plugin weird behavior with playback/capture streams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/18/2014 03:57 PM, Clemens Ladisch wrote:
> elboulangero wrote:
>> I recently discovered the softvol plugin, and used it to add a Master
>> volume to my USB soundcard, which doesn't have one. I followed the
>> tutorial from alsa.opensrc.org [1].
>>
>> I'm quite happy with it, but I found a little issue that I'd like to
>> share here.
>> The trouble is that the softvol appears as both a playback/capture
>> device
> This is because the .asoundrc applies it to both playback and capture.
>
> Try this instead:
>
> pcm.!default {
>    type asym
>    playback.pcm {
>      type plug
>      slave.pcm "softvol"
>    }
>    capture.pcm {
>      type plug
>      slave.pcm "hw:0"  # or whatever
>    }
> }
>
> To prevent the mixer from showing it as a capture control, name
> it "Master Playback Volume" instead.
>
>
> Regards,
> Clemens

Hi Clemens,

thanks a lot for the explanations, your piece of conf works perfectly !

My master volume is now presented by amixer under the name 'Master', 
with a pvolume capability. It appears only in playback. Great !

Now, just out of curiosity, I tried to name the softvol control with 
another name, like 'Master2'. In this case, the mixer is presented under 
the name Master2, but appears both in playback and capture. So my 
understanding is that:
- control name can be anything
- however, some names (like "Master Playback Volume") have a special 
meaning.

Am I correct ?

In the doc [1], I can read the following:

"If the control already exists and it's a system control (i.e. no 
user-defined control), the plugin simply passes its slave without any 
changes."

Does that mean that "Master Playback Volume" is a system control ?
Is it easy to get a list of such system controls, or is it something 
that must be looked at directly in the source code ?


Regards,
Arnaud

--

Definitive asoundrc for my USB soundcard:

# Create a virtual device to control the volume
pcm.softvol {
     type softvol
     slave {
         pcm "sysdefault:CARD=K6"
     }
     control {
         name "Master Playback Volume"
         card "K6"
     }
}

# Set K6 as default, and assign playback to softvol device
pcm.!default {
     type asym
     playback.pcm {
         type plug
         slave.pcm "softvol"
     }
     capture.pcm {
         type plug
         slave.pcm "sysdefault:CARD=K6"
     }
}

ctl.!default {
     type hw
     card "K6"
}


--

[1] http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux