sound fixes for 4.8-rc1

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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIrBAABCAAVBQJXpHIDDhx0aXdhaUBzdXNlLmRlAAoJEGwxgFQ9KSmkjFMP/0dR
 DDCXt1Yh4QyOEhG2uUimMPsdL2WIePGnLDx+elHfVpa6nwlm3P0JQRbXLGyn9IUJ
 1DoJgqZkJdDCQkGxGV3pGMPh2c23m/neHz4ISOEkKAYizJozlYv4HAJuqsMrGdoI
 4EPRvJQy5Lj3T2WfsjPNkh9fSzcIrGqONyYkBomjGPXDB9PxcckCnRbHN+03LGv8
 CT1zel5HsAK1TGisUJEYK+f+Il8NQnDPeraVR1TxkR3dnI4jZhZR1anmI8W1Xn+a
 Uf98+LxFq4FFYLnxgGf+j8vLvg6Jiyr0Tdta1JON8839xgs8nFiwhTWtSOBZP8ub
 8o3cnjBe20vypzn11vMGjPVAdY1P56h+OuFx/sPG/luZSYRgi4Rx68DSUm+o6+uc
 YmceNUOgyYB+GeZ0AI/V+TyjesRIxEcg9jWLFXRvRdHSMWKKln5aBMx8PNgfrPab
 loIGWaz8pFCj7hmAb5i2FWaLfpieHiND6y+ijCczcl0bjdioqZmy+fSFk44pRXqm
 g3Du4QlT34aNw68c4bj2HxP2tLTv7ENYywAWRb4OBzSDhK1Pxw+DZF9d0XL4HOEr
 UBOB5aGvl43X1CqdgrTP8VwsbrhpSS5dAU83KeOnGIuMguR5eJTPnit7RrYGoKYr
 PjMdUVcvRNLM1uM+3fQN8wQT9v/uj3BVEG/+zCJR
 =h6Ao
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2016-08-05 09:45:14 -04:00
commit d4c06c7081
4 changed files with 49 additions and 9 deletions

View File

@ -9,14 +9,6 @@ menuconfig SND_ARM
Drivers that are implemented on ASoC can be found in Drivers that are implemented on ASoC can be found in
"ALSA for SoC audio support" section. "ALSA for SoC audio support" section.
config SND_PXA2XX_LIB
tristate
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
select SND_DMAENGINE_PCM
config SND_PXA2XX_LIB_AC97
bool
if SND_ARM if SND_ARM
config SND_ARMAACI config SND_ARMAACI
@ -42,3 +34,10 @@ config SND_PXA2XX_AC97
endif # SND_ARM endif # SND_ARM
config SND_PXA2XX_LIB
tristate
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
select SND_DMAENGINE_PCM
config SND_PXA2XX_LIB_AC97
bool

View File

@ -21,13 +21,15 @@ void *snd_array_new(struct snd_array *array)
return NULL; return NULL;
if (array->used >= array->alloced) { if (array->used >= array->alloced) {
int num = array->alloced + array->alloc_align; int num = array->alloced + array->alloc_align;
int oldsize = array->alloced * array->elem_size;
int size = (num + 1) * array->elem_size; int size = (num + 1) * array->elem_size;
void *nlist; void *nlist;
if (snd_BUG_ON(num >= 4096)) if (snd_BUG_ON(num >= 4096))
return NULL; return NULL;
nlist = krealloc(array->list, size, GFP_KERNEL | __GFP_ZERO); nlist = krealloc(array->list, size, GFP_KERNEL);
if (!nlist) if (!nlist)
return NULL; return NULL;
memset(nlist + oldsize, 0, size - oldsize);
array->list = nlist; array->list = nlist;
array->alloced = num; array->alloced = num;
} }

View File

@ -2265,6 +2265,8 @@ static const struct pci_device_id azx_ids[] = {
{ PCI_DEVICE(0x1022, 0x780d), { PCI_DEVICE(0x1022, 0x780d),
.driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB }, .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
/* ATI HDMI */ /* ATI HDMI */
{ PCI_DEVICE(0x1002, 0x0002),
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0x1308), { PCI_DEVICE(0x1002, 0x1308),
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS }, .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0x157a), { PCI_DEVICE(0x1002, 0x157a),

View File

@ -4689,6 +4689,22 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec,
} }
} }
static void alc298_fixup_speaker_volume(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
/* The speaker is routed to the Node 0x06 by a mistake, as a result
we can't adjust the speaker's volume since this node does not has
Amp-out capability. we change the speaker's route to:
Node 0x02 (Audio Output) -> Node 0x0c (Audio Mixer) -> Node 0x17 (
Pin Complex), since Node 0x02 has Amp-out caps, we can adjust
speaker's volume now. */
hda_nid_t conn1[1] = { 0x0c };
snd_hda_override_conn_list(codec, 0x17, 1, conn1);
}
}
/* Hook to update amp GPIO4 for automute */ /* Hook to update amp GPIO4 for automute */
static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec,
struct hda_jack_callback *jack) struct hda_jack_callback *jack)
@ -4838,6 +4854,7 @@ enum {
ALC280_FIXUP_HP_HEADSET_MIC, ALC280_FIXUP_HP_HEADSET_MIC,
ALC221_FIXUP_HP_FRONT_MIC, ALC221_FIXUP_HP_FRONT_MIC,
ALC292_FIXUP_TPT460, ALC292_FIXUP_TPT460,
ALC298_FIXUP_SPK_VOLUME,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
@ -5493,6 +5510,12 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE, .chain_id = ALC293_FIXUP_LENOVO_SPK_NOISE,
}, },
[ALC298_FIXUP_SPK_VOLUME] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc298_fixup_speaker_volume,
.chained = true,
.chain_id = ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
},
}; };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@ -5539,6 +5562,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE), SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", ALC255_FIXUP_DELL_SPK_NOISE),
SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 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[] = {
{0x14, 0x90170130}, {0x14, 0x90170130},
{0x1b, 0x01014020}, {0x1b, 0x01014020},
{0x21, 0x0221103f}), {0x21, 0x0221103f}),
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
{0x14, 0x90170130},
{0x1b, 0x02011020},
{0x21, 0x0221103f}),
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
{0x14, 0x90170150}, {0x14, 0x90170150},
{0x1b, 0x02011020}, {0x1b, 0x02011020},
@ -6549,6 +6577,7 @@ enum {
ALC668_FIXUP_ASUS_Nx51, ALC668_FIXUP_ASUS_Nx51,
ALC891_FIXUP_HEADSET_MODE, ALC891_FIXUP_HEADSET_MODE,
ALC891_FIXUP_DELL_MIC_NO_PRESENCE, ALC891_FIXUP_DELL_MIC_NO_PRESENCE,
ALC662_FIXUP_ACER_VERITON,
}; };
static const struct hda_fixup alc662_fixups[] = { static const struct hda_fixup alc662_fixups[] = {
@ -6818,6 +6847,13 @@ static const struct hda_fixup alc662_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC891_FIXUP_HEADSET_MODE .chain_id = ALC891_FIXUP_HEADSET_MODE
}, },
[ALC662_FIXUP_ACER_VERITON] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x15, 0x50170120 }, /* no internal speaker */
{ }
}
},
}; };
static const struct snd_pci_quirk alc662_fixup_tbl[] = { static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@ -6856,6 +6892,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD), SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD), SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68), SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
#if 0 #if 0