diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c08ca660daba..70583719282b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -965,6 +965,8 @@ static void alc_automute_pin(struct hda_codec *codec) | |||
965 | unsigned int nid = spec->autocfg.hp_pins[0]; | 965 | unsigned int nid = spec->autocfg.hp_pins[0]; |
966 | int i; | 966 | int i; |
967 | 967 | ||
968 | if (!nid) | ||
969 | return; | ||
968 | pincap = snd_hda_query_pin_caps(codec, nid); | 970 | pincap = snd_hda_query_pin_caps(codec, nid); |
969 | if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ | 971 | if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */ |
970 | snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); | 972 | snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0); |
@@ -4682,9 +4684,9 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
4682 | spec->multiout.dig_out_nid = dig_nid; | 4684 | spec->multiout.dig_out_nid = dig_nid; |
4683 | else { | 4685 | else { |
4684 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; | 4686 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; |
4685 | spec->slave_dig_outs[i - 1] = dig_nid; | 4687 | if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1) |
4686 | if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1) | ||
4687 | break; | 4688 | break; |
4689 | spec->slave_dig_outs[i - 1] = dig_nid; | ||
4688 | } | 4690 | } |
4689 | } | 4691 | } |
4690 | if (spec->autocfg.dig_in_pin) | 4692 | if (spec->autocfg.dig_in_pin) |
@@ -6247,7 +6249,7 @@ static struct snd_pci_quirk alc260_cfg_tbl[] = { | |||
6247 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 6249 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
6248 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), | 6250 | SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100), |
6249 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), | 6251 | SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013), |
6250 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_HP_3013), | 6252 | SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_AUTO), /* no quirk */ |
6251 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), | 6253 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), |
6252 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013), | 6254 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013), |
6253 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600), | 6255 | SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600), |
@@ -8909,10 +8911,11 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = { | |||
8909 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), | 8911 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3), |
8910 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), | 8912 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24), |
8911 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), | 8913 | SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC885_MB5), |
8912 | /* FIXME: HP jack sense seems not working for MBP 5,1, so apparently | 8914 | /* FIXME: HP jack sense seems not working for MBP 5,1 or 5,2, |
8913 | * no perfect solution yet | 8915 | * so apparently no perfect solution yet |
8914 | */ | 8916 | */ |
8915 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), | 8917 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC885_MB5), |
8918 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC885_MB5), | ||
8916 | {} /* terminator */ | 8919 | {} /* terminator */ |
8917 | }; | 8920 | }; |
8918 | 8921 | ||
@@ -9811,9 +9814,9 @@ static int alc882_parse_auto_config(struct hda_codec *codec) | |||
9811 | spec->multiout.dig_out_nid = dig_nid; | 9814 | spec->multiout.dig_out_nid = dig_nid; |
9812 | else { | 9815 | else { |
9813 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; | 9816 | spec->multiout.slave_dig_outs = spec->slave_dig_outs; |
9814 | spec->slave_dig_outs[i - 1] = dig_nid; | 9817 | if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1) |
9815 | if (i == ARRAY_SIZE(spec->slave_dig_outs) - 1) | ||
9816 | break; | 9818 | break; |
9819 | spec->slave_dig_outs[i - 1] = dig_nid; | ||
9817 | } | 9820 | } |
9818 | } | 9821 | } |
9819 | if (spec->autocfg.dig_in_pin) | 9822 | if (spec->autocfg.dig_in_pin) |
@@ -11458,6 +11461,8 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
11458 | SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), | 11461 | SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), |
11459 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ | 11462 | SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ |
11460 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), | 11463 | SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), |
11464 | SND_PCI_QUIRK(0x104d, 0x9035, "Sony VAIO VGN-FW170J", ALC262_AUTO), | ||
11465 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony VAIO Type G", ALC262_AUTO), | ||
11461 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", | 11466 | SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", |
11462 | ALC262_SONY_ASSAMD), | 11467 | ALC262_SONY_ASSAMD), |
11463 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 11468 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
@@ -12602,7 +12607,8 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
12602 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", | 12607 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", |
12603 | ALC268_ACER_ASPIRE_ONE), | 12608 | ALC268_ACER_ASPIRE_ONE), |
12604 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), | 12609 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), |
12605 | SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron Mini9", ALC268_DELL), | 12610 | SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0, |
12611 | "Dell Inspiron Mini9/Vostro A90", ALC268_DELL), | ||
12606 | /* almost compatible with toshiba but with optional digital outs; | 12612 | /* almost compatible with toshiba but with optional digital outs; |
12607 | * auto-probing seems working fine | 12613 | * auto-probing seems working fine |
12608 | */ | 12614 | */ |
@@ -17374,7 +17380,7 @@ static int alc662_auto_create_extra_out(struct hda_codec *codec, hda_nid_t pin, | |||
17374 | 17380 | ||
17375 | /* create playback/capture controls for input pins */ | 17381 | /* create playback/capture controls for input pins */ |
17376 | #define alc662_auto_create_input_ctls \ | 17382 | #define alc662_auto_create_input_ctls \ |
17377 | alc880_auto_create_input_ctls | 17383 | alc882_auto_create_input_ctls |
17378 | 17384 | ||
17379 | static void alc662_auto_set_output_and_unmute(struct hda_codec *codec, | 17385 | static void alc662_auto_set_output_and_unmute(struct hda_codec *codec, |
17380 | hda_nid_t nid, int pin_type, | 17386 | hda_nid_t nid, int pin_type, |