My audio system is simple: two speakers in the rear panel--front left(FL)
,front right(FR)
,headphone in the front panel. The primitive status is as below--primitive status:
In this status , sound can be heared from FL
,FR
,and headphone
.
I find a strange fact that master
,front
,surround
in alsamixer changed into MM
status when to click M
on LFE
,i move the cursor on LFE
,and click M
,LFE
changed into MM
,at the same time master
,front
,surround
all changed into MM
status !No sound can be heared !
And i click M
for the second time on LFE
,all status changed as below:
Let's go on from the primitive status,and unplug line from rear panel,no sound in headphone! The status in alsamixer gui is as below:
Now re-plug the line in the rear panel,the status in alsamixer gui turns into :
Please give an explanation in detail.
To see what's going on:
alsactl monitor
.alsamixer
.The reason this is happening is because of the pulseaudio profile in use by alsamixer.
/usr/share/pulseaudio/alsa-mixer/profile-sets/*.conf
/usr/share/pulseaudio/alsa-mixer/paths/*.conf
So which ones are in use? You can check that with pacmd info | grep "active"
, which may produce something like:
active port: <analog-output-speaker>
active port: <analog-input-headphone-mic>
active profile: <output:analog-stereo+input:analog-stereo>
Ok, so the output mapping is analog-stereo
. I can find this in /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
. It contains the following:
[Mapping analog-stereo]
device-strings = front:%f hw:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 10
The real control is under /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf
. You can read /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common
for details, where we see two important sections:
; When a device shall be muted/unmuted *all* elements listed in a path
; file with "switch = mute" will be toggled.
(there's a bit of a caveat to this one. It seems that unmuting does NOT toggle other elements in the path)
and
; [Element ...] # For each element that we shall control
...
; switch = ignore | mute | off | on | select # What to do with this switch: ignore it, make it follow mute status,
; # always set it to off, always to on, or make it selectable as port.
; # If set to 'select' you need to define an Option section for on
; # and off
...
So now, if we want to adjust an element such that it's always on, always off, or simply ignores muting, we would set the corresponding switch=
values in the Element of interest.
If you want to adjust the behavior of the headphones when activating that path (i.e. when plugging them in), change the Element values in paths/analog-output-headphones.conf