aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-15 14:14:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-15 14:14:07 -0400
commit218a8c2b572d9181ac0c6342dcaa72574f13ae35 (patch)
tree2330d7b98b5eb2f14fe4eef80e5701e9d8a25c84
parent919f797a4c9c22ff5ec059744dba364dc600ece2 (diff)
parent7d7eb9ea314e992413620610b4d09c9cd5fa8959 (diff)
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull another round of sound fixes from Takashi Iwai: "A few regression fixes for Realtek HD-audio codecs, mainly specific to some laptop models." * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace). ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co ALSA: hda/realtek - Add a few ALC882 model strings back
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt4
-rw-r--r--sound/pci/hda/patch_realtek.c36
2 files changed, 29 insertions, 11 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index d97d992ced14..03f7897c6414 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -43,7 +43,9 @@ ALC680
43 43
44ALC882/883/885/888/889 44ALC882/883/885/888/889
45====================== 45======================
46 N/A 46 acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G
47 acer-aspire-8930g Acer Aspire 8330G/6935G
48 acer-aspire Acer Aspire others
47 49
48ALC861/660 50ALC861/660
49========== 51==========
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9917e55d6f11..2508f8109f11 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3398,8 +3398,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3398 for (;;) { 3398 for (;;) {
3399 badness = fill_and_eval_dacs(codec, fill_hardwired, 3399 badness = fill_and_eval_dacs(codec, fill_hardwired,
3400 fill_mio_first); 3400 fill_mio_first);
3401 if (badness < 0) 3401 if (badness < 0) {
3402 kfree(best_cfg);
3402 return badness; 3403 return badness;
3404 }
3403 debug_badness("==> lo_type=%d, wired=%d, mio=%d, badness=0x%x\n", 3405 debug_badness("==> lo_type=%d, wired=%d, mio=%d, badness=0x%x\n",
3404 cfg->line_out_type, fill_hardwired, fill_mio_first, 3406 cfg->line_out_type, fill_hardwired, fill_mio_first,
3405 badness); 3407 badness);
@@ -3434,7 +3436,7 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3434 cfg->line_out_type = AUTO_PIN_SPEAKER_OUT; 3436 cfg->line_out_type = AUTO_PIN_SPEAKER_OUT;
3435 fill_hardwired = true; 3437 fill_hardwired = true;
3436 continue; 3438 continue;
3437 } 3439 }
3438 if (cfg->hp_outs > 0 && 3440 if (cfg->hp_outs > 0 &&
3439 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { 3441 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) {
3440 cfg->speaker_outs = cfg->line_outs; 3442 cfg->speaker_outs = cfg->line_outs;
@@ -3448,7 +3450,7 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
3448 cfg->line_out_type = AUTO_PIN_HP_OUT; 3450 cfg->line_out_type = AUTO_PIN_HP_OUT;
3449 fill_hardwired = true; 3451 fill_hardwired = true;
3450 continue; 3452 continue;
3451 } 3453 }
3452 break; 3454 break;
3453 } 3455 }
3454 3456
@@ -4423,7 +4425,7 @@ static int alc_parse_auto_config(struct hda_codec *codec,
4423static int alc880_parse_auto_config(struct hda_codec *codec) 4425static int alc880_parse_auto_config(struct hda_codec *codec)
4424{ 4426{
4425 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 }; 4427 static const hda_nid_t alc880_ignore[] = { 0x1d, 0 };
4426 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 }; 4428 static const hda_nid_t alc880_ssids[] = { 0x15, 0x1b, 0x14, 0 };
4427 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids); 4429 return alc_parse_auto_config(codec, alc880_ignore, alc880_ssids);
4428} 4430}
4429 4431
@@ -5269,7 +5271,9 @@ static const struct alc_fixup alc882_fixups[] = {
5269 { 0x16, 0x99130111 }, /* CLFE speaker */ 5271 { 0x16, 0x99130111 }, /* CLFE speaker */
5270 { 0x17, 0x99130112 }, /* surround speaker */ 5272 { 0x17, 0x99130112 }, /* surround speaker */
5271 { } 5273 { }
5272 } 5274 },
5275 .chained = true,
5276 .chain_id = ALC882_FIXUP_GPIO1,
5273 }, 5277 },
5274 [ALC882_FIXUP_ACER_ASPIRE_8930G] = { 5278 [ALC882_FIXUP_ACER_ASPIRE_8930G] = {
5275 .type = ALC_FIXUP_PINS, 5279 .type = ALC_FIXUP_PINS,
@@ -5312,7 +5316,9 @@ static const struct alc_fixup alc882_fixups[] = {
5312 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, 5316 { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
5313 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, 5317 { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 },
5314 { } 5318 { }
5315 } 5319 },
5320 .chained = true,
5321 .chain_id = ALC882_FIXUP_GPIO1,
5316 }, 5322 },
5317 [ALC885_FIXUP_MACPRO_GPIO] = { 5323 [ALC885_FIXUP_MACPRO_GPIO] = {
5318 .type = ALC_FIXUP_FUNC, 5324 .type = ALC_FIXUP_FUNC,
@@ -5359,6 +5365,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5359 ALC882_FIXUP_ACER_ASPIRE_4930G), 5365 ALC882_FIXUP_ACER_ASPIRE_4930G),
5360 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210), 5366 SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
5361 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE), 5367 SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
5368 SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
5362 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736), 5369 SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
5363 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD), 5370 SND_PCI_QUIRK(0x1043, 0x13c2, "Asus A7M", ALC882_FIXUP_EAPD),
5364 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), 5371 SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V),
@@ -5384,6 +5391,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5384 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF), 5391 SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF),
5385 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), 5392 SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
5386 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), 5393 SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
5394 SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO),
5387 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), 5395 SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
5388 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), 5396 SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
5389 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), 5397 SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
@@ -5399,6 +5407,13 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5399 {} 5407 {}
5400}; 5408};
5401 5409
5410static const struct alc_model_fixup alc882_fixup_models[] = {
5411 {.id = ALC882_FIXUP_ACER_ASPIRE_4930G, .name = "acer-aspire-4930g"},
5412 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
5413 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
5414 {}
5415};
5416
5402/* 5417/*
5403 * BIOS auto configuration 5418 * BIOS auto configuration
5404 */ 5419 */
@@ -5439,7 +5454,8 @@ static int patch_alc882(struct hda_codec *codec)
5439 if (err < 0) 5454 if (err < 0)
5440 goto error; 5455 goto error;
5441 5456
5442 alc_pick_fixup(codec, NULL, alc882_fixup_tbl, alc882_fixups); 5457 alc_pick_fixup(codec, alc882_fixup_models, alc882_fixup_tbl,
5458 alc882_fixups);
5443 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE); 5459 alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
5444 5460
5445 alc_auto_parse_customize_define(codec); 5461 alc_auto_parse_customize_define(codec);
@@ -6079,7 +6095,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6079 * Basically the device should work as is without the fixup table. 6095 * Basically the device should work as is without the fixup table.
6080 * If BIOS doesn't give a proper info, enable the corresponding 6096 * If BIOS doesn't give a proper info, enable the corresponding
6081 * fixup entry. 6097 * fixup entry.
6082 */ 6098 */
6083 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A", 6099 SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
6084 ALC269_FIXUP_AMIC), 6100 ALC269_FIXUP_AMIC),
6085 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC), 6101 SND_PCI_QUIRK(0x1043, 0x1013, "ASUS N61Da", ALC269_FIXUP_AMIC),
@@ -6296,7 +6312,7 @@ static void alc_fixup_no_jack_detect(struct hda_codec *codec,
6296{ 6312{
6297 if (action == ALC_FIXUP_ACT_PRE_PROBE) 6313 if (action == ALC_FIXUP_ACT_PRE_PROBE)
6298 codec->no_jack_detect = 1; 6314 codec->no_jack_detect = 1;
6299} 6315}
6300 6316
6301static const struct alc_fixup alc861_fixups[] = { 6317static const struct alc_fixup alc861_fixups[] = {
6302 [ALC861_FIXUP_FSC_AMILO_PI1505] = { 6318 [ALC861_FIXUP_FSC_AMILO_PI1505] = {
@@ -6714,7 +6730,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
6714 * Basically the device should work as is without the fixup table. 6730 * Basically the device should work as is without the fixup table.
6715 * If BIOS doesn't give a proper info, enable the corresponding 6731 * If BIOS doesn't give a proper info, enable the corresponding
6716 * fixup entry. 6732 * fixup entry.
6717 */ 6733 */
6718 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1), 6734 SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC662_FIXUP_ASUS_MODE1),
6719 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3), 6735 SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC662_FIXUP_ASUS_MODE3),
6720 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1), 6736 SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC662_FIXUP_ASUS_MODE1),