alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mario <anyc@hadiko.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Enable docking station speaker jack for new	Lenovo	Thinkpads
Date: Wed, 01 Aug 2012 18:26:18 +0200	[thread overview]
Message-ID: <s5hvch2d1ed.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5h1ujreywg.wl%tiwai@suse.de>

At Wed, 01 Aug 2012 11:37:19 +0200,
Takashi Iwai wrote:
> 
> At Wed, 01 Aug 2012 10:47:05 +0200,
> Mario wrote:
> > 
> > On Wednesday 01 August 2012 08:05:57 Takashi Iwai wrote:
> > > Which kernel are you using?
> > 
> > I'm using 3.4.5 with gentoo patches.
> > 
> > > >     Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
> > > 
> > >       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > 
> > > This is the reason.  The driver checks the pin config set by BIOS,
> > > and it leaves this pin unused.  Could you give alsa-info.sh output for
> > > more checks?
> > 
> > I included the link to alsa-info in my original mail. ;)
> > 
> > This is the link: 
> > http://www.alsa-project.org/db/?f=e297bdda4fd099425516c7c831e28a2c7d8ae6b6
> > I append the info below this mail.
> 
> Thanks.
> 
> Basically you can build your kernel based on 3.5, cherry-pick the
> commit 108cc108a3bb42fe4705df1317ff98e1e29428a6, then pass
> model=lenovo-dock option, or apply the patch below in addition.

It seems that the commit 108cc108 can't be cherry-picked
straightforwardly.

Below is the patch rebased for 3.5.x.  It should be applicable to
3.4.x kernel, too.  Give it a try.  You can apply the previous
one-liner patch after this one for enabling T530 fixup.


Takashi

---
From: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH] ALSA: hda - add dock support for Thinkpad X230 Tablet

commit 108cc108a3bb42fe4705df1317ff98e1e29428a6 upstream.

Also add a model/fixup string "lenovo-dock", so that other Thinkpad
users will be able to test this fixup easily, to see if it enables
dock I/O for them as well.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1026953
Tested-by: John McCarron <john.mccarron@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 Documentation/sound/alsa/HD-Audio-Models.txt |    3 ++-
 sound/pci/hda/patch_realtek.c                |   27 ++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 03f7897..286ec04 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -21,10 +21,11 @@ ALC267/268
 ==========
   N/A
 
-ALC269
+ALC269/270/275/276/280/282
 ======
   laptop-amic	Laptops with analog-mic input
   laptop-dmic	Laptops with digital-mic input
+  lenovo-dock   Enables docking station I/O for some Lenovos
 
 ALC662/663/272
 ==============
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index aa4c25e..222c1f5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5704,6 +5704,15 @@ static int alc269_resume(struct hda_codec *codec)
 }
 #endif /* CONFIG_PM */
 
+static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
+						 const struct alc_fixup *fix, int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action == ALC_FIXUP_ACT_PRE_PROBE)
+		spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
+}
+
 static void alc269_fixup_hweq(struct hda_codec *codec,
 			       const struct alc_fixup *fix, int action)
 {
@@ -5828,6 +5837,8 @@ enum {
 	ALC269VB_FIXUP_AMIC,
 	ALC269VB_FIXUP_DMIC,
 	ALC269_FIXUP_MIC2_MUTE_LED,
+	ALC269_FIXUP_LENOVO_DOCK,
+	ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
 };
 
 static const struct alc_fixup alc269_fixups[] = {
@@ -5952,6 +5963,20 @@ static const struct alc_fixup alc269_fixups[] = {
 		.type = ALC_FIXUP_FUNC,
 		.v.func = alc269_fixup_mic2_mute,
 	},
+	[ALC269_FIXUP_LENOVO_DOCK] = {
+		.type = ALC_FIXUP_PINS,
+		.v.pins = (const struct alc_pincfg[]) {
+			{ 0x19, 0x23a11040 }, /* dock mic */
+			{ 0x1b, 0x2121103f }, /* dock headphone */
+			{ }
+		},
+		.chained = true,
+		.chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
+	},
+	[ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
+		.type = ALC_FIXUP_FUNC,
+		.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5975,6 +6000,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
 	SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
 	SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
+	SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
 	SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE),
 	SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K),
 	SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
@@ -6033,6 +6059,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 static const struct alc_model_fixup alc269_fixup_models[] = {
 	{.id = ALC269_FIXUP_AMIC, .name = "laptop-amic"},
 	{.id = ALC269_FIXUP_DMIC, .name = "laptop-dmic"},
+	{.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
 	{}
 };
 
-- 
1.7.10.4

  reply	other threads:[~2012-08-01 16:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 22:13 Enable docking station speaker jack for new Lenovo Thinkpads Mario
2012-07-31 16:11 ` Phil Moh
2012-07-31 19:02 ` Mario
2012-07-31 20:43   ` Philipp Mohrenweiser
2012-07-31 21:02     ` Mario
2012-08-01  6:05 ` Takashi Iwai
2012-08-01  8:47   ` Mario
2012-08-01  9:37     ` Takashi Iwai
2012-08-01 16:26       ` Takashi Iwai [this message]
2012-08-01 20:51         ` Mario
2012-08-02  7:16           ` Takashi Iwai
2012-08-06  9:29             ` Philipp Mohrenweiser
2012-08-06 10:37               ` [PATCH] ALSA: hda - add dock support for Thinkpad T430s phiamo
2012-08-06 10:46                 ` Takashi Iwai
2012-08-06 10:47                   ` Takashi Iwai
2012-08-06 10:49                   ` Philipp Mohrenweiser
2012-08-06 10:52                     ` Takashi Iwai
2012-08-06 11:00                       ` phiamo
2012-08-06 11:08                         ` Takashi Iwai
2012-08-06 11:14                           ` Philipp A. Mohrenweiser
2012-08-06 12:49                             ` 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=s5hvch2d1ed.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=anyc@hadiko.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).