aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-05 09:45:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-05 09:45:14 -0400
commitd4c06c708123c652025d04fe77b7e39448077395 (patch)
treeb6f8a9fdc7e1a9462744e6ba8720a469d060fb0c /sound
parent2cfd716d2777489db54a237f466a1c42700879c6 (diff)
parent59ec4b57bcaede46546d54d037a21004b9aa5cef (diff)
Merge tag 'sound-fix-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Nothing existing here: as usual a few HD-audio fixes (device fixups, a new AMD PCI ID, and a fix for krealloc() usage), in addition to a fix in Kconfig for legacy arm drivers" * tag 'sound-fix-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix headset mic detection problem for two dell machines ALSA: hda: Fix krealloc() with __GFP_ZERO usage ALSA: hda: add AMD Bonaire AZ PCI ID with proper driver caps ALSA: arm: Fix empty menuconfig SND_ARM ALSA: hda - On-board speaker fixup on ACER Veriton ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO
Diffstat (limited to 'sound')
-rw-r--r--sound/arm/Kconfig15
-rw-r--r--sound/hda/array.c4
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_realtek.c37
4 files changed, 49 insertions, 9 deletions
diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig
index e0406211716b..65171f6657a2 100644
--- a/sound/arm/Kconfig
+++ b/sound/arm/Kconfig
@@ -9,14 +9,6 @@ menuconfig SND_ARM
9 Drivers that are implemented on ASoC can be found in 9 Drivers that are implemented on ASoC can be found in
10 "ALSA for SoC audio support" section. 10 "ALSA for SoC audio support" section.
11 11
12config SND_PXA2XX_LIB
13 tristate
14 select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
15 select SND_DMAENGINE_PCM
16
17config SND_PXA2XX_LIB_AC97
18 bool
19
20if SND_ARM 12if SND_ARM
21 13
22config SND_ARMAACI 14config SND_ARMAACI
@@ -42,3 +34,10 @@ config SND_PXA2XX_AC97
42 34
43endif # SND_ARM 35endif # SND_ARM
44 36
37config SND_PXA2XX_LIB
38 tristate
39 select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
40 select SND_DMAENGINE_PCM
41
42config SND_PXA2XX_LIB_AC97
43 bool
diff --git a/sound/hda/array.c b/sound/hda/array.c
index 516795baa7db..5dfa610e4471 100644
--- a/sound/hda/array.c
+++ b/sound/hda/array.c
@@ -21,13 +21,15 @@ void *snd_array_new(struct snd_array *array)
21 return NULL; 21 return NULL;
22 if (array->used >= array->alloced) { 22 if (array->used >= array->alloced) {
23 int num = array->alloced + array->alloc_align; 23 int num = array->alloced + array->alloc_align;
24 int oldsize = array->alloced * array->elem_size;
24 int size = (num + 1) * array->elem_size; 25 int size = (num + 1) * array->elem_size;
25 void *nlist; 26 void *nlist;
26 if (snd_BUG_ON(num >= 4096)) 27 if (snd_BUG_ON(num >= 4096))
27 return NULL; 28 return NULL;
28 nlist = krealloc(array->list, size, GFP_KERNEL | __GFP_ZERO); 29 nlist = krealloc(array->list, size, GFP_KERNEL);
29 if (!nlist) 30 if (!nlist)
30 return NULL; 31 return NULL;
32 memset(nlist + oldsize, 0, size - oldsize);
31 array->list = nlist; 33 array->list = nlist;
32 array->alloced = num; 34 array->alloced = num;
33 } 35 }
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 6f8ea13323c1..89dacf9b4e6c 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2265,6 +2265,8 @@ static const struct pci_device_id azx_ids[] = {
2265 { PCI_DEVICE(0x1022, 0x780d), 2265 { PCI_DEVICE(0x1022, 0x780d),
2266 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, 2266 .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
2267 /* ATI HDMI */ 2267 /* ATI HDMI */
2268 { PCI_DEVICE(0x1002, 0x0002),
2269 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2268 { PCI_DEVICE(0x1002, 0x1308), 2270 { PCI_DEVICE(0x1002, 0x1308),
2269 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, 2271 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
2270 { PCI_DEVICE(0x1002, 0x157a), 2272 { PCI_DEVICE(0x1002, 0x157a),
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ddd29b9819ba..574b1b48996f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4689,6 +4689,22 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec,
4689 } 4689 }
4690} 4690}
4691 4691
4692static void alc298_fixup_speaker_volume(struct hda_codec *codec,
4693 const struct hda_fixup *fix, int action)
4694{
4695 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4696 /* The speaker is routed to the Node 0x06 by a mistake, as a result
4697 we can't adjust the speaker's volume since this node does not has
4698 Amp-out capability. we change the speaker's route to:
4699 Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
4700 Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
4701 speaker's volume now. */
4702
4703 hda_nid_t conn1[1] = { 0x0c };
4704 snd_hda_override_conn_list(codec, 0x17, 1, conn1);
4705 }
4706}
4707
4692/* Hook to update amp GPIO4 for automute */ 4708/* Hook to update amp GPIO4 for automute */
4693static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, 4709static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
4694 struct hda_jack_callback *jack) 4710 struct hda_jack_callback *jack)
@@ -4838,6 +4854,7 @@ enum {
4838 ALC280_FIXUP_HP_HEADSET_MIC, 4854 ALC280_FIXUP_HP_HEADSET_MIC,
4839 ALC221_FIXUP_HP_FRONT_MIC, 4855 ALC221_FIXUP_HP_FRONT_MIC,
4840 ALC292_FIXUP_TPT460, 4856 ALC292_FIXUP_TPT460,
4857 ALC298_FIXUP_SPK_VOLUME,
4841}; 4858};
4842 4859
4843static const struct hda_fixup alc269_fixups[] = { 4860static const struct hda_fixup alc269_fixups[] = {
@@ -5493,6 +5510,12 @@ static const struct hda_fixup alc269_fixups[] = {
5493 .chained = true, 5510 .chained = true,
5494 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE, 5511 .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
5495 }, 5512 },
5513 [ALC298_FIXUP_SPK_VOLUME] = {
5514 .type = HDA_FIXUP_FUNC,
5515 .v.func = alc298_fixup_speaker_volume,
5516 .chained = true,
5517 .chain_id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
5518 },
5496}; 5519};
5497 5520
5498static const struct snd_pci_quirk alc269_fixup_tbl[] = { 5521static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5539,6 +5562,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
5539 SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 5562 SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
5540 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), 5563 SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
5541 SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 5564 SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
5565 SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
5542 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5566 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
5543 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 5567 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
5544 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 5568 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
@@ -5814,6 +5838,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5814 {0x1b, 0x01014020}, 5838 {0x1b, 0x01014020},
5815 {0x21, 0x0221103f}), 5839 {0x21, 0x0221103f}),
5816 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, 5840 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5841 {0x14, 0x90170130},
5842 {0x1b, 0x02011020},
5843 {0x21, 0x0221103f}),
5844 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5817 {0x14, 0x90170150}, 5845 {0x14, 0x90170150},
5818 {0x1b, 0x02011020}, 5846 {0x1b, 0x02011020},
5819 {0x21, 0x0221105f}), 5847 {0x21, 0x0221105f}),
@@ -6549,6 +6577,7 @@ enum {
6549 ALC668_FIXUP_ASUS_Nx51, 6577 ALC668_FIXUP_ASUS_Nx51,
6550 ALC891_FIXUP_HEADSET_MODE, 6578 ALC891_FIXUP_HEADSET_MODE,
6551 ALC891_FIXUP_DELL_MIC_NO_PRESENCE, 6579 ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
6580 ALC662_FIXUP_ACER_VERITON,
6552}; 6581};
6553 6582
6554static const struct hda_fixup alc662_fixups[] = { 6583static const struct hda_fixup alc662_fixups[] = {
@@ -6818,6 +6847,13 @@ static const struct hda_fixup alc662_fixups[] = {
6818 .chained = true, 6847 .chained = true,
6819 .chain_id = ALC891_FIXUP_HEADSET_MODE 6848 .chain_id = ALC891_FIXUP_HEADSET_MODE
6820 }, 6849 },
6850 [ALC662_FIXUP_ACER_VERITON] = {
6851 .type = HDA_FIXUP_PINS,
6852 .v.pins = (const struct hda_pintbl[]) {
6853 { 0x15, 0x50170120 }, /* no internal speaker */
6854 { }
6855 }
6856 },
6821}; 6857};
6822 6858
6823static const struct snd_pci_quirk alc662_fixup_tbl[] = { 6859static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -6856,6 +6892,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
6856 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), 6892 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
6857 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), 6893 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
6858 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), 6894 SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
6895 SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
6859 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), 6896 SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
6860 6897
6861#if 0 6898#if 0