[HP EliteBook 840 G2, Realtek ALC3228, HP UltraSlim Dock 2013] Line in/Line out on docking station doesn't work

Bug #1470730 reported by Christoffer Holmstedt on 2015-07-02
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Medium
Unassigned

Bug Description

When I plug in external speakers to line in/line out combo on the laptop the internal speakers are turned off but when I plug the speakers into the docking station (HP UltraSlim Dock 2013 EURO, D9Y32AA) music keeps playing in the internal speakers. Similar behaviour (nothing happens) is experienced with microphone connected to line in on docking station.

### Expected behaviour
Plugging in external speakers to docking station should turn off sound from laptop internal speakers.

Plugging in microphone to line in on docking station should switch from "internal microphone" to "microphone" in Ubuntu sound settings.

### Current behaviour
Sound keeps playing in internal speakers when plugging in external speakers to docking station.

Plugging in microphone to line in on docking station, nothing happens.

### Hardware
Laptop: HP EliteBook 840 G2
Product number: H9W19EA#AK8

Docking station: HP UltraSlim Dock 2013 EURO
Product number: D9Y32AA

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: alsa-base 1.0.25+dfsg-0ubuntu4
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: chol 2001 F.... pulseaudio
 /dev/snd/controlC0: chol 2001 F.... pulseaudio
 /dev/snd/controlC1: chol 2001 F.... pulseaudio
CurrentDesktop: Unity
Date: Thu Jul 2 08:16:15 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-06-05 (26 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_AlsaPlaybackTest: ALSA playback test through plughw:PCH successful
Symptom_Card: Built-in Audio - HDA Intel PCH
Symptom_Jack: Black Headphone Out, Right
Symptom_PulsePlaybackTest: PulseAudio playback test successful
Symptom_Type: Only some of outputs are working
Title: [HP EliteBook 840 G2, Realtek ALC3228, Black Headphone Out, Right] Playback problem
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/24/2015
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: M71 Ver. 01.04
dmi.board.name: 2216
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 96.54
dmi.chassis.asset.tag: 5CG5093YZ7
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvrM71Ver.01.04:bd02/24/2015:svnHewlett-Packard:pnHPEliteBook840G2:pvrA3009D410303:rvnHewlett-Packard:rn2216:rvrKBCVersion96.54:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP EliteBook 840 G2
dmi.product.version: A3009D410303
dmi.sys.vendor: Hewlett-Packard

val-s (val-s) wrote :

Confirmed bug - HP EliteBook 9470m and 9480m. Works fine in WIndows.
US UltraSlim docking station (2013 model)

Although I can no longer test it, I believe this issue was also in 14.04.

Raymond (superquad-vortex2) wrote :

post output of

hdajacksensetest -c1 -a

before you dock, plug and unplug of dock line out and line in jacks

Changed in alsa-driver (Ubuntu):
status: New → Incomplete

Thanks for the response Raymond I'm now back infront of the failing computer but I can't figure out which package I need to install to get the "hdajacksensetest" command working. I have installed alsa-tools and alsa-tools-gui but without success. Any help is appreciated.

Changed in alsa-driver (Ubuntu):
status: Incomplete → New
Download full text (3.5 KiB)

Thanks Raymond, I hope this information helps.

I took the time to test line in (microphone) capabilities as well and I noticed that is failing as well in a similar fashion. I have updated the bug report title and initial text to reflect that as well. Here are the results:

### Not docked, no speakers connected
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Right side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Right side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

### Not docked, only speakers connected to laptop line in/line out combo port
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Right side): present = Yes
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Right side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

### Not docked, In-Ear headphones connected to laptop line in/line out combo port
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Right side): present = Yes
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Right side): present = Yes
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

### Docked, no speakers connected
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Right side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Right side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

### Docked, speakers connected to the dock (line out)
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Right side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Right side): present = No
Pin 0x1b (Not connected): present = Yes
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

### Docked, microphone connected to dock (line in)
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
...

Read more...

summary: - [HP EliteBook 840 G2, Realtek ALC3228, Black Headphone Out, Right]
- Headphone out on docking station doesn't work
+ [HP EliteBook 840 G2, Realtek ALC3228, HP UltraSlim Dock 2013] Line
+ in/Line out on docking station doesn't work
description: updated
Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Raymond (superquad-vortex2) wrote :

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

00:1b.0 0403: 8086:9ca0 (rev 03)
 Subsystem: 103c:2216

try add pci quirk for your laptop if those missing dock pins are the same as yours

hmm, I'm afraid you lost me now Raymond. Do I need to completely compile/install alsa from git source or can the change be made some other way?

I only got the help tool up and running earlier, didn't reinstall alsa.

Raymond (superquad-vortex2) wrote :

