Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a sound source connected via line-in to my computer. But when I change the master volume, only the volume of sounds being played on the computer (e.g. media, alerts, etc.) changes; the output volume of the line-in source does not change. How do I control that?

UPDATE:

To clarify, I don't just want to control the line-in output volume, I want to control the normal "output volume" from one control only, and I want that to affect also the line in output volume. Something like a "master volume" that would affect everything that comes out of the sound card output.

The "master volume" I see when running the command "alsamixer" only affects the sound that comes from the main pc, not from the line in.

share|improve this question

2 Answers 2

have you tried the line-in-control already ? Press Alt+F2 and type 'gnome-alsamixer'. You should get a window with a lot of controls, called mixer, in which you can adjust every single sound source.

P.S.: In notebooks, but also in PCs with sound-on-board the line-in is realized using a second sound device quite often, so it is possible you will have to choose another tab in the mixer (if there are more displayed) first.

share|improve this answer
    
Yes that works, I can use alsamixer from console. But I have the line in from the old to the new pc to "unify" all the sound into the 2x 2.1 speakers (i use to have one 2.1 on each pc), so I want to control ALL the volume from one control only. Because for example, the phone rings, I usually use my keyboard to lower the volume, but if something is playing from the second pc I would have to lower the volume of the main pc, and run a console to lower the volume of line-in. That's not very practical. Now i see the question doesn't explain that well, I just edited it. –  ithusx Jul 16 '12 at 16:15

I came up with a solution to be able to control the volume of both your "Master" and "Line" using only your keyboard's "Media Keys".

First step is to disable your default volume controls by going into System → Preferences → Keyboard Shortcuts, clicking the "Shortcuts" tab and setting Volume Up & Volume Down to "Disabled" on the "Sound and Media" page.

Secondly, you will need to assign your "Volume Keys" to custom commands on the "Custom Shortcuts" page. To do that, click on the "+" at the bottom to add a shortcut. Name the first command Volume Up and have it execute a scripts: ./path-to-scripts/VolumeUp.sh. Repeat this process for a second command and have it execute your VolumeDown.sh script instead. Next, click on the command where it says "Disabled" and assign your key to it (repeat for both).

Finally, create your 2 scripts referred by the custom shortcuts and copy paste the following into them:

VolumeUp.sh:

#!/bin/bash
amixer -c0 -sq <<-EOF
set Master 10%+
set Line 10%+
EOF

VolumeDown.sh:

#!/bin/bash
amixer -c0 -sq <<-EOF
set Master 10%-
set Line 10%-
EOF

Don't forget to set your scripts as "Allow executing file as program" in the file properties or chmod it to allow execution. You might also need to read up on amixer to know how much to modify the volume by (10% is just used as default).

If you open gnome-alsamixer, you should now see both "Master" and "Line" go up and down as you press your "Volume Keys". Only downside is the key, must be pressed and can't be held down to change the volume.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.