Skip to contentSkip to conversation

explicit commandline control of speakers vs headphone output

DISCUSSION Eric Holstege 2 participants 2 messages Aug 25, 2010

lore
Share & tools
lore
#0 lore raw

It appears that when I have a headphone plugged in, the speakers are automatically disabled and the output sound is sent to the headphone.

However, I want to explicitly control (e.g. via a script or commandline
- not a GUI) whether the sound from an (arbitrary) application is going to the speakers or to the headphone even when the headphone is plugged in. (When I say "arbitrary application" that means I can't alter the code of the application itself).

Is this possible?

(I have heard that ALSA mutes the speakers when it detects plugged-in headphones. Is switching between them as simple as using e.g. amixer(1) to unmute the speakers and mute the headphones and vice versa, or is there more to it.)

#1 lore raw

2010/8/26 Eric Holstege <[email protected]>

Quoted 9 lines

It appears that when I have a headphone plugged in, the speakers are automatically disabled and the output sound is sent to the headphone.

However, I want to explicitly control (e.g. via a script or commandline
- not a GUI) whether the sound from an (arbitrary) application is going to the speakers or to the headphone even when the headphone is plugged in. (When I say "arbitrary application" that means I can't alter the code of the application itself).

Quoted 9 lines

Is this possible?

(I have heard that ALSA mutes the speakers when it detects plugged-in headphones. Is switching between them as simple as using e.g. amixer(1) to unmute the speakers and mute the headphones and vice versa, or is there more to it.)

it is really hardware dependent

Which on-board sound driver are you using ?

auto mute is a specific feature for notebook in old day

For the desktop, the front panel audio connector of the AC97' chassis and HDA chassis

http://www.intel.com/support/motherboards/desktop/sb/cs-015851.htm

For some HDA codec, the headphone (front panel green jack) can be used indpendent of the rear panel jacks on desktop