I'm trying to write a script that automatically changes the playback/capture audio levels based on the device that is connected.
I'm using a MAYA44 USB+ sound with 4 ch in/out.
Thanks to a similar question here: https://askubuntu.com/questions/97936/terminal-command-to-set-audio-volume
I learned to use the following command:
amixer -c 2 sset Line,1 50%
The problem I have is that it seems like the capture control shares the same name as a playback control: Line
amixer -c 2 sset Line 50%
Changes the values of BOTH controls.
As mentioned above, I'm writing a script to do this automatically so I don't want to manually go into alsamixer and do it manually.
Is there a way to rename the controls so that there isn't a naming clash? Otherwise, is there some sore of suffix or prefix I can add to the 'Line' value to specify that I want to affect the CAPTURE device? Would using pulse audio in some way be another option?
Basically, how I can change the capture control values without affecting the playback values?
Thanks in advance!