Bug 200107

Summary: Fujitsu Siemens U9210: Front headphone jack appears with wrong name, causing it to be muted by PulseAudio when headphones are connected
Product: Drivers Reporter: Joonas Saarinen (jza)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal CC: tiwai
Priority: P1    
Hardware: IA-64   
OS: Linux   
Kernel Version: 4.15.0 Subsystem:
Regression: No Bisected commit-id:
Attachments: Change headphone pin configuration for Fujitsu Siemens U9210
Change headphone pin configuration for Fujitsu Siemens U9210
Fix patch

Description Joonas Saarinen 2018-06-17 23:05:43 UTC
Fujitsu Siemens U9210 laptop, ALC262 codec

Output of alsa-info.sh:
http://www.alsa-project.org/db/?f=2d6fe7c4e7d9e840e988dcc877c7e66321c14320

The front headphone jack appears with the name "Speaker+LO" which causes it to be turned off by PulseAudio when headphones are inserted.

As a workaround, I have to make the following manual modification to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf:

Before:

[Element Speaker+LO]
switch = off
volume = off

After:

[Element Speaker+LO]
switch = on
volume = merge

However, I believe this should actually be fixed in the driver.

The following bug seems to have been a similar situation:
https://bugzilla.kernel.org/show_bug.cgi?id=99681

What do you think?
Comment 1 Joonas Saarinen 2018-06-18 20:37:47 UTC
Actually, I think the patch "hda - Fix headphone pin config for Lifebook T731" is also a similar case:

https://patchwork.kernel.org/patch/6231511/

I have created same kind of patch for this machine. I changed the pin configuration of the headphone jack (0x15) from 0x02211420 to 0x0221142f.

I assumed that changing the final number from 0 to f changes the association. I hope this is a correct way to fix it.

The front headphones now appear with the name "Headphone" instead of "Speaker+LO", and the patch seems to work. I will attach it below (the patch is for the most recent Git kernel).
Comment 2 Joonas Saarinen 2018-06-18 20:39:26 UTC
Created attachment 276655 [details]
Change headphone pin configuration for Fujitsu Siemens U9210
Comment 3 Joonas Saarinen 2018-06-18 20:43:36 UTC
*** Bug 118291 has been marked as a duplicate of this bug. ***
Comment 4 Joonas Saarinen 2018-06-18 21:49:08 UTC
Comment on attachment 276655 [details]
Change headphone pin configuration for Fujitsu Siemens U9210

>--- sound/pci/hda/patch_realtek.c.orig 2018-06-18 23:19:02.700363118 +0300
>+++ sound/pci/hda/patch_realtek.c      2018-06-18 23:22:09.845729979 +0300
>@@ -2463,6 +2463,7 @@ static int alc262_parse_auto_config(stru
> enum {
>       ALC262_FIXUP_FSC_H270,
>       ALC262_FIXUP_FSC_S7110,
>+      ALC262_FIXUP_FSC_U9210,
>       ALC262_FIXUP_HP_Z200,
>       ALC262_FIXUP_TYAN,
>       ALC262_FIXUP_LENOVO_3000,
>@@ -2491,6 +2492,13 @@ static const struct hda_fixup alc262_fix
>               .chained = true,
>               .chain_id = ALC262_FIXUP_BENQ,
>       },
>+      [ALC262_FIXUP_FSC_U9210] = {
>+              .type = HDA_FIXUP_PINS,
>+              .v.pins = (const struct hda_pintbl[]) {
>+                      { 0x15, 0x0221142f }, /* front HP */
>+                      { }
>+              }
>+      },
>       [ALC262_FIXUP_HP_Z200] = {
>               .type = HDA_FIXUP_PINS,
>               .v.pins = (const struct hda_pintbl[]) {
>@@ -2542,6 +2550,7 @@ static const struct hda_fixup alc262_fix
> 
> static const struct snd_pci_quirk alc262_fixup_tbl[] = {
>       SND_PCI_QUIRK(0x103c, 0x170b, "HP Z200", ALC262_FIXUP_HP_Z200),
>+      SND_PCI_QUIRK(0x1734, 0x1141, "Fujitsu Siemens ESPRIMO Mobile U9210",
>ALC262_FIXUP_FSC_U9210),
>       SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu Lifebook S7110",
> ALC262_FIXUP_FSC_S7110),
>       SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410",
> ALC262_FIXUP_BENQ),
>       SND_PCI_QUIRK(0x10f1, 0x2915, "Tyan Thunder n6650W",
> ALC262_FIXUP_TYAN),
Comment 5 Joonas Saarinen 2018-06-18 21:50:32 UTC
Changed the machine name in the updated patch...
Comment 6 Joonas Saarinen 2018-06-19 07:44:48 UTC
Created attachment 276687 [details]
Change headphone pin configuration for Fujitsu Siemens U9210
Comment 7 Takashi Iwai 2018-06-19 08:26:36 UTC
Thanks for the patch.

Just wondering, though, whether applying the same quirk as S7110 would work for U9210, too.  That is, just adding

        SND_PCI_QUIRK(0x1734, 0x1141, "Fujitsu Siemens ESPRIMO Mobile U9210", ALC262_FIXUP_FSC_S7110),

does it work?  If yes, it'll be a simpler oneliner.
Comment 8 Joonas Saarinen 2018-06-20 04:08:36 UTC
That sounds good, although I believe the correct one to use would be ALC262_FIXUP_FSC_H270 instead of ALC262_FIXUP_FSC_S7110.

I tested the H270 fixup on the U9210 and it works fine.
Comment 9 Takashi Iwai 2018-06-22 10:22:24 UTC
OK, I'm going to submit and merge the patch below.
Comment 10 Takashi Iwai 2018-06-22 10:22:52 UTC
Created attachment 276721 [details]
Fix patch
Comment 11 Joonas Saarinen 2018-06-22 11:42:51 UTC
Looks good, thanks.