diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-09-11 03:33:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-09-11 03:33:12 -0400 |
commit | 3d2f4d0c0d4f3b676ecca504a3916b8e9843a181 (patch) | |
tree | f72e05df59734bb1deeba510283072e16c056640 /sound/pci | |
parent | 09da111aef57c022ac28bb8974f41c1729102d11 (diff) | |
parent | 3f640970a41429f0a076c01270bbd014c9eae61c (diff) |
Merge branch 'for-linus' into for-next
Back-merge from for-linus just to make the further development easier.
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 32 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 35 |
2 files changed, 52 insertions, 15 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 4786f435eb64..c3469f756ec2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -907,20 +907,23 @@ static int azx_resume(struct device *dev) | |||
907 | struct snd_card *card = dev_get_drvdata(dev); | 907 | struct snd_card *card = dev_get_drvdata(dev); |
908 | struct azx *chip; | 908 | struct azx *chip; |
909 | struct hda_intel *hda; | 909 | struct hda_intel *hda; |
910 | struct hdac_bus *bus; | ||
910 | 911 | ||
911 | if (!card) | 912 | if (!card) |
912 | return 0; | 913 | return 0; |
913 | 914 | ||
914 | chip = card->private_data; | 915 | chip = card->private_data; |
915 | hda = container_of(chip, struct hda_intel, chip); | 916 | hda = container_of(chip, struct hda_intel, chip); |
917 | bus = azx_bus(chip); | ||
916 | if (chip->disabled || hda->init_failed || !chip->running) | 918 | if (chip->disabled || hda->init_failed || !chip->running) |
917 | return 0; | 919 | return 0; |
918 | 920 | ||
919 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL | 921 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
920 | && hda->need_i915_power) { | 922 | snd_hdac_display_power(bus, true); |
921 | snd_hdac_display_power(azx_bus(chip), true); | 923 | if (hda->need_i915_power) |
922 | snd_hdac_i915_set_bclk(azx_bus(chip)); | 924 | snd_hdac_i915_set_bclk(bus); |
923 | } | 925 | } |
926 | |||
924 | if (chip->msi) | 927 | if (chip->msi) |
925 | if (pci_enable_msi(pci) < 0) | 928 | if (pci_enable_msi(pci) < 0) |
926 | chip->msi = 0; | 929 | chip->msi = 0; |
@@ -930,6 +933,11 @@ static int azx_resume(struct device *dev) | |||
930 | 933 | ||
931 | hda_intel_init_chip(chip, true); | 934 | hda_intel_init_chip(chip, true); |
932 | 935 | ||
936 | /* power down again for link-controlled chips */ | ||
937 | if ((chip->driver_caps & AZX_DCAPS_I915_POWERWELL) && | ||
938 | !hda->need_i915_power) | ||
939 | snd_hdac_display_power(bus, false); | ||
940 | |||
933 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); | 941 | snd_power_change_state(card, SNDRV_CTL_POWER_D0); |
934 | 942 | ||
935 | trace_azx_resume(chip); | 943 | trace_azx_resume(chip); |
@@ -1009,6 +1017,7 @@ static int azx_runtime_resume(struct device *dev) | |||
1009 | 1017 | ||
1010 | chip = card->private_data; | 1018 | chip = card->private_data; |
1011 | hda = container_of(chip, struct hda_intel, chip); | 1019 | hda = container_of(chip, struct hda_intel, chip); |
1020 | bus = azx_bus(chip); | ||
1012 | if (chip->disabled || hda->init_failed) | 1021 | if (chip->disabled || hda->init_failed) |
1013 | return 0; | 1022 | return 0; |
1014 | 1023 | ||
@@ -1016,15 +1025,9 @@ static int azx_runtime_resume(struct device *dev) | |||
1016 | return 0; | 1025 | return 0; |
1017 | 1026 | ||
1018 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { | 1027 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { |
1019 | bus = azx_bus(chip); | 1028 | snd_hdac_display_power(bus, true); |
1020 | if (hda->need_i915_power) { | 1029 | if (hda->need_i915_power) |
1021 | snd_hdac_display_power(bus, true); | ||
1022 | snd_hdac_i915_set_bclk(bus); | 1030 | snd_hdac_i915_set_bclk(bus); |
1023 | } else { | ||
1024 | /* toggle codec wakeup bit for STATESTS read */ | ||
1025 | snd_hdac_set_codec_wakeup(bus, true); | ||
1026 | snd_hdac_set_codec_wakeup(bus, false); | ||
1027 | } | ||
1028 | } | 1031 | } |
1029 | 1032 | ||
1030 | /* Read STATESTS before controller reset */ | 1033 | /* Read STATESTS before controller reset */ |
@@ -1044,6 +1047,11 @@ static int azx_runtime_resume(struct device *dev) | |||
1044 | azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & | 1047 | azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & |
1045 | ~STATESTS_INT_MASK); | 1048 | ~STATESTS_INT_MASK); |
1046 | 1049 | ||
1050 | /* power down again for link-controlled chips */ | ||
1051 | if ((chip->driver_caps & AZX_DCAPS_I915_POWERWELL) && | ||
1052 | !hda->need_i915_power) | ||
1053 | snd_hdac_display_power(bus, false); | ||
1054 | |||
1047 | trace_azx_runtime_resume(chip); | 1055 | trace_azx_runtime_resume(chip); |
1048 | return 0; | 1056 | return 0; |
1049 | } | 1057 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4be2c77031fa..1fe8750df8de 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4828,7 +4828,7 @@ enum { | |||
4828 | ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | 4828 | ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, |
4829 | ALC292_FIXUP_TPT440_DOCK, | 4829 | ALC292_FIXUP_TPT440_DOCK, |
4830 | ALC292_FIXUP_TPT440, | 4830 | ALC292_FIXUP_TPT440, |
4831 | ALC283_FIXUP_BXBT2807_MIC, | 4831 | ALC283_FIXUP_HEADSET_MIC, |
4832 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, | 4832 | ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, |
4833 | ALC282_FIXUP_ASPIRE_V5_PINS, | 4833 | ALC282_FIXUP_ASPIRE_V5_PINS, |
4834 | ALC280_FIXUP_HP_GPIO4, | 4834 | ALC280_FIXUP_HP_GPIO4, |
@@ -4855,6 +4855,7 @@ enum { | |||
4855 | ALC221_FIXUP_HP_FRONT_MIC, | 4855 | ALC221_FIXUP_HP_FRONT_MIC, |
4856 | ALC292_FIXUP_TPT460, | 4856 | ALC292_FIXUP_TPT460, |
4857 | ALC298_FIXUP_SPK_VOLUME, | 4857 | ALC298_FIXUP_SPK_VOLUME, |
4858 | ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, | ||
4858 | }; | 4859 | }; |
4859 | 4860 | ||
4860 | static const struct hda_fixup alc269_fixups[] = { | 4861 | static const struct hda_fixup alc269_fixups[] = { |
@@ -5323,7 +5324,7 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5323 | .chained = true, | 5324 | .chained = true, |
5324 | .chain_id = ALC292_FIXUP_TPT440_DOCK, | 5325 | .chain_id = ALC292_FIXUP_TPT440_DOCK, |
5325 | }, | 5326 | }, |
5326 | [ALC283_FIXUP_BXBT2807_MIC] = { | 5327 | [ALC283_FIXUP_HEADSET_MIC] = { |
5327 | .type = HDA_FIXUP_PINS, | 5328 | .type = HDA_FIXUP_PINS, |
5328 | .v.pins = (const struct hda_pintbl[]) { | 5329 | .v.pins = (const struct hda_pintbl[]) { |
5329 | { 0x19, 0x04a110f0 }, | 5330 | { 0x19, 0x04a110f0 }, |
@@ -5518,6 +5519,15 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5518 | .chained = true, | 5519 | .chained = true, |
5519 | .chain_id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, | 5520 | .chain_id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, |
5520 | }, | 5521 | }, |
5522 | [ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER] = { | ||
5523 | .type = HDA_FIXUP_PINS, | ||
5524 | .v.pins = (const struct hda_pintbl[]) { | ||
5525 | { 0x1b, 0x90170151 }, | ||
5526 | { } | ||
5527 | }, | ||
5528 | .chained = true, | ||
5529 | .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE | ||
5530 | }, | ||
5521 | }; | 5531 | }; |
5522 | 5532 | ||
5523 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 5533 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -5562,6 +5572,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
5562 | SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), | 5572 | SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), |
5563 | SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), | 5573 | SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK), |
5564 | SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), | 5574 | SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), |
5575 | SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER), | ||
5565 | SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), | 5576 | SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), |
5566 | SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), | 5577 | SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), |
5567 | SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), | 5578 | SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME), |
@@ -5653,7 +5664,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
5653 | SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), | 5664 | SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), |
5654 | SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), | 5665 | SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), |
5655 | SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), | 5666 | SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), |
5656 | SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC), | 5667 | SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), |
5668 | SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), | ||
5657 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), | 5669 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
5658 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), | 5670 | SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), |
5659 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 5671 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
@@ -5796,6 +5808,13 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
5796 | {0x14, 0x90170110}, \ | 5808 | {0x14, 0x90170110}, \ |
5797 | {0x15, 0x0221401f} | 5809 | {0x15, 0x0221401f} |
5798 | 5810 | ||
5811 | #define ALC295_STANDARD_PINS \ | ||
5812 | {0x12, 0xb7a60130}, \ | ||
5813 | {0x14, 0x90170110}, \ | ||
5814 | {0x17, 0x21014020}, \ | ||
5815 | {0x18, 0x21a19030}, \ | ||
5816 | {0x21, 0x04211020} | ||
5817 | |||
5799 | #define ALC298_STANDARD_PINS \ | 5818 | #define ALC298_STANDARD_PINS \ |
5800 | {0x12, 0x90a60130}, \ | 5819 | {0x12, 0x90a60130}, \ |
5801 | {0x21, 0x03211020} | 5820 | {0x21, 0x03211020} |
@@ -5896,6 +5915,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
5896 | {0x12, 0x90a60170}, | 5915 | {0x12, 0x90a60170}, |
5897 | {0x14, 0x90170120}, | 5916 | {0x14, 0x90170120}, |
5898 | {0x21, 0x02211030}), | 5917 | {0x21, 0x02211030}), |
5918 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell Inspiron 5468", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5919 | {0x12, 0x90a60180}, | ||
5920 | {0x14, 0x90170120}, | ||
5921 | {0x21, 0x02211030}), | ||
5922 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5923 | {0x12, 0xb7a60130}, | ||
5924 | {0x14, 0x90170110}, | ||
5925 | {0x21, 0x02211020}), | ||
5899 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5926 | SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5900 | ALC256_STANDARD_PINS), | 5927 | ALC256_STANDARD_PINS), |
5901 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, | 5928 | SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, |
@@ -6007,6 +6034,8 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
6007 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | 6034 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, |
6008 | ALC292_STANDARD_PINS, | 6035 | ALC292_STANDARD_PINS, |
6009 | {0x13, 0x90a60140}), | 6036 | {0x13, 0x90a60140}), |
6037 | SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
6038 | ALC295_STANDARD_PINS), | ||
6010 | SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, | 6039 | SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, |
6011 | ALC298_STANDARD_PINS, | 6040 | ALC298_STANDARD_PINS, |
6012 | {0x17, 0x90170110}), | 6041 | {0x17, 0x90170110}), |