Hi

I am building a small form factor PC communication device for a communication 
system. The PC is running Ubuntu 12.04 (using a small set of installed 
packages). We use a number of USB audio devices attached to the PC to perform 
the actual audio input and output. In this case a PC might have 3 devices 
connected simultaneously: a handset, a headset and a speaker. For each of these 
devices I would like to be able to set a reference volume (a volume that we set 
from the system to a configured value) and provide a volume control that the 
user is able to control - but control relative to the reference value.

For some devices we are able to do this using the Master volume control (as 
reference) and the PCM volume control for the user. We control the UI for 
changing the volume so the name of the control is not important.

My problem is that not all of the devices we have provide a Master volume 
control, so my goal is to provide this "Master" control as a softvol control 
either for devices that does not have them, or create an entirely different 
control, perhaps "Reference" and use that.

I have followed 
http://alsa.opensrc.org/How_to_use_softvol_to_control_the_master_volume and 
configured individual devices to add this control and doing it this way works 
quite well. The only problem is that I have to do this for each device 
individually and I would rather if I could define this once and have it created 
for all USB audio devices.

I have tried to create an /etc/asound.conf to see if I could do this but 
unfortunately I am not very strong in writing these configuration files so I 
have been unable to write something that actually works.

I there anyone who can help me shed some light on whether it is possible to do 
it generally and if so, how to do it? 

The audio configuration is based on the scripts that are part of the Ubuntu 
12.04 (LTS) distribution and has not been modified.

One of my tries has looked like the following, but I am definitely missing 
something:

pcm.reference {
       @args [ CARD ]
       @args.CARD {
               type string
       }

       type softvol
       slave.pcm {
               type hw
               card $CARD
               subdevice 0
       }
       control {
               name "Reference"
               card $CARD
       }
}

pcm.!default {
       type plug
       slave.pcm "reference"
}

Med venlig hilsen/ Best Regards

Lau Bakman
Systems Engineer
Business Area Security & Defence Solutions

Direct:  + 45 36 38 30 23
Mobile: + 45 41 87 60 23
E-mail: lau.bak...@dk.saabgroup.com

Saab Danmark A/S
Alsion 2        
DK - 6400 Sonderborg                        
www.saabgroup.com


This e-mail is private and confidential between the sender and the addressee. 
In the event of misdirection, the recipient is prohibited from using, copying 
or 
disseminating it or information in it. Please notify the above if any 
misdirection.


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to