diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
commit | ef2e58ea6b9931c3a4816c66593da49bb20e3b24 (patch) | |
tree | ce7432add3becbe78de4ea06425cd2d9e91f4ada /sound/pci | |
parent | 06d63cc51d47f572009138a7f3ac34d95773405d (diff) | |
parent | de46c33745f5e2ad594c72f2cf5f490861b16ce1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 17 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 41 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 30 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 10 |
6 files changed, 94 insertions, 19 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 37fabf75daa7..b188a4df58cb 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1962,9 +1962,11 @@ static int snd_ac97_ad1888_downmix_put(struct snd_kcontrol *kcontrol, struct snd | |||
1962 | static void ad1888_update_jacks(struct snd_ac97 *ac97) | 1962 | static void ad1888_update_jacks(struct snd_ac97 *ac97) |
1963 | { | 1963 | { |
1964 | unsigned short val = 0; | 1964 | unsigned short val = 0; |
1965 | if (! is_shared_linein(ac97)) | 1965 | /* clear LODIS if shared jack is to be used for Surround out */ |
1966 | if (is_shared_linein(ac97)) | ||
1966 | val |= (1 << 12); | 1967 | val |= (1 << 12); |
1967 | if (! is_shared_micin(ac97)) | 1968 | /* clear CLDIS if shared jack is to be used for C/LFE out */ |
1969 | if (is_shared_micin(ac97)) | ||
1968 | val |= (1 << 11); | 1970 | val |= (1 << 11); |
1969 | /* shared Line-In */ | 1971 | /* shared Line-In */ |
1970 | snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val); | 1972 | snd_ac97_update_bits(ac97, AC97_AD_MISC, (1 << 11) | (1 << 12), val); |
@@ -2136,8 +2138,9 @@ static const struct snd_kcontrol_new snd_ac97_ad1985_controls[] = { | |||
2136 | static void ad1985_update_jacks(struct snd_ac97 *ac97) | 2138 | static void ad1985_update_jacks(struct snd_ac97 *ac97) |
2137 | { | 2139 | { |
2138 | ad1888_update_jacks(ac97); | 2140 | ad1888_update_jacks(ac97); |
2141 | /* clear OMS if shared jack is to be used for C/LFE out */ | ||
2139 | snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9, | 2142 | snd_ac97_update_bits(ac97, AC97_AD_SERIAL_CFG, 1 << 9, |
2140 | is_shared_micin(ac97) ? 0 : 1 << 9); | 2143 | is_shared_micin(ac97) ? 1 << 9 : 0); |
2141 | } | 2144 | } |
2142 | 2145 | ||
2143 | static int patch_ad1985_specific(struct snd_ac97 *ac97) | 2146 | static int patch_ad1985_specific(struct snd_ac97 *ac97) |
@@ -2418,9 +2421,9 @@ static void ad1986_update_jacks(struct snd_ac97 *ac97) | |||
2418 | unsigned short ser_val; | 2421 | unsigned short ser_val; |
2419 | 2422 | ||
2420 | /* disable SURROUND and CENTER/LFE if not surround mode */ | 2423 | /* disable SURROUND and CENTER/LFE if not surround mode */ |
2421 | if (! is_surround_on(ac97)) | 2424 | if (!is_surround_on(ac97)) |
2422 | misc_val |= AC97_AD1986_SODIS; | 2425 | misc_val |= AC97_AD1986_SODIS; |
2423 | if (! is_clfe_on(ac97)) | 2426 | if (!is_clfe_on(ac97)) |
2424 | misc_val |= AC97_AD1986_CLDIS; | 2427 | misc_val |= AC97_AD1986_CLDIS; |
2425 | 2428 | ||
2426 | /* select line input (default=LINE_IN, SURROUND or MIC_1/2) */ | 2429 | /* select line input (default=LINE_IN, SURROUND or MIC_1/2) */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b9a8e238b0a8..1672cace1ae7 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -199,7 +199,6 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
199 | 199 | ||
200 | /* STATESTS int mask: SD2,SD1,SD0 */ | 200 | /* STATESTS int mask: SD2,SD1,SD0 */ |
201 | #define STATESTS_INT_MASK 0x07 | 201 | #define STATESTS_INT_MASK 0x07 |
202 | #define AZX_MAX_CODECS 3 | ||
203 | 202 | ||
204 | /* SD_CTL bits */ | 203 | /* SD_CTL bits */ |
205 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ | 204 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ |
@@ -966,6 +965,16 @@ static int azx_setup_controller(struct azx *chip, struct azx_dev *azx_dev) | |||
966 | * Codec initialization | 965 | * Codec initialization |
967 | */ | 966 | */ |
968 | 967 | ||
968 | static unsigned int azx_max_codecs[] __devinitdata = { | ||
969 | [AZX_DRIVER_ICH] = 3, | ||
970 | [AZX_DRIVER_ATI] = 4, | ||
971 | [AZX_DRIVER_ATIHDMI] = 4, | ||
972 | [AZX_DRIVER_VIA] = 3, /* FIXME: correct? */ | ||
973 | [AZX_DRIVER_SIS] = 3, /* FIXME: correct? */ | ||
974 | [AZX_DRIVER_ULI] = 3, /* FIXME: correct? */ | ||
975 | [AZX_DRIVER_NVIDIA] = 3, /* FIXME: correct? */ | ||
976 | }; | ||
977 | |||
969 | static int __devinit azx_codec_create(struct azx *chip, const char *model) | 978 | static int __devinit azx_codec_create(struct azx *chip, const char *model) |
970 | { | 979 | { |
971 | struct hda_bus_template bus_temp; | 980 | struct hda_bus_template bus_temp; |
@@ -982,7 +991,7 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model) | |||
982 | return err; | 991 | return err; |
983 | 992 | ||
984 | codecs = 0; | 993 | codecs = 0; |
985 | for (c = 0; c < AZX_MAX_CODECS; c++) { | 994 | for (c = 0; c < azx_max_codecs[chip->driver_type]; c++) { |
986 | if ((chip->codec_mask & (1 << c)) & probe_mask) { | 995 | if ((chip->codec_mask & (1 << c)) & probe_mask) { |
987 | err = snd_hda_codec_new(chip->bus, c, NULL); | 996 | err = snd_hda_codec_new(chip->bus, c, NULL); |
988 | if (err < 0) | 997 | if (err < 0) |
@@ -1078,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1078 | runtime->hw.rates = hinfo->rates; | 1087 | runtime->hw.rates = hinfo->rates; |
1079 | snd_pcm_limit_hw_rates(runtime); | 1088 | snd_pcm_limit_hw_rates(runtime); |
1080 | snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); | 1089 | snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); |
1090 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, | ||
1091 | 128); | ||
1092 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, | ||
1093 | 128); | ||
1081 | if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { | 1094 | if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { |
1082 | azx_release_device(azx_dev); | 1095 | azx_release_device(azx_dev); |
1083 | mutex_unlock(&chip->open_mutex); | 1096 | mutex_unlock(&chip->open_mutex); |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 00ace59b05c9..f94f1f22889e 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -833,12 +833,14 @@ static struct snd_pci_quirk ad1986a_cfg_tbl[] = { | |||
833 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS P5", AD1986A_3STACK), | 833 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS P5", AD1986A_3STACK), |
834 | SND_PCI_QUIRK(0x1043, 0x81cb, "ASUS M2N", AD1986A_3STACK), | 834 | SND_PCI_QUIRK(0x1043, 0x81cb, "ASUS M2N", AD1986A_3STACK), |
835 | SND_PCI_QUIRK(0x1043, 0x8234, "ASUS M2N", AD1986A_3STACK), | 835 | SND_PCI_QUIRK(0x1043, 0x8234, "ASUS M2N", AD1986A_3STACK), |
836 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), | ||
836 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), | 837 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), |
837 | SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD), | 838 | SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD), |
838 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD), | 839 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD), |
839 | SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD), | 840 | SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD), |
840 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), | 841 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), |
841 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), | 842 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), |
843 | SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP), | ||
842 | SND_PCI_QUIRK(0x17aa, 0x1017, "Lenovo A60", AD1986A_3STACK), | 844 | SND_PCI_QUIRK(0x17aa, 0x1017, "Lenovo A60", AD1986A_3STACK), |
843 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_LAPTOP_EAPD), | 845 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_LAPTOP_EAPD), |
844 | SND_PCI_QUIRK(0x17c0, 0x2017, "Samsung M50", AD1986A_LAPTOP), | 846 | SND_PCI_QUIRK(0x17c0, 0x2017, "Samsung M50", AD1986A_LAPTOP), |
@@ -1205,7 +1207,7 @@ static struct hda_verb ad1981_init_verbs[] = { | |||
1205 | /* | 1207 | /* |
1206 | * Patch for HP nx6320 | 1208 | * Patch for HP nx6320 |
1207 | * | 1209 | * |
1208 | * nx6320 uses EAPD in the reserve way - EAPD-on means the internal | 1210 | * nx6320 uses EAPD in the reverse way - EAPD-on means the internal |
1209 | * speaker output enabled _and_ mute-LED off. | 1211 | * speaker output enabled _and_ mute-LED off. |
1210 | */ | 1212 | */ |
1211 | 1213 | ||
@@ -1373,6 +1375,21 @@ static int ad1981_hp_init(struct hda_codec *codec) | |||
1373 | return 0; | 1375 | return 0; |
1374 | } | 1376 | } |
1375 | 1377 | ||
1378 | /* configuration for Toshiba Laptops */ | ||
1379 | static struct hda_verb ad1981_toshiba_init_verbs[] = { | ||
1380 | {0x05, AC_VERB_SET_EAPD_BTLENABLE, 0x01 }, /* default on */ | ||
1381 | /* pin sensing on HP and Mic jacks */ | ||
1382 | {0x06, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_HP_EVENT}, | ||
1383 | {0x08, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1981_MIC_EVENT}, | ||
1384 | {} | ||
1385 | }; | ||
1386 | |||
1387 | static struct snd_kcontrol_new ad1981_toshiba_mixers[] = { | ||
1388 | HDA_CODEC_VOLUME("Amp Volume", 0x1a, 0x0, HDA_OUTPUT), | ||
1389 | HDA_CODEC_MUTE("Amp Switch", 0x1a, 0x0, HDA_OUTPUT), | ||
1390 | { } | ||
1391 | }; | ||
1392 | |||
1376 | /* configuration for Lenovo Thinkpad T60 */ | 1393 | /* configuration for Lenovo Thinkpad T60 */ |
1377 | static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { | 1394 | static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { |
1378 | HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT), | 1395 | HDA_CODEC_VOLUME("Master Playback Volume", 0x05, 0x0, HDA_OUTPUT), |
@@ -1418,6 +1435,7 @@ enum { | |||
1418 | AD1981_BASIC, | 1435 | AD1981_BASIC, |
1419 | AD1981_HP, | 1436 | AD1981_HP, |
1420 | AD1981_THINKPAD, | 1437 | AD1981_THINKPAD, |
1438 | AD1981_TOSHIBA, | ||
1421 | AD1981_MODELS | 1439 | AD1981_MODELS |
1422 | }; | 1440 | }; |
1423 | 1441 | ||
@@ -1425,6 +1443,7 @@ static const char *ad1981_models[AD1981_MODELS] = { | |||
1425 | [AD1981_HP] = "hp", | 1443 | [AD1981_HP] = "hp", |
1426 | [AD1981_THINKPAD] = "thinkpad", | 1444 | [AD1981_THINKPAD] = "thinkpad", |
1427 | [AD1981_BASIC] = "basic", | 1445 | [AD1981_BASIC] = "basic", |
1446 | [AD1981_TOSHIBA] = "toshiba" | ||
1428 | }; | 1447 | }; |
1429 | 1448 | ||
1430 | static struct snd_pci_quirk ad1981_cfg_tbl[] = { | 1449 | static struct snd_pci_quirk ad1981_cfg_tbl[] = { |
@@ -1435,6 +1454,7 @@ static struct snd_pci_quirk ad1981_cfg_tbl[] = { | |||
1435 | /* Lenovo Thinkpad T60/X60/Z6xx */ | 1454 | /* Lenovo Thinkpad T60/X60/Z6xx */ |
1436 | SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1981_THINKPAD), | 1455 | SND_PCI_QUIRK(0x17aa, 0, "Lenovo Thinkpad", AD1981_THINKPAD), |
1437 | SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), | 1456 | SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD), |
1457 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA), | ||
1438 | {} | 1458 | {} |
1439 | }; | 1459 | }; |
1440 | 1460 | ||
@@ -1485,8 +1505,17 @@ static int patch_ad1981(struct hda_codec *codec) | |||
1485 | spec->mixers[0] = ad1981_thinkpad_mixers; | 1505 | spec->mixers[0] = ad1981_thinkpad_mixers; |
1486 | spec->input_mux = &ad1981_thinkpad_capture_source; | 1506 | spec->input_mux = &ad1981_thinkpad_capture_source; |
1487 | break; | 1507 | break; |
1508 | case AD1981_TOSHIBA: | ||
1509 | spec->mixers[0] = ad1981_hp_mixers; | ||
1510 | spec->mixers[1] = ad1981_toshiba_mixers; | ||
1511 | spec->num_init_verbs = 2; | ||
1512 | spec->init_verbs[1] = ad1981_toshiba_init_verbs; | ||
1513 | spec->multiout.dig_out_nid = 0; | ||
1514 | spec->input_mux = &ad1981_hp_capture_source; | ||
1515 | codec->patch_ops.init = ad1981_hp_init; | ||
1516 | codec->patch_ops.unsol_event = ad1981_hp_unsol_event; | ||
1517 | break; | ||
1488 | } | 1518 | } |
1489 | |||
1490 | return 0; | 1519 | return 0; |
1491 | } | 1520 | } |
1492 | 1521 | ||
@@ -2607,6 +2636,12 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = { | |||
2607 | [AD1988_AUTO] = "auto", | 2636 | [AD1988_AUTO] = "auto", |
2608 | }; | 2637 | }; |
2609 | 2638 | ||
2639 | static struct snd_pci_quirk ad1988_cfg_tbl[] = { | ||
2640 | SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), | ||
2641 | SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), | ||
2642 | {} | ||
2643 | }; | ||
2644 | |||
2610 | static int patch_ad1988(struct hda_codec *codec) | 2645 | static int patch_ad1988(struct hda_codec *codec) |
2611 | { | 2646 | { |
2612 | struct ad198x_spec *spec; | 2647 | struct ad198x_spec *spec; |
@@ -2623,7 +2658,7 @@ static int patch_ad1988(struct hda_codec *codec) | |||
2623 | snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); | 2658 | snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n"); |
2624 | 2659 | ||
2625 | board_config = snd_hda_check_board_config(codec, AD1988_MODEL_LAST, | 2660 | board_config = snd_hda_check_board_config(codec, AD1988_MODEL_LAST, |
2626 | ad1988_models, NULL); | 2661 | ad1988_models, ad1988_cfg_tbl); |
2627 | if (board_config < 0) { | 2662 | if (board_config < 0) { |
2628 | printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n"); | 2663 | printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n"); |
2629 | board_config = AD1988_AUTO; | 2664 | board_config = AD1988_AUTO; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 84d005ef30ee..fba3cb11bc2a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4186,6 +4186,8 @@ static const char *alc260_models[ALC260_MODEL_LAST] = { | |||
4186 | static struct snd_pci_quirk alc260_cfg_tbl[] = { | 4186 | static struct snd_pci_quirk alc260_cfg_tbl[] = { |
4187 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), | 4187 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), |
4188 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 4188 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
4189 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), | ||
4190 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), | ||
4189 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), | 4191 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), |
4190 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP), | 4192 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP), |
4191 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_3013), | 4193 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_3013), |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 4c7b03996be9..c94291bc5367 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -60,7 +60,8 @@ enum { | |||
60 | STAC_D945GTP5, | 60 | STAC_D945GTP5, |
61 | STAC_MACMINI, | 61 | STAC_MACMINI, |
62 | STAC_MACBOOK, | 62 | STAC_MACBOOK, |
63 | STAC_MACBOOK_PRO, | 63 | STAC_MACBOOK_PRO_V1, |
64 | STAC_MACBOOK_PRO_V2, | ||
64 | STAC_922X_MODELS | 65 | STAC_922X_MODELS |
65 | }; | 66 | }; |
66 | 67 | ||
@@ -529,7 +530,13 @@ static unsigned int macbook_pin_configs[10] = { | |||
529 | 0x400000fc, 0x400000fb, | 530 | 0x400000fc, 0x400000fb, |
530 | }; | 531 | }; |
531 | 532 | ||
532 | static unsigned int macbook_pro_pin_configs[10] = { | 533 | static unsigned int macbook_pro_v1_pin_configs[10] = { |
534 | 0x0321e230, 0x03a1e020, 0x9017e110, 0x01014010, | ||
535 | 0x01a19021, 0x0381e021, 0x1345e240, 0x13c5e22e, | ||
536 | 0x02a19320, 0x400000fb | ||
537 | }; | ||
538 | |||
539 | static unsigned int macbook_pro_v2_pin_configs[10] = { | ||
533 | 0x0221401f, 0x90a70120, 0x01813024, 0x01014010, | 540 | 0x0221401f, 0x90a70120, 0x01813024, 0x01014010, |
534 | 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e, | 541 | 0x400000fd, 0x01016011, 0x1345e240, 0x13c5e22e, |
535 | 0x400000fc, 0x400000fb, | 542 | 0x400000fc, 0x400000fb, |
@@ -541,7 +548,8 @@ static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = { | |||
541 | [STAC_D945GTP5] = d945gtp5_pin_configs, | 548 | [STAC_D945GTP5] = d945gtp5_pin_configs, |
542 | [STAC_MACMINI] = d945gtp5_pin_configs, | 549 | [STAC_MACMINI] = d945gtp5_pin_configs, |
543 | [STAC_MACBOOK] = macbook_pin_configs, | 550 | [STAC_MACBOOK] = macbook_pin_configs, |
544 | [STAC_MACBOOK_PRO] = macbook_pro_pin_configs, | 551 | [STAC_MACBOOK_PRO_V1] = macbook_pro_v1_pin_configs, |
552 | [STAC_MACBOOK_PRO_V2] = macbook_pro_v2_pin_configs, | ||
545 | }; | 553 | }; |
546 | 554 | ||
547 | static const char *stac922x_models[STAC_922X_MODELS] = { | 555 | static const char *stac922x_models[STAC_922X_MODELS] = { |
@@ -550,7 +558,8 @@ static const char *stac922x_models[STAC_922X_MODELS] = { | |||
550 | [STAC_D945GTP3] = "3stack", | 558 | [STAC_D945GTP3] = "3stack", |
551 | [STAC_MACMINI] = "macmini", | 559 | [STAC_MACMINI] = "macmini", |
552 | [STAC_MACBOOK] = "macbook", | 560 | [STAC_MACBOOK] = "macbook", |
553 | [STAC_MACBOOK_PRO] = "macbook-pro", | 561 | [STAC_MACBOOK_PRO_V1] = "macbook-pro-v1", |
562 | [STAC_MACBOOK_PRO_V2] = "macbook-pro", | ||
554 | }; | 563 | }; |
555 | 564 | ||
556 | static struct snd_pci_quirk stac922x_cfg_tbl[] = { | 565 | static struct snd_pci_quirk stac922x_cfg_tbl[] = { |
@@ -1600,6 +1609,11 @@ static int stac92xx_init(struct hda_codec *codec) | |||
1600 | for (i = 0; i < cfg->hp_outs; i++) | 1609 | for (i = 0; i < cfg->hp_outs; i++) |
1601 | enable_pin_detect(codec, cfg->hp_pins[i], | 1610 | enable_pin_detect(codec, cfg->hp_pins[i], |
1602 | STAC_HP_EVENT); | 1611 | STAC_HP_EVENT); |
1612 | /* force to enable the first line-out; the others are set up | ||
1613 | * in unsol_event | ||
1614 | */ | ||
1615 | stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], | ||
1616 | AC_PINCTL_OUT_EN); | ||
1603 | stac92xx_auto_init_hp_out(codec); | 1617 | stac92xx_auto_init_hp_out(codec); |
1604 | /* fake event to set up pins */ | 1618 | /* fake event to set up pins */ |
1605 | codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26); | 1619 | codec->patch_ops.unsol_event(codec, STAC_HP_EVENT << 26); |
@@ -1889,9 +1903,13 @@ static int patch_stac922x(struct hda_codec *codec) | |||
1889 | /* Intel Macs have all same PCI SSID, so we need to check | 1903 | /* Intel Macs have all same PCI SSID, so we need to check |
1890 | * codec SSID to distinguish the exact models | 1904 | * codec SSID to distinguish the exact models |
1891 | */ | 1905 | */ |
1906 | printk(KERN_INFO "hda_codec: STAC922x, Apple subsys_id=%x\n", codec->subsystem_id); | ||
1892 | switch (codec->subsystem_id) { | 1907 | switch (codec->subsystem_id) { |
1893 | case 0x106b1e00: | 1908 | case 0x106b0200: /* MacBook Pro first generation */ |
1894 | spec->board_config = STAC_MACBOOK_PRO; | 1909 | spec->board_config = STAC_MACBOOK_PRO_V1; |
1910 | break; | ||
1911 | case 0x106b1e00: /* MacBook Pro second generation */ | ||
1912 | spec->board_config = STAC_MACBOOK_PRO_V2; | ||
1895 | break; | 1913 | break; |
1896 | } | 1914 | } |
1897 | } | 1915 | } |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index a289abfc7172..7cf2dcb9d8d4 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -725,10 +725,11 @@ static void fill_nocache(void *buf, int size, int nocache) | |||
725 | static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ichdev) | 725 | static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ichdev) |
726 | { | 726 | { |
727 | unsigned long port = ichdev->reg_offset; | 727 | unsigned long port = ichdev->reg_offset; |
728 | unsigned long flags; | ||
728 | int status, civ, i, step; | 729 | int status, civ, i, step; |
729 | int ack = 0; | 730 | int ack = 0; |
730 | 731 | ||
731 | spin_lock(&chip->reg_lock); | 732 | spin_lock_irqsave(&chip->reg_lock, flags); |
732 | status = igetbyte(chip, port + ichdev->roff_sr); | 733 | status = igetbyte(chip, port + ichdev->roff_sr); |
733 | civ = igetbyte(chip, port + ICH_REG_OFF_CIV); | 734 | civ = igetbyte(chip, port + ICH_REG_OFF_CIV); |
734 | if (!(status & ICH_BCIS)) { | 735 | if (!(status & ICH_BCIS)) { |
@@ -768,7 +769,7 @@ static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ich | |||
768 | ack = 1; | 769 | ack = 1; |
769 | } | 770 | } |
770 | } | 771 | } |
771 | spin_unlock(&chip->reg_lock); | 772 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
772 | if (ack && ichdev->substream) { | 773 | if (ack && ichdev->substream) { |
773 | snd_pcm_period_elapsed(ichdev->substream); | 774 | snd_pcm_period_elapsed(ichdev->substream); |
774 | } | 775 | } |
@@ -2470,7 +2471,10 @@ static int intel8x0_suspend(struct pci_dev *pci, pm_message_t state) | |||
2470 | } | 2471 | } |
2471 | pci_disable_device(pci); | 2472 | pci_disable_device(pci); |
2472 | pci_save_state(pci); | 2473 | pci_save_state(pci); |
2473 | pci_set_power_state(pci, pci_choose_state(pci, state)); | 2474 | /* The call below may disable built-in speaker on some laptops |
2475 | * after S2RAM. So, don't touch it. | ||
2476 | */ | ||
2477 | /* pci_set_power_state(pci, pci_choose_state(pci, state)); */ | ||
2474 | return 0; | 2478 | return 0; |
2475 | } | 2479 | } |
2476 | 2480 | ||