forked from Minki/linux
sound fixes for 4.18-rc6
A rawmidi race fix and three trivial HD-audio quirks. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAltQZuYOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE8P4A//Xaf6cy3XejK9zPaV/Ony+IiJfcpRbbug/Mhc eV1l+a/+DJNpeEJQScDtQjQejDnyytF3643sJ2VHVGMX3NEWeasfkJ3943FEijOK RkSW5VtXSExXcshwwu8JSllEXWK48rUzjYXT8ORccfQWn9mE1xfRFkMKalj2+f17 0joP7N2wxc5Xw44Gkq9iFcadxyfUo/dj6/MNdSU+HpcwLFszCsVDY6t3pfwQykm9 WEsalkAUARSMAo6ZnS67lLwH+9aqb7Zt5tPke44FT/LSAOlu8oJnqWrhwOQSZmRg hm5UF2yo9N29CKJwhSLNN1Me+Ko8OGaEVzB4bXYnhmCQi+YcVvL4lR3kTPCZQhVE ExI3vjGFi9EjCd8V1Oe5OxqAjdpLQgRzScGYszmry1U6jiZus2pc90D2s55ABqE7 ZBmG6i+Ee9ltDPBbZMrsN7N2+M+hXq/10yy5pLZukA0YJpe5ec1iyJmvvduEodbh jKyzGh/+tFQGlUpgsJoBa0+K7C/UzaKJyPhp7+iSLrLUcaXdv4mWvQYWUZzzI8zW 3GPPTUdpqm67eFRg1HgOQ0YWslgyuASCcsH/qmAfD+9ilEKe+r7EffYf79dm99JJ gF5ocX5zHS5JpRHxD5RZi+Vd3fj7wcj+NKAiIAIOFS3JLDScTG9n/5vP4K7W9vRI F+Q5s+c= =vsVz -----END PGP SIGNATURE----- Merge tag 'sound-4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A rawmidi race fix and three trivial HD-audio quirks" * tag 'sound-4.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Yet another Clevo P950 quirk entry ALSA: rawmidi: Change resized buffers atomically ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirk ALSA: hda: add mute led support for HP ProBook 455 G5
This commit is contained in:
commit
f39f28ff82
@ -635,7 +635,7 @@ static int snd_rawmidi_info_select_user(struct snd_card *card,
|
||||
int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
|
||||
struct snd_rawmidi_params * params)
|
||||
{
|
||||
char *newbuf;
|
||||
char *newbuf, *oldbuf;
|
||||
struct snd_rawmidi_runtime *runtime = substream->runtime;
|
||||
|
||||
if (substream->append && substream->use_count > 1)
|
||||
@ -648,13 +648,17 @@ int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
if (params->buffer_size != runtime->buffer_size) {
|
||||
newbuf = krealloc(runtime->buffer, params->buffer_size,
|
||||
GFP_KERNEL);
|
||||
newbuf = kmalloc(params->buffer_size, GFP_KERNEL);
|
||||
if (!newbuf)
|
||||
return -ENOMEM;
|
||||
spin_lock_irq(&runtime->lock);
|
||||
oldbuf = runtime->buffer;
|
||||
runtime->buffer = newbuf;
|
||||
runtime->buffer_size = params->buffer_size;
|
||||
runtime->avail = runtime->buffer_size;
|
||||
runtime->appl_ptr = runtime->hw_ptr = 0;
|
||||
spin_unlock_irq(&runtime->lock);
|
||||
kfree(oldbuf);
|
||||
}
|
||||
runtime->avail_min = params->avail_min;
|
||||
substream->active_sensing = !params->no_active_sensing;
|
||||
@ -665,7 +669,7 @@ EXPORT_SYMBOL(snd_rawmidi_output_params);
|
||||
int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
|
||||
struct snd_rawmidi_params * params)
|
||||
{
|
||||
char *newbuf;
|
||||
char *newbuf, *oldbuf;
|
||||
struct snd_rawmidi_runtime *runtime = substream->runtime;
|
||||
|
||||
snd_rawmidi_drain_input(substream);
|
||||
@ -676,12 +680,16 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
if (params->buffer_size != runtime->buffer_size) {
|
||||
newbuf = krealloc(runtime->buffer, params->buffer_size,
|
||||
GFP_KERNEL);
|
||||
newbuf = kmalloc(params->buffer_size, GFP_KERNEL);
|
||||
if (!newbuf)
|
||||
return -ENOMEM;
|
||||
spin_lock_irq(&runtime->lock);
|
||||
oldbuf = runtime->buffer;
|
||||
runtime->buffer = newbuf;
|
||||
runtime->buffer_size = params->buffer_size;
|
||||
runtime->appl_ptr = runtime->hw_ptr = 0;
|
||||
spin_unlock_irq(&runtime->lock);
|
||||
kfree(oldbuf);
|
||||
}
|
||||
runtime->avail_min = params->avail_min;
|
||||
return 0;
|
||||
|
@ -964,6 +964,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC),
|
||||
SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x822e, "HP ProBook 440 G4", CXT_FIXUP_MUTE_LED_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO),
|
||||
SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
|
||||
|
@ -2366,6 +2366,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
|
||||
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
|
||||
SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
|
||||
@ -6569,6 +6570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
|
||||
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
|
||||
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
|
||||
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
|
||||
SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8),
|
||||
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
|
||||
|
Loading…
Reference in New Issue
Block a user