+ [ALC280_FIXUP_HP_DOCK_PINS] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x1b, 0x21011020 }, /* line-out */
+ { 0x1a, 0x01a1903c }, /* headset mic */
+ { 0x18, 0x2181103f }, /* line-in */
+ { },
+ },
+ .chained = true,
+ .chain_id = ALC280_FIXUP_HP_GPIO

hdajackretask only fixup the missing pin

since hda verb and early patching only part of the init
but there is no workaround for alc280_fixup_hp_gpio4
the only way is to recompile alsa driver

static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
       const struct hda_fixup *fix, int action)
{
 /* Like hp_gpio_mic1_led, but also needs GPIO4 low to enable headphone amp */
 struct alc_spec *spec = codec->spec;
 static const struct hda_verb gpio_init[] = {
  { 0x01, AC_VERB_SET_GPIO_MASK, 0x18 },
  { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x18 },
  {}
 };

 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
  spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
  spec->gen.cap_sync_hook = alc269_fixup_hp_cap_mic_mute_hook;
  spec->gpio_led = 0;
  spec->mute_led_polarity = 0;
  spec->gpio_mute_led_mask = 0x08;
  spec->cap_mute_led_nid = 0x18;
  snd_hda_add_verbs(codec, gpio_init);
  codec->power_filter = led_power_filter;
 }
}

Raymond (superquad-vortex2) wrote :
Raymond (superquad-vortex2) wrote :

do your elitebook have mute led and mic mute button ?

Ok, I will give it a try to recompile. Not sure what you mean with "mute led" but the laptop has the following keys/buttons:

1. Mute sound, this works as expected (both the button and the led showing state).

2. Turn on and off WiFi, this button does _not_ work to 100%. It will turn off/on the wifi but the color of the led doesn't change. Should be orange when it is off and lightblue when it is on.

3. "fn+f11" toggles 4 different levels of keyboard backlight including completely off. This works as expected.

hmm, I cloned the kernel sources from git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git, checked out tag "Ubuntu-3.19.0-25.26" which is the tag matching my current running kernel I think (uname -r gives 3.19.0-25-generic) but when I compile the kernel modules they are installed as "3.19.8-ckt2".

How do I properly compile the kernel hda (alsa) drivers/modules for my specific running kernel?

Raymond (superquad-vortex2) wrote :

if you don't need those fix in alc280_fixup_hp_gpio4

the easy way is to use hdajackretask to add the missing pin

Changed in alsa-driver (Ubuntu):
importance: Undecided → Medium
val-s (val-s) wrote :

For reference, here's the output on the HP Elitebook 9480m. Not much difference, except that things are on the Left side. Does that matter?

When should we expect this fix to be rolled in? (don't know how things work). I tried retasking using hdjackretask, but I was unable to get any sound out the speakers after selecting the Line Out, probably did something wrong.

Docked, nothing plugged in:
-
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Left side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Left side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

Docked, plugged into mic:
-
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Left side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = Yes
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Left side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

Docked, headphone plugged into dock:
--
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Left side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Left side): present = No
Pin 0x1b (Not connected): present = Yes
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

undocked:
-
Pin 0x12 (Internal Mic): present = No
Pin 0x13 (Not connected): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x15 (Black Headphone, Left side): present = No
Pin 0x16 (Not connected): present = No
Pin 0x17 (Not connected): present = No
Pin 0x18 (Not connected): present = No
Pin 0x19 (Not connected): present = No
Pin 0x1a (Black Mic, Left side): present = No
Pin 0x1b (Not connected): present = No
Pin 0x1d (Not connected): present = No
Pin 0x1e (Not connected): present = No

val-s (val-s) wrote :

forgot to mention:
I'm on 4.2.3-040203-generic #201510030832 SMP Sat Oct 3 12:34:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I no longer have access to the laptop and docking station that is failing and can therefore not test it anymore. Thanks for the help so far, hope it gets solved for everyone else.

tolky77 (tonasz) wrote :

hi, i have the same problem. HP 820 G2 / sound not working when laptop is in docking station (HP UltraSlim Dock 2013 EURO)
My OS is: Linux 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8 10:21:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

val-s (val-s) wrote :

I guess I'm still not understanding the release process and whether this is fixed, if there is more information needed, and how we can test it? Sorry for a newbie question, but what's next?

I don't mind giving it a whirl if someone shares installation instructions. I'm unclear how to properly recompile alsa-driver for ubuntu or if I can pull an upstream artifact with this fix.

Vytautas Lukenskas (lukevyta) wrote :

The same situation is with HP Zbook 15 G2 and HP Basic Docking Station.

Alfredo (p-alfredo) wrote :

