[alsa-devel] Headset doesn't work for HP EliteBook 755 G2

Takashi Iwai tiwai at suse.de
Thu Feb 25 14:37:58 CET 2016


On Thu, 25 Feb 2016 00:55:27 +0100,
Derick Eddington wrote:
> 
> Takashi Iwai (2016-02-24 01:00 MST) wrote:
> 
> > On Tue, 23 Feb 2016 21:02:17 +0100,
> > Derick Eddington wrote:
> >> 
> >> Hi, first time here, following suggestion [1] to report non-working
> >> default configuration, which I found how to make work.
> >> 
> >> I checked using the latest stable kernel 4.4.2 and my headset jack
> >> doesn't work by default but my fix does work, on Scientific Linux 7.2
> >> using the 4.4.2 kernel from the ELRepo repository.  I also checked using
> >> Ubuntu 16.04 alpha with its 4.4.0 kernel and the problem and fix are the
> >> same.
> >> 
> >> My laptop is an HP EliteBook 755 G2 from mid 2015 [2] that has a
> >> combined headset (headphone + mic) jack that doesn't work by default.
> >> The speakers work fine by default and they mute when a headset is
> >> plugged in, but the headphones don't work.
> >> 
> >> The snd-hda-intel module handles my device.
> >> The codec is Realtek ALC3228.
> >> I have the latest BIOS update from HP.
> >> 
> >> I got it working by passing model=hp,headset-mic to snd-hda-intel.  I
> >> found this fix in an alsa-user message about a different HP laptop with
> >> the same codec [3], but I had to modify the message's fix by only
> >> including the module option for model= and omitting the other options
> >> and aliases that seem to be specific to Arch Linux.  I tried using only
> >> "hp" or only "headset-mic" as the value for model= but neither worked.
> >
> > The point is the comma.  Your Realtek codec is assigned as the
> > secondary, and model option takes multiple values, one for each slot.
> > So, you'd need to pass "model=,headset-mic"
> >
> >> Attached are my outputs of alsa-info.sh from before and after I did
> >> model=hp,headset-mic.
> >
> > Thanks, I'll compare them.  Isn't the any functionality lost by this
> > option?  Everything (except for the noise issue) works by that?
> 
> Passing only "model=,headset-mic" does work fine.  I tested: internal
> speakers, internal mic, headset headphones, and headset mic, and they
> all work (after some mixer adjusting).  (I haven't ever tried the
> first-slot HDMI/DP audio device but will try to some time.)
> 
> >> Also, there's another problem after enabling model=hp,headset-mic, which
> >> I found how to fix:  There is a very annoying squeaky background noise in
> >> the headphones that's independent of adjusting the volume level but it
> >> does stop when the headphones are muted.  I tried a different headset
> >> and it's the same.  I found how to suppress this by using the
> >> white_noise_fix.py script from [4] as described at [5,6], which
> >> apparently does some ioctl verbs to adjust the amp gain.  I thought this
> >> might be something that should be fixed/adjusted in the kernel module(s)
> >> that handle this device, so that the white_noise_fix.py isn't needed.
> >> If so, maybe it's worth mentioning that when my laptop resumes from
> >> sleep, the background noise comes back, so I have to run
> >> white_noise_fix.py again.
> >
> > Such a noise often comes from the analog-loopback.  Try to turn off
> > "Loopback Mixing" mixer switch.
> 
> Disabling "Loopback Mixing" does stop the noise.  (Be careful when
> toggling this with headphones on, loud pop noises can happen with my
> device.)  The white_noise_fix.py script wasn't needed.
> 
> Attached is my latest alsa-info.sh output from when it's all working
> with the above applied (and with other mixer settings that make
> everything usable for me).

Thanks.  FWIW, below is the fix patch doing both (setting the quirk
and disabling loopback).  I'll queue this up.


Takashi

-- 8< --
From: Takashi Iwai <tiwai at suse.de>
Subject: [PATCH] ALSA: hda - Fix headset support and noise on HP EliteBook 755
 G2

HP EliteBook 755 G2 with ALC3228 (ALC280) codec [103c:221c] requires
the known fixup (ALC269_FIXUP_HEADSET_MIC) for making the headset mic
working.  Also, it suffers from the loopback noise problem, so we
should disable aamix path as well.

Reported-by: Derick Eddington <derick.eddington at gmail.com>
Cc: <stable at vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/hda/patch_realtek.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7fded69fb58e..1f357cd72d9c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4758,6 +4758,7 @@ enum {
 	ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
 	ALC255_FIXUP_DELL_SPK_NOISE,
 	ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
+	ALC280_FIXUP_HP_HEADSET_MIC,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -5394,6 +5395,12 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
 	},
+	[ALC280_FIXUP_HP_HEADSET_MIC] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc_fixup_disable_aamix,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_HEADSET_MIC,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5497,6 +5504,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
 	SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
 	SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+	SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
 	SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
-- 
2.7.2



More information about the Alsa-devel mailing list