Bug 94648 - Pulseaudio does not rememebr volume level of headphone when connected via docking station
Summary: Pulseaudio does not rememebr volume level of headphone when connected via doc...
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: pavucontrol (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-21 15:20 UTC by Géza Búza
Modified: 2018-07-30 09:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Output Devices tab in pavucontrol (81.08 KB, text/plain)
2016-03-21 15:20 UTC, Géza Búza
Details
Input Devices tab in pavucontrol (39.44 KB, image/png)
2016-03-21 15:21 UTC, Géza Búza
Details
Output of lspci -v (10.77 KB, text/plain)
2016-03-21 15:21 UTC, Géza Búza
Details
Output Devices tab in pavucontrol (81.08 KB, image/png)
2016-03-21 15:22 UTC, Géza Búza
Details
Output of alsa-info.sh (25.04 KB, text/plain)
2016-03-22 08:58 UTC, Géza Búza
Details
Output of alsa-info.sh (37.52 KB, text/plain)
2016-03-22 13:00 UTC, Géza Búza
Details
/etc/pulse/default.pa (5.57 KB, text/plain)
2016-03-23 21:11 UTC, Géza Búza
Details
Alsa mixer configuration files (8.76 KB, application/gzip)
2016-03-24 18:09 UTC, Géza Búza
Details

Description Géza Búza 2016-03-21 15:20:26 UTC
Created attachment 122456 [details]
Output Devices tab in pavucontrol

When I plug in a headphone into my notebook, the previously set volume level is restored which is a very nice feature.
But when I connect my notebook to a docking station (a.k.a. port replicator), volume is not changed anymore.

The strange thing is that microphone is reported as a separated device, but headphone is not. Maybe I need to create an udev rule for headphones?
Can I get some help please?
Comment 1 Géza Búza 2016-03-21 15:21:21 UTC
Created attachment 122457 [details]
Input Devices tab in pavucontrol
Comment 2 Géza Búza 2016-03-21 15:21:44 UTC
Created attachment 122458 [details]
Output of lspci -v
Comment 3 Géza Búza 2016-03-21 15:22:49 UTC
Created attachment 122459 [details]
Output Devices tab in pavucontrol
Comment 4 Raymond 2016-03-21 15:29:56 UTC
You have to post output of alsa-info.sh
Comment 5 Géza Búza 2016-03-22 08:58:34 UTC
Created attachment 122478 [details]
Output of alsa-info.sh

Hi Raymond,

I've attached the alsa-info.txt as you asked.
Comment 6 Raymond 2016-03-22 09:11:42 UTC
your alsa-info seem missing output of alsactl


 dock line out jack which share volume control with speaker

either need dock-lineout.conf

or add [Jack Dock Line Out] to analog-output-lineout.conf

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-lineout.conf


[    5.488544] input: HDA Intel PCH Dock Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14




Node 0x0e [Pin Complex] wcaps 0x400581: Stereo
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x23011050: [Jack] Line Out at Sep Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x5, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 3
     0x13* 0x14 0x1c


Node 0x13 [Audio Output] wcaps 0xd0c05: Stereo Amp-Out R/L
  Control: name="Speaker+LO Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker+LO Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="92HD93BXX Analog", type="Audio", device=0
  Amp-Out caps: N/A
  Amp-Out vals:  [0x55 0x55]
  Converter: stream=5, channel=0
  Power states: 
  Power: setting=D0, actual=D0
  Delay: 13 samples
Comment 8 Géza Búza 2016-03-22 13:00:18 UTC
Created attachment 122481 [details]
Output of alsa-info.sh

I've attached the updated alsa-info.txt which includes alsactl output.

In ArchLinux the Alsa configuration is minimalistic. 
cat /etc/asound.conf
# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:

When I add the contents of analog-output-lineout.conf to this file, all sound devices are gone, and I will get a Dummy Output device only.
What did I do wrong?
Comment 9 Raymond 2016-03-22 13:15:23 UTC
headphone playback volume was off and muted by this patch when dock line out is plugged

try revert this patch

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-lineout.conf?id=9d0a5b5cb7ea3adc1b548a6e1e953ee20835e6b6
Comment 10 Raymond 2016-03-22 14:07:11 UTC
[Element Headphone]
switch = off 
-volume = off

Just remove volume
Comment 11 Raymond 2016-03-22 22:49:51 UTC
control.23 { iface CARD name 'Dock Line Out Jack' value true comment { access read type BOOLEAN count 1 } } 
control.24 { iface CARD name 'Headphone Jack' value false comment { access read type BOOLEAN count 1 } } 
control.25 { iface CARD name 'Speaker Phantom Jack' value true comment { access read type BOOLEAN count 1 } }

 The headphone was changed when Dock line out is plugged or headphone is unpluggef

https://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-speaker.conf?id=22aac4e9fdb3786178f7815a0cb2150f588b1582
Comment 12 Géza Búza 2016-03-23 21:11:17 UTC
Created attachment 122508 [details]
/etc/pulse/default.pa

@Raymond Sorry, I can't follow you. All the ALSA config I have is what I posted in Comment 8. I double checked it by running this command:
sudo grep -R '\[Element Headphone\]' /etc

There is no configuration containing this section.


However there is the /etc/pulse/default.pa config which loads a lot of PulseAudio plugins. And I presume one of these modules does not auto-detect the Dock headphone output, opposed to the Dock microphone which is found correctly.
Comment 13 Raymond 2016-03-24 01:30:26 UTC
Do you find the directory which contain those conf files

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths
Comment 14 Raymond 2016-03-24 01:58:17 UTC
Those pin complexes do mot have mute cap

Only those audio output have amp out cap mute=1 which is shared by two pin


Node 0x0d [Pin Complex] wcaps 0x400501: Stereo 
Pincap 0x00010050: OUT EAPD Balanced 
EAPD 0x2: EAPD 
Pin Default 0x90170110: [Fixed] Speaker at Int N/A Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE 
Pin-ctls: 0x00: 
Power states: 
Power: setting=D3, actual=D3 
Connection: 3 
0x13* 0x14 0x1c


Speaker is muted (pin ctl set to zero) by driver 

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/patch/sound/pci/hda/patch_sigmatel.c?id=d89c6c0c91af0344b52dd21ca48dd29821fee677
Comment 15 Raymond 2016-03-24 02:00:58 UTC
In agressive power saving mode,  the driver power down the widgets
Comment 16 Géza Búza 2016-03-24 18:09:31 UTC
Created attachment 122523 [details]
Alsa mixer configuration files

Finally I've found the configuration in /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf

[Jack Dock Line Out] is in there, mute line is removed from section [Element Headphone], I've restarted pulseaudio, but still no change.

I found a discussion about this topic in here https://lists.freedesktop.org/archives/pulseaudio-discuss/2015-June/024090.html
As I see all the changes mentioned there is already added to my configuration.

Is there anything else I can try?
Comment 17 Raymond 2016-03-25 01:50:43 UTC
If you expect pulseaudio can restore user 's different volume setting of speaker, dock lineout and headphone, dpo pulseaudio save those setting when you logout in database

You need to undestand the behaviour of virtual master colume which control those slaves

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound?id=2134ea4f37d36addbe86d4901f6c67a22a5db006
Comment 18 Raymond 2016-03-25 02:01:28 UTC



{ control.1 { iface MIXER name 'Speaker+LO Playback Volume' value.0 127 value.1 127 comment { access 'read write' type INTEGER count 2 range '0 - 127' dbmin -9999999 dbmax 0 dbvalue.0 0 dbvalue.1 0 } } 

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



control.18 { iface MIXER name 'Master Playback Volume' value 85 comment { access 'read write' type INTEGER count 1 range '0 - 127' dbmin -9999999 dbmax 0 dbvalue.0 -3150 } }

As it only have one value instead of two, balance,( fade and bass for those support 5.1) change when you change the virtual master
Comment 19 GitLab Migration User 2018-07-30 09:28:30 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/15.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.