Just the same situation reported by Vytautas Lukenskas (lukevyta)

zorgzorg2 (mraspaud) wrote :

I can confirm the problem on an HP 840 elitebook. Same symptoms as OP

Gijs (blight) wrote :

Confirmed. Also on the ("new") HP Elitebook 850 G2 w/ HP Ultraslim Docking Station 2013.

However after fiddling around with hdajacksensetest and hdajackretask it got it work but after a reboot settings are gone and im missing audio again.

Gijs (blight) wrote :

After fiddling around with "hdajackretask" i managed to map the pin 0x18 (in my case) to a speaker output and its visible now in the sound manager.

# hdajacksensetest -c1 -a (diff. when plugging / unplugging audio cable. It should show up a pin that is in use when plugged in. in my case "0x18".

# hdajackretask

Select the pin # you found out earlier using "hdajacksensetest" (0x18 in my case)

Select "Show unconnected pins" and "Advanced options". Configure as follows:

Connectivity: Jack
Color: Green
Location: Dock
Jack Detection: Present
Device: Line Out
Channel Group: 1
Channel (in group): 30 & 31
Jack: 3.5mm

Hit apply now and test.
Hit install override if you want to make it permanent.

If you found this using google, keep in mind its just a workaround :)

Hope this helps someone!

Above workaround (Gijs answer) worked for me.

On a HP Advanced Docking station, the pin of the line-out was 0x1b (0x18 was for line-in).

Nicolas (coinb) wrote :

Works fine for me too (Elitebook 830 G3 with ultra slim docking station).
As for Rémi, pin line-out was 0x1b.
Thxs !

val-s (val-s) wrote :

It's funny.. I have not been able to get it to work correctly; On my machine, I have 0x1b as the line-out and 0x18 as the line-in as well.

When I override 0x1b with the above settings, no sound comes out on line-out, although pavucontrol shows activity.

When I override 0x18 with the exact same settings, I get sound out on the line-in.

So I'm currently using the line-in as the line-out. It's a bit unpleasant since I'm getting quite a few pops and clicks, but I'm not sure if it's related to this funky setup.

Richard Lobb (richard-lobb) wrote :

Thanks Gijs - your fix worked for me too. HP Elitebook Revolve 810 - Line Out was 0x1b for me.

DiMarco (dimarco) wrote :

What worked for me (HP EliteBook 850 G3, HP UltraSlim Dock 2013, Ubuntu 16.04).
In terminal type: alsamixer
Click right arrow to select "Headphone" and press M (to Mute or unMute).
After i "unMute", sound appears on the ultraslim dock connected speakers.

Mondane (mondane-woodworker) wrote :

Same problem on HP ProBook 650 G2 . The fix Gijs mentioned, doesn't work on this model.

Emiliano (retorquere) wrote :

Elitebook 820 G3 on the HP UltraSlim Dock; "hdajacksensetest -c1 -a"

yields

  Option parsing failed: Cannot parse integer value “-a” for -c

"hdajacksensetest -c 1 -a" (with a space between c and 1 yields

  No pins found for card 1 codec 0, did you pick the right one?

Chip Sharp (chipsharpdotcom) wrote :

I'd like to revive this bug report. I have both an HP 9480m and a 9470m and two of these HP Slim docks and have this same issue with them as is reported here. I've attempted the workarounds that have been reported, but have yet to find any success. (I'm still methodically working through the channel group/channel-in-group settings in HDAJackRetask.) That said, looking back through google searches, it appears that this has been a problem since, roughly the dawn of time.

I've got time and a vested interest in making this work, so if I could get some assistance in making this fly, I would appreciate it and then we can document it and submit a bug fix for the betterment of the community experience.

Mondane (mondane-woodworker) wrote :

I tried the workaround and I believe I must use port x016:

evs@evs-ubuntu:/tmp $ sudo hdajacksensetest
Pin 0x16 (Black Line Out, Docking station, Rear side): present = No
Pin 0x18 (Black Line In, Docking station, Rear side): present = No
Pin 0x19 (Black Mic, Right side): present = No
Pin 0x1d (Black Headphone, Right side): present = No
evs@evs-ubuntu:/tmp $ sudo hdajacksensetest
Pin 0x16 (Black Line Out, Docking station, Rear side): present = Yes
Pin 0x18 (Black Line In, Docking station, Rear side): present = No
Pin 0x19 (Black Mic, Right side): present = No
Pin 0x1d (Black Headphone, Right side): present = No

But after applying the override, I have no sound at all. Internal and external speakers are dead silent.

Mondane (mondane-woodworker) wrote :

Weird, today, again I plugged in my headphones in the docker and now, the internal speakers stay silent. It's weird because I didn't save the override settings permanently.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers