When you select Analog Output or Speakers as port in Output Devices tab of pavucontrol, headphone levels are raised

Bug #1436269 reported by Jarno Suni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I expect that headphone levels are not raised, when Analog Output or Speakers is selected as port.

Please note, that Line out = analog output port is controlled by ALSA mixer track called PCM, whereas there should be a separate mixer track for it; see bug Bug #1433568

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: pulseaudio 1:4.0-0ubuntu11.1
ProcVersionSignature: Ubuntu 3.13.0-48.80-lowlatency 3.13.11-ckt16
Uname: Linux 3.13.0-48-lowlatency x86_64
ApportVersion: 2.14.1-0ubuntu3.7
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Mar 25 12:34:23 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-09-21 (185 days ago)
InstallationMedia: Ubuntu-Studio 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.1)
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/26/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 2.6.6
dmi.board.name: 0RF703
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 6
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr2.6.6:bd06/26/2011:svnDellInc.:pnOptiPlex745:pvr:rvnDellInc.:rn0RF703:rvr:cvnDellInc.:ct6:cvr:
dmi.product.name: OptiPlex 745
dmi.sys.vendor: Dell Inc.

Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

first you have to fix pcm playback volume in line out jack

Node 0x05 [Pin Complex] wcaps 0x400185: Stereo Amp-Out
  Control: name="PCM Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="PCM Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Jack", index=0, device=0
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals: [0x2f 0x2f]
  Pincap 0x00000017: OUT Detect Trigger ImpSense
  Pin Default 0x01014010: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x03* 0x0e

pulseaudio need to use line out jack to determine the availability instead of unknown

analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
   properties:

 active profile: <output:analog-stereo+input:analog-stereo>
 sinks:
  alsa_output.pci-0000_00_1b.0.analog-stereo/#0: Built-in Audio Analog Stereo
 sources:
  alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
  alsa_input.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
 ports:
  analog-input-microphone: Microphone (priority 8700, latency offset 0 usec, available: yes)
   properties:
    device.icon_name = "audio-input-microphone"
  analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
   properties:

  analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
   properties:

  analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
   properties:
    device.icon_name = "audio-speakers"
  analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
   properties:
    device.icon_name = "audio-headphones"

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Jarno Suni (jarnos) wrote :

As for #2, what do you mean by "pulseaudio need to use line out jack to determine the availability instead of unknown"? The problem is that headphone volume raises, when you control another port in pavucontrol.

Revision history for this message
Jarno Suni (jarnos) wrote :

I tested this by upstream kernel 4.0.0-040000rc5-lowlatency, where there is "Line Out" mixer in ALSA for the (second) analog output.

When I choose "Speakers (unavailable)" port in pavucontrol, Headphone level is raised to dB gain 0 (equals 89%) and the port level controls Master volume and Speaker volume (in ALSA). By the way, why does it read "(unavailable)" even if it is available and playing and Auto-Mute Mode is set to Disabled? The text changes to "Speakers", if I unplug headphones.

When I choose "Analog Output" port, Speaker volume sets to 0%, though Speaker unmutes, Headphone sets to dB gain 0 (equals 89%), and the port level controls only Master volume.

When I choose "Headphones (plugged in)" port, Speaker volume is set to 0%, Speaker mutes, and adjusting the port level controls Master volume and Headphone volume.

Why isn't it just so that Speakers port controls Speaker in ALSA and does not change others, Analog Output port controls only Line Out in ALSA and does not change others, and Headphones port controls only Headphone in ALSA and does not change others? pavucontrol should have a separate mixer for Master volume, and the volume control in Indicator Plugin should control just that. Besides muting a port should only mute a respective mixer in ALSA. It is annoying that muting Headphone in alsamixer mutes Master and sometimes Speaker, too, (and thereafter unmuting Headphone in alsamixer unmutes only Headphone, but Master remains muted.) As for PCM volume, I don't know if pavucontrol should have specific access for it.

Revision history for this message
Jarno Suni (jarnos) wrote :

See also Bug #1254884

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Jarno Suni (jarnos) wrote :

The bug exists in upstream (4.0.0-040000rc5-lowlatency)

description: updated
Changed in pulseaudio (Ubuntu):
status: Expired → New
Revision history for this message
Raymond (superquad-vortex2) wrote :

http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-May/023902.html

you need this patch since [Element Line Out] is not defined in lineout. ong

https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio

open upstream bug report if it still not work

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Jarno Suni (jarnos) wrote :

I have no idea how to apply patches.

Revision history for this message
Jarno Suni (jarnos) wrote :

In the rc kernel there is Line out channel, but that did not fix the bug.

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

