aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-07-20 04:37:25 -0400
committerTakashi Iwai <tiwai@suse.de>2012-07-20 04:45:07 -0400
commit108cc108a3bb42fe4705df1317ff98e1e29428a6 (patch)
tree78c4cb761d85350512a1d521fcc73f381552a8f6 /sound/pci
parent9e76e6d031482194a5b24d8e9ab88063fbd6b4b5 (diff)
ALSA: hda - add dock support for Thinkpad X230 Tablet
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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_realtek.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 537c365716a6..f141395dfee6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5881,6 +5881,15 @@ static int alc269_resume(struct hda_codec *codec)
5881} 5881}
5882#endif /* CONFIG_PM */ 5882#endif /* CONFIG_PM */
5883 5883
5884static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
5885 const struct alc_fixup *fix, int action)
5886{
5887 struct alc_spec *spec = codec->spec;
5888
5889 if (action == ALC_FIXUP_ACT_PRE_PROBE)
5890 spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
5891}
5892
5884static void alc269_fixup_hweq(struct hda_codec *codec, 5893static void alc269_fixup_hweq(struct hda_codec *codec,
5885 const struct alc_fixup *fix, int action) 5894 const struct alc_fixup *fix, int action)
5886{ 5895{
@@ -6007,6 +6016,8 @@ enum {
6007 ALC269VB_FIXUP_DMIC, 6016 ALC269VB_FIXUP_DMIC,
6008 ALC269_FIXUP_MIC2_MUTE_LED, 6017 ALC269_FIXUP_MIC2_MUTE_LED,
6009 ALC269_FIXUP_INV_DMIC, 6018 ALC269_FIXUP_INV_DMIC,
6019 ALC269_FIXUP_LENOVO_DOCK,
6020 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
6010}; 6021};
6011 6022
6012static const struct alc_fixup alc269_fixups[] = { 6023static const struct alc_fixup alc269_fixups[] = {
@@ -6135,6 +6146,20 @@ static const struct alc_fixup alc269_fixups[] = {
6135 .type = ALC_FIXUP_FUNC, 6146 .type = ALC_FIXUP_FUNC,
6136 .v.func = alc_fixup_inv_dmic_0x12, 6147 .v.func = alc_fixup_inv_dmic_0x12,
6137 }, 6148 },
6149 [ALC269_FIXUP_LENOVO_DOCK] = {
6150 .type = ALC_FIXUP_PINS,
6151 .v.pins = (const struct alc_pincfg[]) {
6152 { 0x19, 0x23a11040 }, /* dock mic */
6153 { 0x1b, 0x2121103f }, /* dock headphone */
6154 { }
6155 },
6156 .chained = true,
6157 .chain_id = ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT
6158 },
6159 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
6160 .type = ALC_FIXUP_FUNC,
6161 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
6162 },
6138}; 6163};
6139 6164
6140static const struct snd_pci_quirk alc269_fixup_tbl[] = { 6165static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6161,6 +6186,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6161 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), 6186 SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
6162 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), 6187 SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE),
6163 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), 6188 SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE),
6189 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
6164 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE), 6190 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_QUANTA_MUTE),
6165 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K), 6191 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K),
6166 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 6192 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
@@ -6222,6 +6248,7 @@ static const struct alc_model_fixup alc269_fixup_models[] = {
6222 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, 6248 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
6223 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, 6249 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
6224 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, 6250 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
6251 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
6225 {} 6252 {}
6226}; 6253};
6227 6254