diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-06-26 09:49:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-06-26 09:49:20 -0400 |
commit | 7e9c2eb62642680e331d91453f94c0073580a1b1 (patch) | |
tree | 9c81282f509dc28a68c15a03033a0e71dd672912 /sound/pci | |
parent | db8e8a9dc97224b016461e596721ebbcfed9c08d (diff) | |
parent | a07187c992be945ab561b370cbb49cfd72064c3c (diff) |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_auto_parser.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 65 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 21 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 489 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 58 |
6 files changed, 321 insertions, 315 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index b684c6e4f301..dabe41975a9d 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c | |||
@@ -898,6 +898,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, | |||
898 | if (!strcmp(codec->modelname, models->name)) { | 898 | if (!strcmp(codec->modelname, models->name)) { |
899 | codec->fixup_id = models->id; | 899 | codec->fixup_id = models->id; |
900 | codec->fixup_name = models->name; | 900 | codec->fixup_name = models->name; |
901 | codec->fixup_list = fixlist; | ||
901 | codec->fixup_forced = 1; | 902 | codec->fixup_forced = 1; |
902 | return; | 903 | return; |
903 | } | 904 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 23fd6b9aecca..25753db97071 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -288,6 +288,24 @@ static char *driver_short_names[] = { | |||
288 | [AZX_DRIVER_GENERIC] = "HD-Audio Generic", | 288 | [AZX_DRIVER_GENERIC] = "HD-Audio Generic", |
289 | }; | 289 | }; |
290 | 290 | ||
291 | |||
292 | /* Intel HSW/BDW display HDA controller Extended Mode registers. | ||
293 | * EM4 (M value) and EM5 (N Value) are used to convert CDClk (Core Display | ||
294 | * Clock) to 24MHz BCLK: BCLK = CDCLK * M / N | ||
295 | * The values will be lost when the display power well is disabled. | ||
296 | */ | ||
297 | #define ICH6_REG_EM4 0x100c | ||
298 | #define ICH6_REG_EM5 0x1010 | ||
299 | |||
300 | struct hda_intel { | ||
301 | struct azx chip; | ||
302 | |||
303 | /* HSW/BDW display HDA controller to restore BCLK from CDCLK */ | ||
304 | unsigned int bclk_m; | ||
305 | unsigned int bclk_n; | ||
306 | }; | ||
307 | |||
308 | |||
291 | #ifdef CONFIG_X86 | 309 | #ifdef CONFIG_X86 |
292 | static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool on) | 310 | static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool on) |
293 | { | 311 | { |
@@ -580,6 +598,22 @@ static int param_set_xint(const char *val, const struct kernel_param *kp) | |||
580 | #define azx_del_card_list(chip) /* NOP */ | 598 | #define azx_del_card_list(chip) /* NOP */ |
581 | #endif /* CONFIG_PM */ | 599 | #endif /* CONFIG_PM */ |
582 | 600 | ||
601 | static void haswell_save_bclk(struct azx *chip) | ||
602 | { | ||
603 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
604 | |||
605 | hda->bclk_m = azx_readw(chip, EM4); | ||
606 | hda->bclk_n = azx_readw(chip, EM5); | ||
607 | } | ||
608 | |||
609 | static void haswell_restore_bclk(struct azx *chip) | ||
610 | { | ||
611 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
612 | |||
613 | azx_writew(chip, EM4, hda->bclk_m); | ||
614 | azx_writew(chip, EM5, hda->bclk_n); | ||
615 | } | ||
616 | |||
583 | #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) | 617 | #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) |
584 | /* | 618 | /* |
585 | * power management | 619 | * power management |
@@ -606,6 +640,13 @@ static int azx_suspend(struct device *dev) | |||
606 | free_irq(chip->irq, chip); | 640 | free_irq(chip->irq, chip); |
607 | chip->irq = -1; | 641 | chip->irq = -1; |
608 | } | 642 | } |
643 | |||
644 | /* Save BCLK M/N values before they become invalid in D3. | ||
645 | * Will test if display power well can be released now. | ||
646 | */ | ||
647 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) | ||
648 | haswell_save_bclk(chip); | ||
649 | |||
609 | if (chip->msi) | 650 | if (chip->msi) |
610 | pci_disable_msi(chip->pci); | 651 | pci_disable_msi(chip->pci); |
611 | pci_disable_device(pci); | 652 | pci_disable_device(pci); |
@@ -625,8 +666,10 @@ static int azx_resume(struct device *dev) | |||
625 | if (chip->disabled) | 666 | if (chip->disabled) |
626 | return 0; | 667 | return 0; |
627 | 668 | ||
628 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) | 669 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
629 | hda_display_power(true); | 670 | hda_display_power(true); |
671 | haswell_restore_bclk(chip); | ||
672 | } | ||
630 | pci_set_power_state(pci, PCI_D0); | 673 | pci_set_power_state(pci, PCI_D0); |
631 | pci_restore_state(pci); | 674 | pci_restore_state(pci); |
632 | if (pci_enable_device(pci) < 0) { | 675 | if (pci_enable_device(pci) < 0) { |
@@ -670,8 +713,10 @@ static int azx_runtime_suspend(struct device *dev) | |||
670 | azx_stop_chip(chip); | 713 | azx_stop_chip(chip); |
671 | azx_enter_link_reset(chip); | 714 | azx_enter_link_reset(chip); |
672 | azx_clear_irq_pending(chip); | 715 | azx_clear_irq_pending(chip); |
673 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) | 716 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
717 | haswell_save_bclk(chip); | ||
674 | hda_display_power(false); | 718 | hda_display_power(false); |
719 | } | ||
675 | return 0; | 720 | return 0; |
676 | } | 721 | } |
677 | 722 | ||
@@ -689,8 +734,10 @@ static int azx_runtime_resume(struct device *dev) | |||
689 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | 734 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) |
690 | return 0; | 735 | return 0; |
691 | 736 | ||
692 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) | 737 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
693 | hda_display_power(true); | 738 | hda_display_power(true); |
739 | haswell_restore_bclk(chip); | ||
740 | } | ||
694 | 741 | ||
695 | /* Read STATESTS before controller reset */ | 742 | /* Read STATESTS before controller reset */ |
696 | status = azx_readw(chip, STATESTS); | 743 | status = azx_readw(chip, STATESTS); |
@@ -883,6 +930,8 @@ static int register_vga_switcheroo(struct azx *chip) | |||
883 | static int azx_free(struct azx *chip) | 930 | static int azx_free(struct azx *chip) |
884 | { | 931 | { |
885 | struct pci_dev *pci = chip->pci; | 932 | struct pci_dev *pci = chip->pci; |
933 | struct hda_intel *hda = container_of(chip, struct hda_intel, chip); | ||
934 | |||
886 | int i; | 935 | int i; |
887 | 936 | ||
888 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) | 937 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) |
@@ -930,7 +979,7 @@ static int azx_free(struct azx *chip) | |||
930 | hda_display_power(false); | 979 | hda_display_power(false); |
931 | hda_i915_exit(); | 980 | hda_i915_exit(); |
932 | } | 981 | } |
933 | kfree(chip); | 982 | kfree(hda); |
934 | 983 | ||
935 | return 0; | 984 | return 0; |
936 | } | 985 | } |
@@ -1174,6 +1223,7 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1174 | static struct snd_device_ops ops = { | 1223 | static struct snd_device_ops ops = { |
1175 | .dev_free = azx_dev_free, | 1224 | .dev_free = azx_dev_free, |
1176 | }; | 1225 | }; |
1226 | struct hda_intel *hda; | ||
1177 | struct azx *chip; | 1227 | struct azx *chip; |
1178 | int err; | 1228 | int err; |
1179 | 1229 | ||
@@ -1183,13 +1233,14 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1183 | if (err < 0) | 1233 | if (err < 0) |
1184 | return err; | 1234 | return err; |
1185 | 1235 | ||
1186 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 1236 | hda = kzalloc(sizeof(*hda), GFP_KERNEL); |
1187 | if (!chip) { | 1237 | if (!hda) { |
1188 | dev_err(card->dev, "Cannot allocate chip\n"); | 1238 | dev_err(card->dev, "Cannot allocate hda\n"); |
1189 | pci_disable_device(pci); | 1239 | pci_disable_device(pci); |
1190 | return -ENOMEM; | 1240 | return -ENOMEM; |
1191 | } | 1241 | } |
1192 | 1242 | ||
1243 | chip = &hda->chip; | ||
1193 | spin_lock_init(&chip->reg_lock); | 1244 | spin_lock_init(&chip->reg_lock); |
1194 | mutex_init(&chip->open_mutex); | 1245 | mutex_init(&chip->open_mutex); |
1195 | chip->card = card; | 1246 | chip->card = card; |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index d52cc3ef5135..aa374ad4b5d0 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -418,6 +418,27 @@ struct snd_hda_pin_quirk { | |||
418 | int value; /* quirk value */ | 418 | int value; /* quirk value */ |
419 | }; | 419 | }; |
420 | 420 | ||
421 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
422 | |||
423 | #define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \ | ||
424 | { .codec = _codec,\ | ||
425 | .subvendor = _subvendor,\ | ||
426 | .name = _name,\ | ||
427 | .value = _value,\ | ||
428 | .pins = (const struct hda_pintbl[]) { _pins } \ | ||
429 | } | ||
430 | #else | ||
431 | |||
432 | #define SND_HDA_PIN_QUIRK(_codec, _subvendor, _name, _value, _pins...) \ | ||
433 | { .codec = _codec,\ | ||
434 | .subvendor = _subvendor,\ | ||
435 | .value = _value,\ | ||
436 | .pins = (const struct hda_pintbl[]) { _pins } \ | ||
437 | } | ||
438 | |||
439 | #endif | ||
440 | |||
441 | |||
421 | /* fixup types */ | 442 | /* fixup types */ |
422 | enum { | 443 | enum { |
423 | HDA_FIXUP_INVALID, | 444 | HDA_FIXUP_INVALID, |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index eab53d7a0f18..10b69c8175d2 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2205,7 +2205,7 @@ static int generic_hdmi_resume(struct hda_codec *codec) | |||
2205 | struct hdmi_spec *spec = codec->spec; | 2205 | struct hdmi_spec *spec = codec->spec; |
2206 | int pin_idx; | 2206 | int pin_idx; |
2207 | 2207 | ||
2208 | generic_hdmi_init(codec); | 2208 | codec->patch_ops.init(codec); |
2209 | snd_hda_codec_resume_amp(codec); | 2209 | snd_hda_codec_resume_amp(codec); |
2210 | snd_hda_codec_resume_cache(codec); | 2210 | snd_hda_codec_resume_cache(codec); |
2211 | 2211 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4852120dd9c6..60bf5ee1178a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5076,228 +5076,129 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
5076 | }; | 5076 | }; |
5077 | 5077 | ||
5078 | static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | 5078 | static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { |
5079 | { | 5079 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5080 | .codec = 0x10ec0255, | 5080 | {0x12, 0x90a60140}, |
5081 | .subvendor = 0x1028, | 5081 | {0x14, 0x90170110}, |
5082 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5082 | {0x17, 0x40000000}, |
5083 | .name = "Dell", | 5083 | {0x18, 0x411111f0}, |
5084 | #endif | 5084 | {0x19, 0x411111f0}, |
5085 | .pins = (const struct hda_pintbl[]) { | 5085 | {0x1a, 0x411111f0}, |
5086 | {0x12, 0x90a60140}, | 5086 | {0x1b, 0x411111f0}, |
5087 | {0x14, 0x90170110}, | 5087 | {0x1d, 0x40700001}, |
5088 | {0x17, 0x40000000}, | 5088 | {0x1e, 0x411111f0}, |
5089 | {0x18, 0x411111f0}, | 5089 | {0x21, 0x02211020}), |
5090 | {0x19, 0x411111f0}, | 5090 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5091 | {0x1a, 0x411111f0}, | 5091 | {0x12, 0x90a60160}, |
5092 | {0x1b, 0x411111f0}, | 5092 | {0x14, 0x90170120}, |
5093 | {0x1d, 0x40700001}, | 5093 | {0x17, 0x40000000}, |
5094 | {0x1e, 0x411111f0}, | 5094 | {0x18, 0x411111f0}, |
5095 | {0x21, 0x02211020}, | 5095 | {0x19, 0x411111f0}, |
5096 | }, | 5096 | {0x1a, 0x411111f0}, |
5097 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5097 | {0x1b, 0x411111f0}, |
5098 | }, | 5098 | {0x1d, 0x40700001}, |
5099 | { | 5099 | {0x1e, 0x411111f0}, |
5100 | .codec = 0x10ec0255, | 5100 | {0x21, 0x02211030}), |
5101 | .subvendor = 0x1028, | 5101 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5102 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5102 | {0x12, 0x90a60160}, |
5103 | .name = "Dell", | 5103 | {0x14, 0x90170120}, |
5104 | #endif | 5104 | {0x17, 0x90170140}, |
5105 | .pins = (const struct hda_pintbl[]) { | 5105 | {0x18, 0x40000000}, |
5106 | {0x12, 0x90a60160}, | 5106 | {0x19, 0x411111f0}, |
5107 | {0x14, 0x90170120}, | 5107 | {0x1a, 0x411111f0}, |
5108 | {0x17, 0x40000000}, | 5108 | {0x1b, 0x411111f0}, |
5109 | {0x18, 0x411111f0}, | 5109 | {0x1d, 0x41163b05}, |
5110 | {0x19, 0x411111f0}, | 5110 | {0x1e, 0x411111f0}, |
5111 | {0x1a, 0x411111f0}, | 5111 | {0x21, 0x0321102f}), |
5112 | {0x1b, 0x411111f0}, | 5112 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5113 | {0x1d, 0x40700001}, | 5113 | {0x12, 0x90a60160}, |
5114 | {0x1e, 0x411111f0}, | 5114 | {0x14, 0x90170130}, |
5115 | {0x21, 0x02211030}, | 5115 | {0x17, 0x40000000}, |
5116 | }, | 5116 | {0x18, 0x411111f0}, |
5117 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5117 | {0x19, 0x411111f0}, |
5118 | }, | 5118 | {0x1a, 0x411111f0}, |
5119 | { | 5119 | {0x1b, 0x411111f0}, |
5120 | .codec = 0x10ec0255, | 5120 | {0x1d, 0x40700001}, |
5121 | .subvendor = 0x1028, | 5121 | {0x1e, 0x411111f0}, |
5122 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5122 | {0x21, 0x02211040}), |
5123 | .name = "Dell", | 5123 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5124 | #endif | 5124 | {0x12, 0x90a60160}, |
5125 | .pins = (const struct hda_pintbl[]) { | 5125 | {0x14, 0x90170140}, |
5126 | {0x12, 0x90a60160}, | 5126 | {0x17, 0x40000000}, |
5127 | {0x14, 0x90170120}, | 5127 | {0x18, 0x411111f0}, |
5128 | {0x17, 0x90170140}, | 5128 | {0x19, 0x411111f0}, |
5129 | {0x18, 0x40000000}, | 5129 | {0x1a, 0x411111f0}, |
5130 | {0x19, 0x411111f0}, | 5130 | {0x1b, 0x411111f0}, |
5131 | {0x1a, 0x411111f0}, | 5131 | {0x1d, 0x40700001}, |
5132 | {0x1b, 0x411111f0}, | 5132 | {0x1e, 0x411111f0}, |
5133 | {0x1d, 0x41163b05}, | 5133 | {0x21, 0x02211050}), |
5134 | {0x1e, 0x411111f0}, | 5134 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5135 | {0x21, 0x0321102f}, | 5135 | {0x12, 0x90a60170}, |
5136 | }, | 5136 | {0x14, 0x90170120}, |
5137 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5137 | {0x17, 0x40000000}, |
5138 | }, | 5138 | {0x18, 0x411111f0}, |
5139 | { | 5139 | {0x19, 0x411111f0}, |
5140 | .codec = 0x10ec0255, | 5140 | {0x1a, 0x411111f0}, |
5141 | .subvendor = 0x1028, | 5141 | {0x1b, 0x411111f0}, |
5142 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5142 | {0x1d, 0x40700001}, |
5143 | .name = "Dell", | 5143 | {0x1e, 0x411111f0}, |
5144 | #endif | 5144 | {0x21, 0x02211030}), |
5145 | .pins = (const struct hda_pintbl[]) { | 5145 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5146 | {0x12, 0x90a60160}, | 5146 | {0x12, 0x90a60170}, |
5147 | {0x14, 0x90170130}, | 5147 | {0x14, 0x90170130}, |
5148 | {0x17, 0x40000000}, | 5148 | {0x17, 0x40000000}, |
5149 | {0x18, 0x411111f0}, | 5149 | {0x18, 0x411111f0}, |
5150 | {0x19, 0x411111f0}, | 5150 | {0x19, 0x411111f0}, |
5151 | {0x1a, 0x411111f0}, | 5151 | {0x1a, 0x411111f0}, |
5152 | {0x1b, 0x411111f0}, | 5152 | {0x1b, 0x411111f0}, |
5153 | {0x1d, 0x40700001}, | 5153 | {0x1d, 0x40700001}, |
5154 | {0x1e, 0x411111f0}, | 5154 | {0x1e, 0x411111f0}, |
5155 | {0x21, 0x02211040}, | 5155 | {0x21, 0x02211040}), |
5156 | }, | 5156 | SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
5157 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5157 | {0x12, 0x90a60130}, |
5158 | }, | 5158 | {0x14, 0x90170110}, |
5159 | { | 5159 | {0x17, 0x40020008}, |
5160 | .codec = 0x10ec0255, | 5160 | {0x18, 0x411111f0}, |
5161 | .subvendor = 0x1028, | 5161 | {0x19, 0x411111f0}, |
5162 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5162 | {0x1a, 0x411111f0}, |
5163 | .name = "Dell", | 5163 | {0x1b, 0x411111f0}, |
5164 | #endif | 5164 | {0x1d, 0x40e00001}, |
5165 | .pins = (const struct hda_pintbl[]) { | 5165 | {0x1e, 0x411111f0}, |
5166 | {0x12, 0x90a60160}, | 5166 | {0x21, 0x0321101f}), |
5167 | {0x14, 0x90170140}, | 5167 | SND_HDA_PIN_QUIRK(0x10ec0283, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
5168 | {0x17, 0x40000000}, | 5168 | {0x12, 0x90a60160}, |
5169 | {0x18, 0x411111f0}, | 5169 | {0x14, 0x90170120}, |
5170 | {0x19, 0x411111f0}, | 5170 | {0x17, 0x40000000}, |
5171 | {0x1a, 0x411111f0}, | 5171 | {0x18, 0x411111f0}, |
5172 | {0x1b, 0x411111f0}, | 5172 | {0x19, 0x411111f0}, |
5173 | {0x1d, 0x40700001}, | 5173 | {0x1a, 0x411111f0}, |
5174 | {0x1e, 0x411111f0}, | 5174 | {0x1b, 0x411111f0}, |
5175 | {0x21, 0x02211050}, | 5175 | {0x1d, 0x40700001}, |
5176 | }, | 5176 | {0x1e, 0x411111f0}, |
5177 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5177 | {0x21, 0x02211030}), |
5178 | }, | 5178 | SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, |
5179 | { | 5179 | {0x12, 0x90a60140}, |
5180 | .codec = 0x10ec0255, | 5180 | {0x13, 0x411111f0}, |
5181 | .subvendor = 0x1028, | 5181 | {0x14, 0x90170110}, |
5182 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 5182 | {0x15, 0x0221401f}, |
5183 | .name = "Dell", | 5183 | {0x16, 0x411111f0}, |
5184 | #endif | 5184 | {0x18, 0x411111f0}, |
5185 | .pins = (const struct hda_pintbl[]) { | 5185 | {0x19, 0x411111f0}, |
5186 | {0x12, 0x90a60170}, | 5186 | {0x1a, 0x411111f0}, |
5187 | {0x14, 0x90170120}, | 5187 | {0x1b, 0x411111f0}, |
5188 | {0x17, 0x40000000}, | 5188 | {0x1d, 0x40700001}, |
5189 | {0x18, 0x411111f0}, | 5189 | {0x1e, 0x411111f0}), |
5190 | {0x19, 0x411111f0}, | 5190 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, |
5191 | {0x1a, 0x411111f0}, | 5191 | {0x12, 0x40000000}, |
5192 | {0x1b, 0x411111f0}, | 5192 | {0x13, 0x90a60140}, |
5193 | {0x1d, 0x40700001}, | 5193 | {0x14, 0x90170110}, |
5194 | {0x1e, 0x411111f0}, | 5194 | {0x15, 0x0221401f}, |
5195 | {0x21, 0x02211030}, | 5195 | {0x16, 0x21014020}, |
5196 | }, | 5196 | {0x18, 0x411111f0}, |
5197 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5197 | {0x19, 0x21a19030}, |
5198 | }, | 5198 | {0x1a, 0x411111f0}, |
5199 | { | 5199 | {0x1b, 0x411111f0}, |
5200 | .codec = 0x10ec0255, | 5200 | {0x1d, 0x40700001}, |
5201 | .subvendor = 0x1028, | 5201 | {0x1e, 0x411111f0}), |
5202 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
5203 | .name = "Dell", | ||
5204 | #endif | ||
5205 | .pins = (const struct hda_pintbl[]) { | ||
5206 | {0x12, 0x90a60170}, | ||
5207 | {0x14, 0x90170130}, | ||
5208 | {0x17, 0x40000000}, | ||
5209 | {0x18, 0x411111f0}, | ||
5210 | {0x19, 0x411111f0}, | ||
5211 | {0x1a, 0x411111f0}, | ||
5212 | {0x1b, 0x411111f0}, | ||
5213 | {0x1d, 0x40700001}, | ||
5214 | {0x1e, 0x411111f0}, | ||
5215 | {0x21, 0x02211040}, | ||
5216 | }, | ||
5217 | .value = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5218 | }, | ||
5219 | { | ||
5220 | .codec = 0x10ec0283, | ||
5221 | .subvendor = 0x1028, | ||
5222 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
5223 | .name = "Dell", | ||
5224 | #endif | ||
5225 | .pins = (const struct hda_pintbl[]) { | ||
5226 | {0x12, 0x90a60130}, | ||
5227 | {0x14, 0x90170110}, | ||
5228 | {0x17, 0x40020008}, | ||
5229 | {0x18, 0x411111f0}, | ||
5230 | {0x19, 0x411111f0}, | ||
5231 | {0x1a, 0x411111f0}, | ||
5232 | {0x1b, 0x411111f0}, | ||
5233 | {0x1d, 0x40e00001}, | ||
5234 | {0x1e, 0x411111f0}, | ||
5235 | {0x21, 0x0321101f}, | ||
5236 | }, | ||
5237 | .value = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5238 | }, | ||
5239 | { | ||
5240 | .codec = 0x10ec0283, | ||
5241 | .subvendor = 0x1028, | ||
5242 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
5243 | .name = "Dell", | ||
5244 | #endif | ||
5245 | .pins = (const struct hda_pintbl[]) { | ||
5246 | {0x12, 0x90a60160}, | ||
5247 | {0x14, 0x90170120}, | ||
5248 | {0x17, 0x40000000}, | ||
5249 | {0x18, 0x411111f0}, | ||
5250 | {0x19, 0x411111f0}, | ||
5251 | {0x1a, 0x411111f0}, | ||
5252 | {0x1b, 0x411111f0}, | ||
5253 | {0x1d, 0x40700001}, | ||
5254 | {0x1e, 0x411111f0}, | ||
5255 | {0x21, 0x02211030}, | ||
5256 | }, | ||
5257 | .value = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5258 | }, | ||
5259 | { | ||
5260 | .codec = 0x10ec0292, | ||
5261 | .subvendor = 0x1028, | ||
5262 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
5263 | .name = "Dell", | ||
5264 | #endif | ||
5265 | .pins = (const struct hda_pintbl[]) { | ||
5266 | {0x12, 0x90a60140}, | ||
5267 | {0x13, 0x411111f0}, | ||
5268 | {0x14, 0x90170110}, | ||
5269 | {0x15, 0x0221401f}, | ||
5270 | {0x16, 0x411111f0}, | ||
5271 | {0x18, 0x411111f0}, | ||
5272 | {0x19, 0x411111f0}, | ||
5273 | {0x1a, 0x411111f0}, | ||
5274 | {0x1b, 0x411111f0}, | ||
5275 | {0x1d, 0x40700001}, | ||
5276 | {0x1e, 0x411111f0}, | ||
5277 | }, | ||
5278 | .value = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | ||
5279 | }, | ||
5280 | { | ||
5281 | .codec = 0x10ec0293, | ||
5282 | .subvendor = 0x1028, | ||
5283 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
5284 | .name = "Dell", | ||
5285 | #endif | ||
5286 | .pins = (const struct hda_pintbl[]) { | ||
5287 | {0x12, 0x40000000}, | ||
5288 | {0x13, 0x90a60140}, | ||
5289 | {0x14, 0x90170110}, | ||
5290 | {0x15, 0x0221401f}, | ||
5291 | {0x16, 0x21014020}, | ||
5292 | {0x18, 0x411111f0}, | ||
5293 | {0x19, 0x21a19030}, | ||
5294 | {0x1a, 0x411111f0}, | ||
5295 | {0x1b, 0x411111f0}, | ||
5296 | {0x1d, 0x40700001}, | ||
5297 | {0x1e, 0x411111f0}, | ||
5298 | }, | ||
5299 | .value = ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5300 | }, | ||
5301 | {} | 5202 | {} |
5302 | }; | 5203 | }; |
5303 | 5204 | ||
@@ -6153,90 +6054,66 @@ static const struct hda_model_fixup alc662_fixup_models[] = { | |||
6153 | }; | 6054 | }; |
6154 | 6055 | ||
6155 | static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { | 6056 | static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { |
6156 | { | 6057 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, |
6157 | .codec = 0x10ec0668, | 6058 | {0x12, 0x99a30130}, |
6158 | .subvendor = 0x1028, | 6059 | {0x14, 0x90170110}, |
6159 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 6060 | {0x15, 0x0321101f}, |
6160 | .name = "Dell", | 6061 | {0x16, 0x03011020}, |
6161 | #endif | 6062 | {0x18, 0x40000008}, |
6162 | .pins = (const struct hda_pintbl[]) { | 6063 | {0x19, 0x411111f0}, |
6163 | {0x12, 0x99a30130}, | 6064 | {0x1a, 0x411111f0}, |
6164 | {0x14, 0x90170110}, | 6065 | {0x1b, 0x411111f0}, |
6165 | {0x15, 0x0321101f}, | 6066 | {0x1d, 0x41000001}, |
6166 | {0x16, 0x03011020}, | 6067 | {0x1e, 0x411111f0}, |
6167 | {0x18, 0x40000008}, | 6068 | {0x1f, 0x411111f0}), |
6168 | {0x19, 0x411111f0}, | 6069 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, |
6169 | {0x1a, 0x411111f0}, | 6070 | {0x12, 0x99a30140}, |
6170 | {0x1b, 0x411111f0}, | 6071 | {0x14, 0x90170110}, |
6171 | {0x1d, 0x41000001}, | 6072 | {0x15, 0x0321101f}, |
6172 | {0x1e, 0x411111f0}, | 6073 | {0x16, 0x03011020}, |
6173 | {0x1f, 0x411111f0}, | 6074 | {0x18, 0x40000008}, |
6174 | }, | 6075 | {0x19, 0x411111f0}, |
6175 | .value = ALC668_FIXUP_AUTO_MUTE, | 6076 | {0x1a, 0x411111f0}, |
6176 | }, | 6077 | {0x1b, 0x411111f0}, |
6177 | { | 6078 | {0x1d, 0x41000001}, |
6178 | .codec = 0x10ec0668, | 6079 | {0x1e, 0x411111f0}, |
6179 | .subvendor = 0x1028, | 6080 | {0x1f, 0x411111f0}), |
6180 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 6081 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, |
6181 | .name = "Dell", | 6082 | {0x12, 0x99a30150}, |
6182 | #endif | 6083 | {0x14, 0x90170110}, |
6183 | .pins = (const struct hda_pintbl[]) { | 6084 | {0x15, 0x0321101f}, |
6184 | {0x12, 0x99a30140}, | 6085 | {0x16, 0x03011020}, |
6185 | {0x14, 0x90170110}, | 6086 | {0x18, 0x40000008}, |
6186 | {0x15, 0x0321101f}, | 6087 | {0x19, 0x411111f0}, |
6187 | {0x16, 0x03011020}, | 6088 | {0x1a, 0x411111f0}, |
6188 | {0x18, 0x40000008}, | 6089 | {0x1b, 0x411111f0}, |
6189 | {0x19, 0x411111f0}, | 6090 | {0x1d, 0x41000001}, |
6190 | {0x1a, 0x411111f0}, | 6091 | {0x1e, 0x411111f0}, |
6191 | {0x1b, 0x411111f0}, | 6092 | {0x1f, 0x411111f0}), |
6192 | {0x1d, 0x41000001}, | 6093 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE, |
6193 | {0x1e, 0x411111f0}, | 6094 | {0x12, 0x411111f0}, |
6194 | {0x1f, 0x411111f0}, | 6095 | {0x14, 0x90170110}, |
6195 | }, | 6096 | {0x15, 0x0321101f}, |
6196 | .value = ALC668_FIXUP_AUTO_MUTE, | 6097 | {0x16, 0x03011020}, |
6197 | }, | 6098 | {0x18, 0x40000008}, |
6198 | { | 6099 | {0x19, 0x411111f0}, |
6199 | .codec = 0x10ec0668, | 6100 | {0x1a, 0x411111f0}, |
6200 | .subvendor = 0x1028, | 6101 | {0x1b, 0x411111f0}, |
6201 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 6102 | {0x1d, 0x41000001}, |
6202 | .name = "Dell", | 6103 | {0x1e, 0x411111f0}, |
6203 | #endif | 6104 | {0x1f, 0x411111f0}), |
6204 | .pins = (const struct hda_pintbl[]) { | 6105 | SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell XPS 15", ALC668_FIXUP_AUTO_MUTE, |
6205 | {0x12, 0x99a30150}, | 6106 | {0x12, 0x90a60130}, |
6206 | {0x14, 0x90170110}, | 6107 | {0x14, 0x90170110}, |
6207 | {0x15, 0x0321101f}, | 6108 | {0x15, 0x0321101f}, |
6208 | {0x16, 0x03011020}, | 6109 | {0x16, 0x40000000}, |
6209 | {0x18, 0x40000008}, | 6110 | {0x18, 0x411111f0}, |
6210 | {0x19, 0x411111f0}, | 6111 | {0x19, 0x411111f0}, |
6211 | {0x1a, 0x411111f0}, | 6112 | {0x1a, 0x411111f0}, |
6212 | {0x1b, 0x411111f0}, | 6113 | {0x1b, 0x411111f0}, |
6213 | {0x1d, 0x41000001}, | 6114 | {0x1d, 0x40d6832d}, |
6214 | {0x1e, 0x411111f0}, | 6115 | {0x1e, 0x411111f0}, |
6215 | {0x1f, 0x411111f0}, | 6116 | {0x1f, 0x411111f0}), |
6216 | }, | ||
6217 | .value = ALC668_FIXUP_AUTO_MUTE, | ||
6218 | }, | ||
6219 | { | ||
6220 | .codec = 0x10ec0668, | ||
6221 | .subvendor = 0x1028, | ||
6222 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
6223 | .name = "Dell", | ||
6224 | #endif | ||
6225 | .pins = (const struct hda_pintbl[]) { | ||
6226 | {0x12, 0x411111f0}, | ||
6227 | {0x14, 0x90170110}, | ||
6228 | {0x15, 0x0321101f}, | ||
6229 | {0x16, 0x03011020}, | ||
6230 | {0x18, 0x40000008}, | ||
6231 | {0x19, 0x411111f0}, | ||
6232 | {0x1a, 0x411111f0}, | ||
6233 | {0x1b, 0x411111f0}, | ||
6234 | {0x1d, 0x41000001}, | ||
6235 | {0x1e, 0x411111f0}, | ||
6236 | {0x1f, 0x411111f0}, | ||
6237 | }, | ||
6238 | .value = ALC668_FIXUP_AUTO_MUTE, | ||
6239 | }, | ||
6240 | {} | 6117 | {} |
6241 | }; | 6118 | }; |
6242 | 6119 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 5267ef2b1dcc..52bdbdc7786e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -122,6 +122,12 @@ enum { | |||
122 | }; | 122 | }; |
123 | 123 | ||
124 | enum { | 124 | enum { |
125 | STAC_92HD95_HP_LED, | ||
126 | STAC_92HD95_HP_BASS, | ||
127 | STAC_92HD95_MODELS | ||
128 | }; | ||
129 | |||
130 | enum { | ||
125 | STAC_925x_REF, | 131 | STAC_925x_REF, |
126 | STAC_M1, | 132 | STAC_M1, |
127 | STAC_M1_2, | 133 | STAC_M1_2, |
@@ -4128,6 +4134,48 @@ static const struct snd_pci_quirk stac9205_fixup_tbl[] = { | |||
4128 | {} /* terminator */ | 4134 | {} /* terminator */ |
4129 | }; | 4135 | }; |
4130 | 4136 | ||
4137 | static void stac92hd95_fixup_hp_led(struct hda_codec *codec, | ||
4138 | const struct hda_fixup *fix, int action) | ||
4139 | { | ||
4140 | struct sigmatel_spec *spec = codec->spec; | ||
4141 | |||
4142 | if (action != HDA_FIXUP_ACT_PRE_PROBE) | ||
4143 | return; | ||
4144 | |||
4145 | if (find_mute_led_cfg(codec, spec->default_polarity)) | ||
4146 | codec_dbg(codec, "mute LED gpio %d polarity %d\n", | ||
4147 | spec->gpio_led, | ||
4148 | spec->gpio_led_polarity); | ||
4149 | } | ||
4150 | |||
4151 | static const struct hda_fixup stac92hd95_fixups[] = { | ||
4152 | [STAC_92HD95_HP_LED] = { | ||
4153 | .type = HDA_FIXUP_FUNC, | ||
4154 | .v.func = stac92hd95_fixup_hp_led, | ||
4155 | }, | ||
4156 | [STAC_92HD95_HP_BASS] = { | ||
4157 | .type = HDA_FIXUP_VERBS, | ||
4158 | .v.verbs = (const struct hda_verb[]) { | ||
4159 | {0x1a, 0x795, 0x00}, /* HPF to 100Hz */ | ||
4160 | {} | ||
4161 | }, | ||
4162 | .chained = true, | ||
4163 | .chain_id = STAC_92HD95_HP_LED, | ||
4164 | }, | ||
4165 | }; | ||
4166 | |||
4167 | static const struct snd_pci_quirk stac92hd95_fixup_tbl[] = { | ||
4168 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1911, "HP Spectre 13", STAC_92HD95_HP_BASS), | ||
4169 | {} /* terminator */ | ||
4170 | }; | ||
4171 | |||
4172 | static const struct hda_model_fixup stac92hd95_models[] = { | ||
4173 | { .id = STAC_92HD95_HP_LED, .name = "hp-led" }, | ||
4174 | { .id = STAC_92HD95_HP_BASS, .name = "hp-bass" }, | ||
4175 | {} | ||
4176 | }; | ||
4177 | |||
4178 | |||
4131 | static int stac_parse_auto_config(struct hda_codec *codec) | 4179 | static int stac_parse_auto_config(struct hda_codec *codec) |
4132 | { | 4180 | { |
4133 | struct sigmatel_spec *spec = codec->spec; | 4181 | struct sigmatel_spec *spec = codec->spec; |
@@ -4580,10 +4628,16 @@ static int patch_stac92hd95(struct hda_codec *codec) | |||
4580 | spec->gen.beep_nid = 0x19; /* digital beep */ | 4628 | spec->gen.beep_nid = 0x19; /* digital beep */ |
4581 | spec->pwr_nids = stac92hd95_pwr_nids; | 4629 | spec->pwr_nids = stac92hd95_pwr_nids; |
4582 | spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids); | 4630 | spec->num_pwrs = ARRAY_SIZE(stac92hd95_pwr_nids); |
4583 | spec->default_polarity = -1; /* no default cfg */ | 4631 | spec->default_polarity = 0; |
4584 | 4632 | ||
4585 | codec->patch_ops = stac_patch_ops; | 4633 | codec->patch_ops = stac_patch_ops; |
4586 | 4634 | ||
4635 | snd_hda_pick_fixup(codec, stac92hd95_models, stac92hd95_fixup_tbl, | ||
4636 | stac92hd95_fixups); | ||
4637 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); | ||
4638 | |||
4639 | stac_setup_gpio(codec); | ||
4640 | |||
4587 | err = stac_parse_auto_config(codec); | 4641 | err = stac_parse_auto_config(codec); |
4588 | if (err < 0) { | 4642 | if (err < 0) { |
4589 | stac_free(codec); | 4643 | stac_free(codec); |
@@ -4592,6 +4646,8 @@ static int patch_stac92hd95(struct hda_codec *codec) | |||
4592 | 4646 | ||
4593 | codec->proc_widget_hook = stac92hd_proc_hook; | 4647 | codec->proc_widget_hook = stac92hd_proc_hook; |
4594 | 4648 | ||
4649 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE); | ||
4650 | |||
4595 | return 0; | 4651 | return 0; |
4596 | } | 4652 | } |
4597 | 4653 | ||