is there any point to change line out playback volume to minimum when speaker profile is selected
you have to follow up with the author if his patch still not fix your problem

diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
index b6d9f94..101edd8 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
@@ -68,6 +68,10 @@ volume = zero
 switch = mute
 volume = zero

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Headphone+LO]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
index 39193dd..e3b6c54 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
@@ -84,6 +84,10 @@ volume = off
 switch = off
 volume = off

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Speaker+LO]
 required-any = any
 switch = mute

Revision history for this message
Raymond (superquad-vortex2) wrote :

in theory ,you just need pulseaudio to mute line out playback switch when headphone is plugged

and pulseaudio use line out playback volume when line out profile is selected

index b6ee70b..a7a2140 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -68,6 +68,10 @@ override-map.2 = all-left,all-right
 switch = off
 volume = off

+[Element Line Out]
+switch = off
+
 [Element Speaker+LO]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-lineout.conf b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
index 68f444a..8e7a655 100644
--- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
@@ -83,6 +83,12 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right

+[Element Line Out]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+

Revision history for this message
Raymond (superquad-vortex2) wrote :

you have to post pulseaudio verbose log

state.Intel {
 control.1 {
  iface MIXER
  name 'Line Out Playback Volume'
  value.0 61
  value.1 61
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 63'
   dbmin -9150
   dbmax 300
   dbvalue.0 0
   dbvalue.1 0
  }
 }

 control.3 {
  iface MIXER
  name 'Headphone Playback Volume'
  value.0 61
  value.1 61
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 63'
   dbmin -9150
   dbmax 300
   dbvalue.0 0
   dbvalue.1 0
  }
 }

 control.5 {
  iface MIXER
  name 'Speaker Playback Volume'
  value 0
  comment {
   access 'read write'
   type INTEGER
   count 1
   range '0 - 63'
   dbmin -9150
   dbmax 300
   dbvalue.0 -9150
  }
 }

dB range of those playback volume controls are -91.5dB to +3.0 dB

check the dB range of three paths

>Why isn't it just so that Speakers port controls Speaker in ALSA and does not change others, Analog Output port controls only Line Out in ALSA and does not change others, and Headphones port controls only Headphone in ALSA and does not change others?

when virtual master playback volume is changed, the playback vilume of all the slaves also changed

try comment the volume of [Element Master] in those three .conf files(lineout, speakers and headphone ) and observe any difference

Revision history for this message
Raymond (superquad-vortex2) wrote :

the balance slider in sound preference is useless when volume slider is using with the mono virtual master playback volume

Card hw:0 'Intel'/'HDA Intel at 0xfe9fc000 irq 44'
  Mixer name : 'Analog Devices AD1983'
  Components : 'HDA:11d41983,102801da,00100400'
  Controls : 28
  Simple ctrls : 12
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 63
  Mono: Playback 49 [78%] [-21.00dB] [on]

Revision history for this message
Jarno Suni (jarnos) wrote :

I have passive speakers connected to the headphone connector. I want output to headphone connector occur only, when analog-output-headphones port is manually selected as the active port of the sink. Another use case is that user wants to switch output to Headphones always, if they are plugged in, and auto mute other outputs, too. I think that could be done by automatically switching analog-output-headphones port as active port of the sink - optionally. As third use case, sometimes you might want to have simultaneous output to Line Out and Headphones output, but then you may want to change their volumes independently.

Revision history for this message
Raymond (superquad-vortex2) wrote :

in addition to comment the volume entry of [Element Master] , you may need to comment volume entry of [Element PCM] in analog-output.conf.common

the dB range of three paths in pulseaudio log should be the same (i.e. -91.5 dB +3 dB)

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=3abb4f4d0e7aaad0d12004b5057f4486a688752b

this patch change PCM playback Volume to Line Out Playback Volume

softvol plugin create a user control PCM playback Volume with dB range -51 dB

control.XX {
  comment.access 'read write user'
  comment.type INTEGER
  comment.count 2
  comment.range '0 - 255'
  comment.tlv '0000000100000008ffffec1400000014'
  comment.dbmin -5100
  comment.dbmax 0
  iface MIXER
  name 'PCM Playback Volume'
  value.0 255
  value.1 255
 }

Revision history for this message
Raymond (superquad-vortex2) wrote :

> As third use case, sometimes you might want to have simultaneous output to Line Out and Headphones output, but then you may want to change their volumes independently.

https://bugs.freedesktop.org/show_bug.cgi?id=90496

Revision history for this message
Jarno Suni (jarnos) wrote :

Works as expected in pulseaudio 6.0 (at least in package version 1:6.0-0ubuntu9 of wily)

Jarno Suni (jarnos)
Changed in pulseaudio (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.