Patchwork [3.5.yuz,extended,stable] Patch "ALSA: hda - Fix silent headphone output from Toshiba P200" has been added to staging queue

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Nov. 22, 2012, 4:46 a.m.
Message ID <1353559601-437-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/200954/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Nov. 22, 2012, 4:46 a.m.
This is a note to let you know that I have just added a patch titled

    ALSA: hda - Fix silent headphone output from Toshiba P200

to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.yuz tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From 5dc132b07955675fb693a9715f51270a7aa95794 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Sat, 20 Oct 2012 10:55:21 +0200
Subject: [PATCH] ALSA: hda - Fix silent headphone output from Toshiba P200

commit cb766404e6b8c566569eb9ada02ea45d28729864 upstream.

By some reason, Toshiba laptop doesn't like the EAPD turned up for the
headphone pin.  Add a fix up code to force to turn down EAPD for NID
0x15.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=569991

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[ herton: backported to 3.5:
  create enum/structs from scratch, instead of bringing
  commit 6e72aa5f. alc_apply_fixup with ALC_FIXUP_ACT_PRE_PROBE should
  be a noop on this, but keep it as it's a skeleton for possible
  quirks in the future being applied through stable ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 sound/pci/hda/patch_realtek.c |   32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

--
1.7.9.5

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e996453..649ce26 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5546,6 +5546,33 @@  static const struct hda_verb alc268_beep_init_verbs[] = {
 	{ }
 };

+enum {
+	ALC268_FIXUP_HP_EAPD,
+};
+
+static const struct alc_fixup alc268_fixups[] = {
+	[ALC268_FIXUP_HP_EAPD] = {
+		.type = ALC_FIXUP_VERBS,
+		.v.verbs = (const struct hda_verb[]) {
+			{0x15, AC_VERB_SET_EAPD_BTLENABLE, 0},
+			{}
+		}
+	},
+};
+
+static const struct alc_model_fixup alc268_fixup_models[] = {
+	{.id = ALC268_FIXUP_HP_EAPD, .name = "hp-eapd"},
+	{}
+};
+
+static const struct snd_pci_quirk alc268_fixup_tbl[] = {
+	/* below is codec SSID since multiple Toshiba laptops have the
+	 * same PCI SSID 1179:ff00
+	 */
+	SND_PCI_QUIRK(0x1179, 0xff06, "Toshiba P200", ALC268_FIXUP_HP_EAPD),
+	{}
+};
+
 /*
  * BIOS auto configuration
  */
@@ -5577,6 +5604,9 @@  static int patch_alc268(struct hda_codec *codec)

 	spec = codec->spec;

+	alc_pick_fixup(codec, alc268_fixup_models, alc268_fixup_tbl, alc268_fixups);
+	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
+
 	/* automatic parse from the BIOS config */
 	err = alc268_parse_auto_config(codec);
 	if (err < 0)
@@ -5606,6 +5636,8 @@  static int patch_alc268(struct hda_codec *codec)
 	codec->patch_ops = alc_patch_ops;
 	spec->shutup = alc_eapd_shutup;

+	alc_apply_fixup(codec, ALC_FIXUP_ACT_PROBE);
+
 	return 0;

  error: