aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-06-10 11:27:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-06-10 11:27:30 -0400
commit729d378479ddb7aeafe762f59a5fc1eb79c61d7a (patch)
tree0d757032aaa16e0303c909ba5f4f4612ae6c867d
parent00da90085e84f4cee316c196041d76ce5fba677f (diff)
parent35639a0e98391036a4c7f23253c321d6621a8897 (diff)
Merge tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "We have only few, mainly HD-audio device-specific fixes. Realtek codec driver got a slightly more LOC, but they are all for the new codec chip, and won't affect others at all" * tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add PCI ID for Kabylake ALSA: hda/realtek: Add T560 docking unit fixup ALSA: hda - Fix headset mic detection problem for Dell machine ALSA: uapi: Add three missing header files to Kbuild file ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703 ALSA: hda/realtek - ALC256 speaker noise issue
-rw-r--r--include/uapi/sound/Kbuild3
-rw-r--r--sound/pci/hda/hda_intel.c11
-rw-r--r--sound/pci/hda/patch_realtek.c73
3 files changed, 81 insertions, 6 deletions
diff --git a/include/uapi/sound/Kbuild b/include/uapi/sound/Kbuild
index a7f27704f980..691984cb0b91 100644
--- a/include/uapi/sound/Kbuild
+++ b/include/uapi/sound/Kbuild
@@ -1,5 +1,6 @@
1# UAPI Header export list 1# UAPI Header export list
2header-y += asequencer.h 2header-y += asequencer.h
3header-y += asoc.h
3header-y += asound.h 4header-y += asound.h
4header-y += asound_fm.h 5header-y += asound_fm.h
5header-y += compress_offload.h 6header-y += compress_offload.h
@@ -10,3 +11,5 @@ header-y += hdsp.h
10header-y += hdspm.h 11header-y += hdspm.h
11header-y += sb16_csp.h 12header-y += sb16_csp.h
12header-y += sfnt_info.h 13header-y += sfnt_info.h
14header-y += tlv.h
15header-y += usb_stream.h
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 9a0d1445ca5c..94089fc71884 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -365,8 +365,11 @@ enum {
365 365
366#define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170) 366#define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170)
367#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) 367#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70)
368#define IS_KBL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa171)
369#define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71)
368#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 370#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
369#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) 371#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \
372 IS_KBL(pci) || IS_KBL_LP(pci)
370 373
371static char *driver_short_names[] = { 374static char *driver_short_names[] = {
372 [AZX_DRIVER_ICH] = "HDA Intel", 375 [AZX_DRIVER_ICH] = "HDA Intel",
@@ -2181,6 +2184,12 @@ static const struct pci_device_id azx_ids[] = {
2181 /* Sunrise Point-LP */ 2184 /* Sunrise Point-LP */
2182 { PCI_DEVICE(0x8086, 0x9d70), 2185 { PCI_DEVICE(0x8086, 0x9d70),
2183 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, 2186 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2187 /* Kabylake */
2188 { PCI_DEVICE(0x8086, 0xa171),
2189 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2190 /* Kabylake-LP */
2191 { PCI_DEVICE(0x8086, 0x9d71),
2192 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
2184 /* Broxton-P(Apollolake) */ 2193 /* Broxton-P(Apollolake) */
2185 { PCI_DEVICE(0x8086, 0x5a98), 2194 { PCI_DEVICE(0x8086, 0x5a98),
2186 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON }, 2195 .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d53c25e7a1c1..0fe18ede3e85 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -346,6 +346,9 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
346 case 0x10ec0234: 346 case 0x10ec0234:
347 case 0x10ec0274: 347 case 0x10ec0274:
348 case 0x10ec0294: 348 case 0x10ec0294:
349 case 0x10ec0700:
350 case 0x10ec0701:
351 case 0x10ec0703:
349 alc_update_coef_idx(codec, 0x10, 1<<15, 0); 352 alc_update_coef_idx(codec, 0x10, 1<<15, 0);
350 break; 353 break;
351 case 0x10ec0662: 354 case 0x10ec0662:
@@ -2655,6 +2658,7 @@ enum {
2655 ALC269_TYPE_ALC256, 2658 ALC269_TYPE_ALC256,
2656 ALC269_TYPE_ALC225, 2659 ALC269_TYPE_ALC225,
2657 ALC269_TYPE_ALC294, 2660 ALC269_TYPE_ALC294,
2661 ALC269_TYPE_ALC700,
2658}; 2662};
2659 2663
2660/* 2664/*
@@ -2686,6 +2690,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
2686 case ALC269_TYPE_ALC256: 2690 case ALC269_TYPE_ALC256:
2687 case ALC269_TYPE_ALC225: 2691 case ALC269_TYPE_ALC225:
2688 case ALC269_TYPE_ALC294: 2692 case ALC269_TYPE_ALC294:
2693 case ALC269_TYPE_ALC700:
2689 ssids = alc269_ssids; 2694 ssids = alc269_ssids;
2690 break; 2695 break;
2691 default: 2696 default:
@@ -3618,13 +3623,20 @@ static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
3618static void alc_headset_mode_unplugged(struct hda_codec *codec) 3623static void alc_headset_mode_unplugged(struct hda_codec *codec)
3619{ 3624{
3620 static struct coef_fw coef0255[] = { 3625 static struct coef_fw coef0255[] = {
3621 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
3622 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ 3626 WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */
3623 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ 3627 UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/
3624 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ 3628 WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */
3625 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ 3629 WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */
3626 {} 3630 {}
3627 }; 3631 };
3632 static struct coef_fw coef0255_1[] = {
3633 WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */
3634 {}
3635 };
3636 static struct coef_fw coef0256[] = {
3637 WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */
3638 {}
3639 };
3628 static struct coef_fw coef0233[] = { 3640 static struct coef_fw coef0233[] = {
3629 WRITE_COEF(0x1b, 0x0c0b), 3641 WRITE_COEF(0x1b, 0x0c0b),
3630 WRITE_COEF(0x45, 0xc429), 3642 WRITE_COEF(0x45, 0xc429),
@@ -3677,7 +3689,11 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
3677 3689
3678 switch (codec->core.vendor_id) { 3690 switch (codec->core.vendor_id) {
3679 case 0x10ec0255: 3691 case 0x10ec0255:
3692 alc_process_coef_fw(codec, coef0255_1);
3693 alc_process_coef_fw(codec, coef0255);
3694 break;
3680 case 0x10ec0256: 3695 case 0x10ec0256:
3696 alc_process_coef_fw(codec, coef0256);
3681 alc_process_coef_fw(codec, coef0255); 3697 alc_process_coef_fw(codec, coef0255);
3682 break; 3698 break;
3683 case 0x10ec0233: 3699 case 0x10ec0233:
@@ -3896,6 +3912,12 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
3896 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 3912 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
3897 {} 3913 {}
3898 }; 3914 };
3915 static struct coef_fw coef0256[] = {
3916 WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */
3917 WRITE_COEF(0x1b, 0x0c6b),
3918 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
3919 {}
3920 };
3899 static struct coef_fw coef0233[] = { 3921 static struct coef_fw coef0233[] = {
3900 WRITE_COEF(0x45, 0xd429), 3922 WRITE_COEF(0x45, 0xd429),
3901 WRITE_COEF(0x1b, 0x0c2b), 3923 WRITE_COEF(0x1b, 0x0c2b),
@@ -3936,9 +3958,11 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
3936 3958
3937 switch (codec->core.vendor_id) { 3959 switch (codec->core.vendor_id) {
3938 case 0x10ec0255: 3960 case 0x10ec0255:
3939 case 0x10ec0256:
3940 alc_process_coef_fw(codec, coef0255); 3961 alc_process_coef_fw(codec, coef0255);
3941 break; 3962 break;
3963 case 0x10ec0256:
3964 alc_process_coef_fw(codec, coef0256);
3965 break;
3942 case 0x10ec0233: 3966 case 0x10ec0233:
3943 case 0x10ec0283: 3967 case 0x10ec0283:
3944 alc_process_coef_fw(codec, coef0233); 3968 alc_process_coef_fw(codec, coef0233);
@@ -3978,6 +4002,12 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
3978 WRITE_COEFEX(0x57, 0x03, 0x8ea6), 4002 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
3979 {} 4003 {}
3980 }; 4004 };
4005 static struct coef_fw coef0256[] = {
4006 WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */
4007 WRITE_COEF(0x1b, 0x0c6b),
4008 WRITE_COEFEX(0x57, 0x03, 0x8ea6),
4009 {}
4010 };
3981 static struct coef_fw coef0233[] = { 4011 static struct coef_fw coef0233[] = {
3982 WRITE_COEF(0x45, 0xe429), 4012 WRITE_COEF(0x45, 0xe429),
3983 WRITE_COEF(0x1b, 0x0c2b), 4013 WRITE_COEF(0x1b, 0x0c2b),
@@ -4018,9 +4048,11 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
4018 4048
4019 switch (codec->core.vendor_id) { 4049 switch (codec->core.vendor_id) {
4020 case 0x10ec0255: 4050 case 0x10ec0255:
4021 case 0x10ec0256:
4022 alc_process_coef_fw(codec, coef0255); 4051 alc_process_coef_fw(codec, coef0255);
4023 break; 4052 break;
4053 case 0x10ec0256:
4054 alc_process_coef_fw(codec, coef0256);
4055 break;
4024 case 0x10ec0233: 4056 case 0x10ec0233:
4025 case 0x10ec0283: 4057 case 0x10ec0283:
4026 alc_process_coef_fw(codec, coef0233); 4058 alc_process_coef_fw(codec, coef0233);
@@ -4266,7 +4298,7 @@ static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec,
4266static void alc255_set_default_jack_type(struct hda_codec *codec) 4298static void alc255_set_default_jack_type(struct hda_codec *codec)
4267{ 4299{
4268 /* Set to iphone type */ 4300 /* Set to iphone type */
4269 static struct coef_fw fw[] = { 4301 static struct coef_fw alc255fw[] = {
4270 WRITE_COEF(0x1b, 0x880b), 4302 WRITE_COEF(0x1b, 0x880b),
4271 WRITE_COEF(0x45, 0xd089), 4303 WRITE_COEF(0x45, 0xd089),
4272 WRITE_COEF(0x1b, 0x080b), 4304 WRITE_COEF(0x1b, 0x080b),
@@ -4274,7 +4306,22 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
4274 WRITE_COEF(0x1b, 0x0c0b), 4306 WRITE_COEF(0x1b, 0x0c0b),
4275 {} 4307 {}
4276 }; 4308 };
4277 alc_process_coef_fw(codec, fw); 4309 static struct coef_fw alc256fw[] = {
4310 WRITE_COEF(0x1b, 0x884b),
4311 WRITE_COEF(0x45, 0xd089),
4312 WRITE_COEF(0x1b, 0x084b),
4313 WRITE_COEF(0x46, 0x0004),
4314 WRITE_COEF(0x1b, 0x0c4b),
4315 {}
4316 };
4317 switch (codec->core.vendor_id) {
4318 case 0x10ec0255:
4319 alc_process_coef_fw(codec, alc255fw);
4320 break;
4321 case 0x10ec0256:
4322 alc_process_coef_fw(codec, alc256fw);
4323 break;
4324 }
4278 msleep(30); 4325 msleep(30);
4279} 4326}
4280 4327
@@ -5587,6 +5634,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5587 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK), 5634 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
5588 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK), 5635 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
5589 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK), 5636 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
5637 SND_PCI_QUIRK(0x17aa, 0x2231, "Thinkpad T560", ALC292_FIXUP_TPT460),
5590 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460), 5638 SND_PCI_QUIRK(0x17aa, 0x2233, "Thinkpad", ALC292_FIXUP_TPT460),
5591 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 5639 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
5592 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 5640 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
@@ -5775,6 +5823,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5775 {0x12, 0x90a60180}, 5823 {0x12, 0x90a60180},
5776 {0x14, 0x90170130}, 5824 {0x14, 0x90170130},
5777 {0x21, 0x02211040}), 5825 {0x21, 0x02211040}),
5826 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5565", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5827 {0x12, 0x90a60180},
5828 {0x14, 0x90170120},
5829 {0x21, 0x02211030}),
5778 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 5830 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5779 {0x12, 0x90a60160}, 5831 {0x12, 0x90a60160},
5780 {0x14, 0x90170120}, 5832 {0x14, 0x90170120},
@@ -6053,6 +6105,14 @@ static int patch_alc269(struct hda_codec *codec)
6053 case 0x10ec0294: 6105 case 0x10ec0294:
6054 spec->codec_variant = ALC269_TYPE_ALC294; 6106 spec->codec_variant = ALC269_TYPE_ALC294;
6055 break; 6107 break;
6108 case 0x10ec0700:
6109 case 0x10ec0701:
6110 case 0x10ec0703:
6111 spec->codec_variant = ALC269_TYPE_ALC700;
6112 spec->gen.mixer_nid = 0; /* ALC700 does not have any loopback mixer path */
6113 alc_update_coef_idx(codec, 0x4a, 0, 1 << 15); /* Combo jack auto trigger control */
6114 break;
6115
6056 } 6116 }
6057 6117
6058 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { 6118 if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) {
@@ -7008,6 +7068,9 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
7008 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662), 7068 HDA_CODEC_ENTRY(0x10ec0670, "ALC670", patch_alc662),
7009 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662), 7069 HDA_CODEC_ENTRY(0x10ec0671, "ALC671", patch_alc662),
7010 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680), 7070 HDA_CODEC_ENTRY(0x10ec0680, "ALC680", patch_alc680),
7071 HDA_CODEC_ENTRY(0x10ec0700, "ALC700", patch_alc269),
7072 HDA_CODEC_ENTRY(0x10ec0701, "ALC701", patch_alc269),
7073 HDA_CODEC_ENTRY(0x10ec0703, "ALC703", patch_alc269),
7011 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc882), 7074 HDA_CODEC_ENTRY(0x10ec0867, "ALC891", patch_alc882),
7012 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880), 7075 HDA_CODEC_ENTRY(0x10ec0880, "ALC880", patch_alc880),
7013 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882), 7076 HDA_CODEC_ENTRY(0x10ec0882, "ALC882", patch_alc882),