Skip to content

Commit d4c06c7

Browse files
committed
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
2 parents 2cfd716 + 59ec4b5 commit d4c06c7

File tree

4 files changed

+49
-9
lines changed

4 files changed

+49
-9
lines changed

sound/arm/Kconfig

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ menuconfig SND_ARM
99
Drivers that are implemented on ASoC can be found in
1010
"ALSA for SoC audio support" section.
1111

12-
config SND_PXA2XX_LIB
13-
tristate
14-
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
15-
select SND_DMAENGINE_PCM
16-
17-
config SND_PXA2XX_LIB_AC97
18-
bool
19-
2012
if SND_ARM
2113

2214
config SND_ARMAACI
@@ -42,3 +34,10 @@ config SND_PXA2XX_AC97
4234

4335
endif # SND_ARM
4436

37+
config SND_PXA2XX_LIB
38+
tristate
39+
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
40+
select SND_DMAENGINE_PCM
41+
42+
config SND_PXA2XX_LIB_AC97
43+
bool

sound/hda/array.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ void *snd_array_new(struct snd_array *array)
2121
return NULL;
2222
if (array->used >= array->alloced) {
2323
int num = array->alloced + array->alloc_align;
24+
int oldsize = array->alloced * array->elem_size;
2425
int size = (num + 1) * array->elem_size;
2526
void *nlist;
2627
if (snd_BUG_ON(num >= 4096))
2728
return NULL;
28-
nlist = krealloc(array->list, size, GFP_KERNEL | __GFP_ZERO);
29+
nlist = krealloc(array->list, size, GFP_KERNEL);
2930
if (!nlist)
3031
return NULL;
32+
memset(nlist + oldsize, 0, size - oldsize);
3133
array->list = nlist;
3234
array->alloced = num;
3335
}

sound/pci/hda/hda_intel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,8 @@ static const struct pci_device_id azx_ids[] = {
22652265
{ PCI_DEVICE(0x1022, 0x780d),
22662266
.driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
22672267
/* ATI HDMI */
2268+
{ PCI_DEVICE(0x1002, 0x0002),
2269+
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
22682270
{ PCI_DEVICE(0x1002, 0x1308),
22692271
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
22702272
{ PCI_DEVICE(0x1002, 0x157a),

sound/pci/hda/patch_realtek.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4689,6 +4689,22 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec,
46894689
}
46904690
}
46914691

4692+
static 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+
46924708
/* Hook to update amp GPIO4 for automute */
46934709
static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
46944710
struct hda_jack_callback *jack)
@@ -4838,6 +4854,7 @@ enum {
48384854
ALC280_FIXUP_HP_HEADSET_MIC,
48394855
ALC221_FIXUP_HP_FRONT_MIC,
48404856
ALC292_FIXUP_TPT460,
4857+
ALC298_FIXUP_SPK_VOLUME,
48414858
};
48424859

48434860
static const struct hda_fixup alc269_fixups[] = {
@@ -5493,6 +5510,12 @@ static const struct hda_fixup alc269_fixups[] = {
54935510
.chained = true,
54945511
.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
54955512
},
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+
},
54965519
};
54975520

54985521
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5539,6 +5562,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
55395562
SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
55405563
SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
55415564
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),
55425566
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
55435567
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
55445568
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
@@ -5813,6 +5837,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
58135837
{0x14, 0x90170130},
58145838
{0x1b, 0x01014020},
58155839
{0x21, 0x0221103f}),
5840+
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
5841+
{0x14, 0x90170130},
5842+
{0x1b, 0x02011020},
5843+
{0x21, 0x0221103f}),
58165844
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
58175845
{0x14, 0x90170150},
58185846
{0x1b, 0x02011020},
@@ -6549,6 +6577,7 @@ enum {
65496577
ALC668_FIXUP_ASUS_Nx51,
65506578
ALC891_FIXUP_HEADSET_MODE,
65516579
ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
6580+
ALC662_FIXUP_ACER_VERITON,
65526581
};
65536582

65546583
static const struct hda_fixup alc662_fixups[] = {
@@ -6818,6 +6847,13 @@ static const struct hda_fixup alc662_fixups[] = {
68186847
.chained = true,
68196848
.chain_id = ALC891_FIXUP_HEADSET_MODE
68206849
},
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+
},
68216857
};
68226858

68236859
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -6856,6 +6892,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
68566892
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
68576893
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
68586894
SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
6895+
SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
68596896
SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
68606897

68616898
#if 0

0 commit comments

Comments
 (0)