All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan-Marek Glogowski <glogow@fbihome.de>
To: alsa-devel@alsa-project.org
Subject: [RfC][PATCH] ALSA: hda/realtek Pin quirk for Fujitsu U7[25]7
Date: Fri, 26 Jan 2018 16:12:53 +0100	[thread overview]
Message-ID: <dcac37ef-4319-9eb3-4652-17bc6aa8fbc9@fbihome.de> (raw)
In-Reply-To: <c6ec1a50-187e-42d8-4137-f162c52e4f79@fbihome.de>

Hi everybody,

I got new HW from our supplier, a Fujitsu U727 and a U757 laptop, which
have a headset jack. Attaching a headset, the microphone doesn't work.
After some reading and trying various tools to understand the problem, I
found hdajacksensetest, which showed a sense change for a seemingly
wrong unconnected pin.
Overriding this pins' config has fixed the headsets microphone, so now I
have the attached kernel patch with a SND_HDA_PIN_QUIRK.

After compiling the patched module (for 4.4), everything works as
expected, but hdajackretask still shows the pin as unconnected, so I'm
wondering,  if I need to do something in addition? Is this normal
behaviour? This is just a port to master, as we (Munich) are on Ubuntu
Trusty with Xenial HWE (4.4 kernel).

Thanks for the review.

Jan-Marek Glogowski

P.S. checkpatch.pl warned about too long lines for the
SND_HDA_PIN_QUIRK. Should I fix that?


>From 69f1c296b22ab6dce93ba50de9cf05e279d52088 Mon Sep 17 00:00:00 2001
From: Jan-Marek Glogowski <glogow@fbihome.de>
Date: Wed, 24 Jan 2018 18:57:38 +0100
Subject: [PATCH] ALSA: hda/realtek Pin quirk for Fujitsu U7[25]7

These laptops have a combined jack to attach headsets, the U727 on
the left, the U757 on the right, but a headsets microphone doesn't
work. Using hdajacksensetest I found that pin 0x19 changed the
present state when plugging the headset, in addition to 0x21, but
didn't have the correct configuration (shown as "Not connected").

So this sets the configuration to the same values as the headphone
pin 0x21 except for the device type microphone, which makes it
work correctly. With the patch the configured pins for U727 are

Pin 0x12 (Internal Mic, Mobile-In): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x19 (Black Mic, Left side): present = No
Pin 0x1d (Internal Aux): present = No
Pin 0x21 (Black Headphone, Left side): present = No

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
---
 sound/pci/hda/patch_realtek.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9aafc6c..52c6beb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5275,6 +5275,8 @@ enum {
 	ALC255_FIXUP_ASUS_MIC_NO_PRESENCE,
 	ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
+	ALC255_FIXUP_FUJITSU_U727_MIC,
+	ALC255_FIXUP_FUJITSU_U757_MIC,
 	ALC255_FIXUP_HEADSET_MODE,
 	ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
 	ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -5786,6 +5788,20 @@ static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC
 	},
+	[ALC255_FIXUP_FUJITSU_U727_MIC] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x03a11020 }, /* detect headset mic, left */
+			{ }
+		},
+	},
+	[ALC255_FIXUP_FUJITSU_U757_MIC] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x19, 0x04a11020 }, /* detect headset mic, right */
+			{ }
+		},
+	},
 	[ALC255_FIXUP_HEADSET_MODE] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc_fixup_headset_mode_alc255,
@@ -6589,6 +6605,18 @@ static const struct snd_hda_pin_quirk
alc269_pin_fixup_tbl[] = {
 	SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell",
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 		{0x1b, 0x01011020},
 		{0x21, 0x02211010}),
+	SND_HDA_PIN_QUIRK(0x10ec0255, 0x10cf, "Fujitsu Lifebook U727",
ALC255_FIXUP_FUJITSU_U727_MIC,
+		{0x12, 0xb7a60130},
+		{0x14, 0x90170110},
+		{0x19, 0x411111f0},
+		{0x1d, 0x909701f0},
+		{0x21, 0x03211020}),
+	SND_HDA_PIN_QUIRK(0x10ec0255, 0x10cf, "Fujitsu Livebook U757",
ALC255_FIXUP_FUJITSU_U757_MIC,
+		{0x12, 0xb7a60130},
+		{0x14, 0x90170110},
+		{0x19, 0x411111f0},
+		{0x1d, 0x909701f0},
+		{0x21, 0x04211020}),
 	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell",
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
 		{0x12, 0x90a60130},
 		{0x14, 0x90170110},
-- 
2.1.4

       reply	other threads:[~2018-01-26 15:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c6ec1a50-187e-42d8-4137-f162c52e4f79@fbihome.de>
2018-01-26 15:12 ` Jan-Marek Glogowski [this message]
2018-02-06  8:55   ` [RfC][PATCH] ALSA: hda/realtek Pin quirk for Fujitsu U7[25]7 Jan-Marek Glogowski
2018-02-06  9:43     ` Takashi Sakamoto
2018-02-13  6:04   ` Takashi Iwai
2018-02-13 11:00     ` Jan-Marek Glogowski
2018-02-13 11:11       ` Takashi Iwai
2018-02-13 14:21         ` [RfC][PATCH] ALSA: hda/realtek PCI " Jan-Marek Glogowski
2018-02-13 14:48           ` Takashi Iwai
2018-02-13 15:05             ` [RfC][PATCH v2] ALSA: hda/realtek PCI quirk for Fujitsu U7x7 Jan-Marek Glogowski
2018-02-13 17:19               ` Takashi Iwai
2018-02-14  9:36                 ` [RfC][PATCH v3] " Jan-Marek Glogowski
2018-02-14  9:41                   ` Takashi Iwai
2018-02-14 10:36                     ` [PATCH v4] " Jan-Marek Glogowski
2018-02-14 11:02                       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcac37ef-4319-9eb3-4652-17bc6aa8fbc9@fbihome.de \
    --to=glogow@fbihome.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.