From: Greg Kroah-Hartman Date: Mon, 24 May 2021 09:32:47 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v4.4.270~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1be811d98b65c2b4c883a98ec6ede1d4e1819c5;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch alsa-usb-audio-validate-ms-endpoint-descriptors.patch revert-alsa-sb8-add-a-check-for-request_region.patch --- diff --git a/queue-4.14/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch b/queue-4.14/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch new file mode 100644 index 00000000000..2e71a03f4f3 --- /dev/null +++ b/queue-4.14/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch @@ -0,0 +1,73 @@ +From 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Thu, 13 May 2021 21:56:49 +0900 +Subject: ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro + +From: Takashi Sakamoto + +commit 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f upstream. + +Mackie d.2 has an extension card for IEEE 1394 communication, which uses +BridgeCo DM1000 ASIC. On the other hand, Mackie d.4 Pro has built-in +function for IEEE 1394 communication by Oxford Semiconductor OXFW971, +according to schematic diagram available in Mackie website. Although I +misunderstood that Mackie d.2 Pro would be also a model with OXFW971, +it's wrong. Mackie d.2 Pro is a model which includes the extension card +as factory settings. + +This commit fixes entries in Kconfig and comment in ALSA OXFW driver. + +Cc: +Fixes: fd6f4b0dc167 ("ALSA: bebob: Add skelton for BeBoB based devices") +Fixes: ec4dba5053e1 ("ALSA: oxfw: Add support for Behringer/Mackie devices") +Signed-off-by: Takashi Sakamoto +Link: https://lore.kernel.org/r/20210513125652.110249-3-o-takashi@sakamocchi.jp +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/firewire/Kconfig | 4 ++-- + sound/firewire/bebob/bebob.c | 2 +- + sound/firewire/oxfw/oxfw.c | 1 - + 3 files changed, 3 insertions(+), 4 deletions(-) + +--- a/sound/firewire/Kconfig ++++ b/sound/firewire/Kconfig +@@ -37,7 +37,7 @@ config SND_OXFW + * Mackie(Loud) Onyx 1640i (former model) + * Mackie(Loud) Onyx Satellite + * Mackie(Loud) Tapco Link.Firewire +- * Mackie(Loud) d.2 pro/d.4 pro ++ * Mackie(Loud) d.4 pro + * Mackie(Loud) U.420/U.420d + * TASCAM FireOne + * Stanton Controllers & Systems 1 Deck/Mixer +@@ -83,7 +83,7 @@ config SND_BEBOB + * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 + * BridgeCo RDAudio1/Audio5 + * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) +- * Mackie d.2 (FireWire Option) ++ * Mackie d.2 (FireWire Option) and d.2 Pro + * Stanton FinalScratch 2 (ScratchAmp) + * Tascam IF-FW/DM + * Behringer XENIX UFX 1204/1604 +--- a/sound/firewire/bebob/bebob.c ++++ b/sound/firewire/bebob/bebob.c +@@ -414,7 +414,7 @@ static const struct ieee1394_device_id b + SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), + /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ + SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), +- /* Mackie, d.2 (Firewire Option) */ ++ // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). + SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), + /* Stanton, ScratchAmp */ + SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), +--- a/sound/firewire/oxfw/oxfw.c ++++ b/sound/firewire/oxfw/oxfw.c +@@ -406,7 +406,6 @@ static const struct ieee1394_device_id o + * Onyx-i series (former models): 0x081216 + * Mackie Onyx Satellite: 0x00200f + * Tapco LINK.firewire 4x6: 0x000460 +- * d.2 pro: Unknown + * d.4 pro: Unknown + * U.420: Unknown + * U.420d: Unknown diff --git a/queue-4.14/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch b/queue-4.14/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch new file mode 100644 index 00000000000..60a7ef9a91a --- /dev/null +++ b/queue-4.14/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch @@ -0,0 +1,53 @@ +From 8822702f6e4c8917c83ba79e0ebf2c8c218910d4 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Fri, 7 May 2021 10:44:52 +0800 +Subject: ALSA: hda/realtek: reset eapd coeff to default value for alc287 + +From: Hui Wang + +commit 8822702f6e4c8917c83ba79e0ebf2c8c218910d4 upstream. + +Ubuntu users reported an audio bug on the Lenovo Yoga Slim 7 14IIL05, +he installed dual OS (Windows + Linux), if he booted to the Linux +from Windows, the Speaker can't work well, it has crackling noise, +if he poweroff the machine first after Windows, the Speaker worked +well. + +Before rebooting or shutdown from Windows, the Windows changes the +codec eapd coeff value, but the BIOS doesn't re-initialize its value, +when booting into the Linux from Windows, the eapd coeff value is not +correct. To fix it, set the codec default value to that coeff register +in the alsa driver. + +BugLink: http://bugs.launchpad.net/bugs/1925057 +Suggested-by: Kailang Yang +Cc: +Signed-off-by: Hui Wang +Link: https://lore.kernel.org/r/20210507024452.8300-1-hui.wang@canonical.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -341,7 +341,6 @@ static void alc_fill_eapd_coef(struct hd + case 0x10ec0282: + case 0x10ec0283: + case 0x10ec0286: +- case 0x10ec0287: + case 0x10ec0288: + case 0x10ec0285: + case 0x10ec0298: +@@ -352,6 +351,10 @@ static void alc_fill_eapd_coef(struct hd + case 0x10ec0275: + alc_update_coef_idx(codec, 0xe, 0, 1<<0); + break; ++ case 0x10ec0287: ++ alc_update_coef_idx(codec, 0x10, 1<<9, 0); ++ alc_write_coef_idx(codec, 0x8, 0x4ab7); ++ break; + case 0x10ec0293: + alc_update_coef_idx(codec, 0xa, 1<<13, 0); + break; diff --git a/queue-4.14/alsa-usb-audio-validate-ms-endpoint-descriptors.patch b/queue-4.14/alsa-usb-audio-validate-ms-endpoint-descriptors.patch new file mode 100644 index 00000000000..63c291761f7 --- /dev/null +++ b/queue-4.14/alsa-usb-audio-validate-ms-endpoint-descriptors.patch @@ -0,0 +1,37 @@ +From e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 10 May 2021 17:06:59 +0200 +Subject: ALSA: usb-audio: Validate MS endpoint descriptors + +From: Takashi Iwai + +commit e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 upstream. + +snd_usbmidi_get_ms_info() may access beyond the border when a +malformed descriptor is passed. This patch adds the sanity checks of +the given MS endpoint descriptors, and skips invalid ones. + +Reported-by: syzbot+6bb23a5d5548b93c94aa@syzkaller.appspotmail.com +Cc: +Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/midi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/sound/usb/midi.c ++++ b/sound/usb/midi.c +@@ -1867,8 +1867,12 @@ static int snd_usbmidi_get_ms_info(struc + ms_ep = find_usb_ms_endpoint_descriptor(hostep); + if (!ms_ep) + continue; ++ if (ms_ep->bLength <= sizeof(*ms_ep)) ++ continue; + if (ms_ep->bNumEmbMIDIJack > 0x10) + continue; ++ if (ms_ep->bLength < sizeof(*ms_ep) + ms_ep->bNumEmbMIDIJack) ++ continue; + if (usb_endpoint_dir_out(ep)) { + if (endpoints[epidx].out_ep) { + if (++epidx >= MIDI_MAX_ENDPOINTS) { diff --git a/queue-4.14/revert-alsa-sb8-add-a-check-for-request_region.patch b/queue-4.14/revert-alsa-sb8-add-a-check-for-request_region.patch new file mode 100644 index 00000000000..c3d0f0d346e --- /dev/null +++ b/queue-4.14/revert-alsa-sb8-add-a-check-for-request_region.patch @@ -0,0 +1,47 @@ +From 94f88309f201821073f57ae6005caefa61bf7b7e Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Mon, 3 May 2021 13:57:01 +0200 +Subject: Revert "ALSA: sb8: add a check for request_region" + +From: Greg Kroah-Hartman + +commit 94f88309f201821073f57ae6005caefa61bf7b7e upstream. + +This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919. + +Because of recent interactions with developers from @umn.edu, all +commits from them have been recently re-reviewed to ensure if they were +correct or not. + +Upon review, this commit was found to be incorrect for the reasons +below, so it must be reverted. It will be fixed up "correctly" in a +later kernel change. + +The original commit message for this change was incorrect as the code +path can never result in a NULL dereference, alluding to the fact that +whatever tool was used to "find this" is broken. It's just an optional +resource reservation, so removing this check is fine. + +Cc: Kangjie Lu +Acked-by: Takashi Iwai +Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region") +Cc: stable +Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org +Signed-off-by: Greg Kroah-Hartman +--- + sound/isa/sb/sb8.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/sound/isa/sb/sb8.c ++++ b/sound/isa/sb/sb8.c +@@ -111,10 +111,6 @@ static int snd_sb8_probe(struct device * + + /* block the 0x388 port to avoid PnP conflicts */ + acard->fm_res = request_region(0x388, 4, "SoundBlaster FM"); +- if (!acard->fm_res) { +- err = -EBUSY; +- goto _err; +- } + + if (port[dev] != SNDRV_AUTO_PORT) { + if ((err = snd_sbdsp_create(card, port[dev], irq[dev], diff --git a/queue-4.14/series b/queue-4.14/series index a8c8e98d44d..d0f6501f6e7 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -4,3 +4,7 @@ scsi-qla2xxx-fix-error-return-code-in-qla82xx_write_.patch ptrace-make-ptrace-fail-if-the-tracee-changed-its-pi.patch cifs-fix-memory-leak-in-smb2_copychunk_range.patch alsa-line6-fix-racy-initialization-of-line6-midi.patch +alsa-usb-audio-validate-ms-endpoint-descriptors.patch +alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch +revert-alsa-sb8-add-a-check-for-request_region.patch +alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch