aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Marek Glogowski2018-02-14 04:29:15 -0600
committerGreg Kroah-Hartman2018-02-22 08:45:01 -0600
commitd84b8a33526b29d7e39ae2f6e8ce0e7d520fa5cd (patch)
tree46e63b7d3c7a33818184a1388b46df2b0eb10c3d
parent4c6e8dd5d2670c74669b1627eb18f6a4226993a3 (diff)
downloadkernel-omap-d84b8a33526b29d7e39ae2f6e8ce0e7d520fa5cd.tar.gz
kernel-omap-d84b8a33526b29d7e39ae2f6e8ce0e7d520fa5cd.tar.xz
kernel-omap-d84b8a33526b29d7e39ae2f6e8ce0e7d520fa5cd.zip
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
commit fdcc968a3b290407bcba9d4c90e2fba6d8d928f1 upstream. 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> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/pci/hda/patch_realtek.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b6427ff9a211..b302d056e5d3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3130,6 +3130,19 @@ static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
3130 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; 3130 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
3131} 3131}
3132 3132
3133static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec,
3134 const struct hda_fixup *fix,
3135 int action)
3136{
3137 unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21);
3138 unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19);
3139
3140 if (cfg_headphone && cfg_headset_mic == 0x411111f0)
3141 snd_hda_codec_set_pincfg(codec, 0x19,
3142 (cfg_headphone & ~AC_DEFCFG_DEVICE) |
3143 (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT));
3144}
3145
3133static void alc269_fixup_hweq(struct hda_codec *codec, 3146static void alc269_fixup_hweq(struct hda_codec *codec,
3134 const struct hda_fixup *fix, int action) 3147 const struct hda_fixup *fix, int action)
3135{ 3148{
@@ -4782,6 +4795,7 @@ enum {
4782 ALC269_FIXUP_LIFEBOOK_EXTMIC, 4795 ALC269_FIXUP_LIFEBOOK_EXTMIC,
4783 ALC269_FIXUP_LIFEBOOK_HP_PIN, 4796 ALC269_FIXUP_LIFEBOOK_HP_PIN,
4784 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, 4797 ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT,
4798 ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC,
4785 ALC269_FIXUP_AMIC, 4799 ALC269_FIXUP_AMIC,
4786 ALC269_FIXUP_DMIC, 4800 ALC269_FIXUP_DMIC,
4787 ALC269VB_FIXUP_AMIC, 4801 ALC269VB_FIXUP_AMIC,
@@ -4972,6 +4986,10 @@ static const struct hda_fixup alc269_fixups[] = {
4972 .type = HDA_FIXUP_FUNC, 4986 .type = HDA_FIXUP_FUNC,
4973 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 4987 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
4974 }, 4988 },
4989 [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = {
4990 .type = HDA_FIXUP_FUNC,
4991 .v.func = alc269_fixup_pincfg_U7x7_headset_mic,
4992 },
4975 [ALC269_FIXUP_AMIC] = { 4993 [ALC269_FIXUP_AMIC] = {
4976 .type = HDA_FIXUP_PINS, 4994 .type = HDA_FIXUP_PINS,
4977 .v.pins = (const struct hda_pintbl[]) { 4995 .v.pins = (const struct hda_pintbl[]) {
@@ -5687,6 +5705,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5687 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), 5705 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT),
5688 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5706 SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5689 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), 5707 SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
5708 SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
5690 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), 5709 SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
5691 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), 5710 SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
5692 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC), 5711 SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),