aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
commita215aa7b9ab3759c047201199fba64d3042d7f13 (patch)
treebca37493d9b2233450e6d3ffced1261d0e4f71fe /sound/pci/hda/patch_realtek.c
parentd31199a77ef606f1d06894385f1852181ba6136b (diff)
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c53
1 files changed, 47 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a432e6efd19b..52b07fb942d4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1438,6 +1438,7 @@ do_sku:
1438 spec->init_amp = ALC_INIT_GPIO3; 1438 spec->init_amp = ALC_INIT_GPIO3;
1439 break; 1439 break;
1440 case 5: 1440 case 5:
1441 default:
1441 spec->init_amp = ALC_INIT_DEFAULT; 1442 spec->init_amp = ALC_INIT_DEFAULT;
1442 break; 1443 break;
1443 } 1444 }
@@ -4388,6 +4389,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = {
4388 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), 4389 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU),
4389 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW), 4390 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW),
4390 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), 4391 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG),
4392 SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG),
4391 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), 4393 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG),
4392 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW), 4394 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW),
4393 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700), 4395 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),
@@ -9664,7 +9666,6 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = {
9664 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763), 9666 SND_PCI_QUIRK(0x17aa, 0x3bfc, "Lenovo NB0763", ALC883_LENOVO_NB0763),
9665 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), 9667 SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763),
9666 SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY), 9668 SND_PCI_QUIRK(0x17aa, 0x101d, "Lenovo Sky", ALC888_LENOVO_SKY),
9667 SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
9668 SND_PCI_QUIRK(0x17c0, 0x4085, "MEDION MD96630", ALC888_LENOVO_MS7195_DIG), 9669 SND_PCI_QUIRK(0x17c0, 0x4085, "MEDION MD96630", ALC888_LENOVO_MS7195_DIG),
9669 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG), 9670 SND_PCI_QUIRK(0x17f2, 0x5000, "Albatron KI690-AM2", ALC883_6ST_DIG),
9670 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66), 9671 SND_PCI_QUIRK(0x1991, 0x5625, "Haier W66", ALC883_HAIER_W66),
@@ -16557,7 +16558,7 @@ static struct alc_config_preset alc861vd_presets[] = {
16557static int alc861vd_auto_create_input_ctls(struct hda_codec *codec, 16558static int alc861vd_auto_create_input_ctls(struct hda_codec *codec,
16558 const struct auto_pin_cfg *cfg) 16559 const struct auto_pin_cfg *cfg)
16559{ 16560{
16560 return alc_auto_create_input_ctls(codec, cfg, 0x15, 0x09, 0); 16561 return alc_auto_create_input_ctls(codec, cfg, 0x0b, 0x22, 0);
16561} 16562}
16562 16563
16563 16564
@@ -18612,6 +18613,8 @@ static inline hda_nid_t alc662_mix_to_dac(hda_nid_t nid)
18612 return 0x02; 18613 return 0x02;
18613 else if (nid >= 0x0c && nid <= 0x0e) 18614 else if (nid >= 0x0c && nid <= 0x0e)
18614 return nid - 0x0c + 0x02; 18615 return nid - 0x0c + 0x02;
18616 else if (nid == 0x26) /* ALC887-VD has this DAC too */
18617 return 0x25;
18615 else 18618 else
18616 return 0; 18619 return 0;
18617} 18620}
@@ -18620,7 +18623,7 @@ static inline hda_nid_t alc662_mix_to_dac(hda_nid_t nid)
18620static hda_nid_t alc662_dac_to_mix(struct hda_codec *codec, hda_nid_t pin, 18623static hda_nid_t alc662_dac_to_mix(struct hda_codec *codec, hda_nid_t pin,
18621 hda_nid_t dac) 18624 hda_nid_t dac)
18622{ 18625{
18623 hda_nid_t mix[4]; 18626 hda_nid_t mix[5];
18624 int i, num; 18627 int i, num;
18625 18628
18626 num = snd_hda_get_connections(codec, pin, mix, ARRAY_SIZE(mix)); 18629 num = snd_hda_get_connections(codec, pin, mix, ARRAY_SIZE(mix));
@@ -18935,6 +18938,37 @@ static void alc662_auto_init(struct hda_codec *codec)
18935 alc_inithook(codec); 18938 alc_inithook(codec);
18936} 18939}
18937 18940
18941enum {
18942 ALC662_FIXUP_ASPIRE,
18943 ALC662_FIXUP_IDEAPAD,
18944};
18945
18946static const struct alc_fixup alc662_fixups[] = {
18947 [ALC662_FIXUP_ASPIRE] = {
18948 .pins = (const struct alc_pincfg[]) {
18949 { 0x15, 0x99130112 }, /* subwoofer */
18950 { }
18951 }
18952 },
18953 [ALC662_FIXUP_IDEAPAD] = {
18954 .pins = (const struct alc_pincfg[]) {
18955 { 0x17, 0x99130112 }, /* subwoofer */
18956 { }
18957 }
18958 },
18959};
18960
18961static struct snd_pci_quirk alc662_fixup_tbl[] = {
18962 SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
18963 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
18964 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),
18965 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
18966 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
18967 {}
18968};
18969
18970
18971
18938static int patch_alc662(struct hda_codec *codec) 18972static int patch_alc662(struct hda_codec *codec)
18939{ 18973{
18940 struct alc_spec *spec; 18974 struct alc_spec *spec;
@@ -18967,6 +19001,7 @@ static int patch_alc662(struct hda_codec *codec)
18967 } 19001 }
18968 19002
18969 if (board_config == ALC662_AUTO) { 19003 if (board_config == ALC662_AUTO) {
19004 alc_pick_fixup(codec, alc662_fixup_tbl, alc662_fixups, 1);
18970 /* automatic parse from the BIOS config */ 19005 /* automatic parse from the BIOS config */
18971 err = alc662_parse_auto_config(codec); 19006 err = alc662_parse_auto_config(codec);
18972 if (err < 0) { 19007 if (err < 0) {
@@ -19025,8 +19060,11 @@ static int patch_alc662(struct hda_codec *codec)
19025 spec->vmaster_nid = 0x02; 19060 spec->vmaster_nid = 0x02;
19026 19061
19027 codec->patch_ops = alc_patch_ops; 19062 codec->patch_ops = alc_patch_ops;
19028 if (board_config == ALC662_AUTO) 19063 if (board_config == ALC662_AUTO) {
19029 spec->init_hook = alc662_auto_init; 19064 spec->init_hook = alc662_auto_init;
19065 alc_pick_fixup(codec, alc662_fixup_tbl, alc662_fixups, 0);
19066 }
19067
19030#ifdef CONFIG_SND_HDA_POWER_SAVE 19068#ifdef CONFIG_SND_HDA_POWER_SAVE
19031 if (!spec->loopback.amplist) 19069 if (!spec->loopback.amplist)
19032 spec->loopback.amplist = alc662_loopbacks; 19070 spec->loopback.amplist = alc662_loopbacks;
@@ -19039,7 +19077,10 @@ static int patch_alc888(struct hda_codec *codec)
19039{ 19077{
19040 if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){ 19078 if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){
19041 kfree(codec->chip_name); 19079 kfree(codec->chip_name);
19042 codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL); 19080 if (codec->vendor_id == 0x10ec0887)
19081 codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL);
19082 else
19083 codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL);
19043 if (!codec->chip_name) { 19084 if (!codec->chip_name) {
19044 alc_free(codec); 19085 alc_free(codec);
19045 return -ENOMEM; 19086 return -ENOMEM;
@@ -19521,7 +19562,7 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = {
19521 { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", 19562 { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A",
19522 .patch = patch_alc882 }, 19563 .patch = patch_alc882 },
19523 { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, 19564 { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 },
19524 { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc882 }, 19565 { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc888 },
19525 { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", 19566 { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200",
19526 .patch = patch_alc882 }, 19567 .patch = patch_alc882 },
19527 { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 }, 19568 { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 },