You are not logged in.

#1 2015-04-16 13:10:40

pattisahusiwa
Member
Registered: 2015-04-07
Posts: 7

Different master volume setting for headphone and speaker using Alsa

Sorry if this is a duplicate post. This is my first post and I'm new to arch linux.

Previous I was used Linux Mint with i3-wm. In Mint, we can have different master volume setting for headphone and speaker. I mean when we mute master volume in speaker mode, it's not effected to headphone setting. We still can hear audio with the headphone. I'm always mute the speaker and hear any audio through headphone.

So, currently I just have alsa and can't achieve the same behaviour. When I'm muting the master volume, both of speaker and headphone are also muted. Any idea how to achieve the behaviour using alsa?

Oh, I'm not interesting to install PulseAudio, but I'll think about that if alsa is failed.

Offline

#2 2015-04-16 14:03:52

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Different master volume setting for headphone and speaker using Alsa

There should be separate channels for headphones and speakers if you use alsamixer for example.

Offline

#3 2015-04-16 16:28:11

pattisahusiwa
Member
Registered: 2015-04-07
Posts: 7

Re: Different master volume setting for headphone and speaker using Alsa

Thank you and sorry if the previous post is not clear enough.

Sorry, not mention before that I'm using laptop. So, the speaker is mean laptop's internal speaker.

Of course, I can manually mute/unmute speaker through alsamixer. But, i3-wm can't detected this state because master volume is not muted. If I mutted the master volume, the headphone will be mutted too, although it's not plugged in.

Maybe this is not a big problem, but it's annoying.  I need to launch alsamixer everytime to ensure that internal speaker is muted.

Offline

#4 2015-04-16 17:03:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Different master volume setting for headphone and speaker using Alsa

pattisahusiwa wrote:

Of course, I can manually mute/unmute speaker through alsamixer. But, i3-wm can't detected this state...

I haven't used i3 in quite a while, but it is immensly configurable; it sounds like you just need to configure it for your goals.

Alsamixer is not the only way to mute just a single channel - you can use alsa commands directly (via `amixer`) from the shell or a script (or an i3 keybinding).  The default keybindings and status information just use the "Master" channel as it is good for a simple default, but you may change these to mute/unmute and display the status of your preferred channel(s).

EDIT: for example, change a binding from the first of the three commands below to either of the latter two to specify which channel to mute/unmute:

amixer set Master toggle
amixer set Speaker toggle
amixer set Headphone toggle

Note that Master is as it sounds - when you mute/unmute Master, everything else is supposed to be affected.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB