From: Greg Kroah-Hartman Date: Mon, 24 May 2021 09:33:01 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.4.270~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=090fd751150c2d21a68046d13baa19374271b9ea;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.patch alsa-hda-realtek-add-some-clove-ssids-of-alc293.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.19/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch b/queue-4.19/alsa-bebob-oxfw-fix-kconfig-entry-for-mackie-d.2-pro.patch new file mode 100644 index 00000000000..87e79fa407c --- /dev/null +++ b/queue-4.19/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 +@@ -400,7 +400,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.19/alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.patch b/queue-4.19/alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.patch new file mode 100644 index 00000000000..119af0d4027 --- /dev/null +++ b/queue-4.19/alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.patch @@ -0,0 +1,39 @@ +From 1b6604896e78969baffc1b6cc6bc175f95929ac4 Mon Sep 17 00:00:00 2001 +From: Takashi Sakamoto +Date: Thu, 13 May 2021 21:56:48 +0900 +Subject: ALSA: dice: fix stream format at middle sampling rate for Alesis iO 26 + +From: Takashi Sakamoto + +commit 1b6604896e78969baffc1b6cc6bc175f95929ac4 upstream. + +Alesis iO 26 FireWire has two pairs of digital optical interface. It +delivers PCM frames from the interfaces by second isochronous packet +streaming. Although both of the interfaces are available at 44.1/48.0 +kHz, first one of them is only available at 88.2/96.0 kHz. It reduces +the number of PCM samples to 4 in Multi Bit Linear Audio data channel +of data blocks on the second isochronous packet streaming. + +This commit fixes hardcoded stream formats. + +Cc: +Fixes: 28b208f600a3 ("ALSA: dice: add parameters of stream formats for models produced by Alesis") +Signed-off-by: Takashi Sakamoto +Link: https://lore.kernel.org/r/20210513125652.110249-2-o-takashi@sakamocchi.jp +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/firewire/dice/dice-alesis.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/firewire/dice/dice-alesis.c ++++ b/sound/firewire/dice/dice-alesis.c +@@ -16,7 +16,7 @@ alesis_io14_tx_pcm_chs[MAX_STREAMS][SND_ + static const unsigned int + alesis_io26_tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT] = { + {10, 10, 4}, /* Tx0 = Analog + S/PDIF. */ +- {16, 8, 0}, /* Tx1 = ADAT1 + ADAT2. */ ++ {16, 4, 0}, /* Tx1 = ADAT1 + ADAT2 (available at low rate). */ + }; + + int snd_dice_detect_alesis_formats(struct snd_dice *dice) diff --git a/queue-4.19/alsa-hda-realtek-add-some-clove-ssids-of-alc293.patch b/queue-4.19/alsa-hda-realtek-add-some-clove-ssids-of-alc293.patch new file mode 100644 index 00000000000..a5f584c24f9 --- /dev/null +++ b/queue-4.19/alsa-hda-realtek-add-some-clove-ssids-of-alc293.patch @@ -0,0 +1,60 @@ +From 1d5cfca286178ce81fb0c8a5f5777ef123cd69e4 Mon Sep 17 00:00:00 2001 +From: PeiSen Hou +Date: Fri, 14 May 2021 12:50:48 +0200 +Subject: ALSA: hda/realtek: Add some CLOVE SSIDs of ALC293 + +From: PeiSen Hou + +commit 1d5cfca286178ce81fb0c8a5f5777ef123cd69e4 upstream. + +Fix "use as headset mic, without its own jack detect" problen. + +Signed-off-by: PeiSen Hou +Cc: +Link: https://lore.kernel.org/r/d0746eaf29f248a5acc30313e3ba4f99@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -7169,12 +7169,19 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), +@@ -7192,9 +7199,17 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL5XNU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), ++ SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), + SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), diff --git a/queue-4.19/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch b/queue-4.19/alsa-hda-realtek-reset-eapd-coeff-to-default-value-for-alc287.patch new file mode 100644 index 00000000000..7028d30ba03 --- /dev/null +++ b/queue-4.19/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 +@@ -388,7 +388,6 @@ static void alc_fill_eapd_coef(struct hd + case 0x10ec0282: + case 0x10ec0283: + case 0x10ec0286: +- case 0x10ec0287: + case 0x10ec0288: + case 0x10ec0285: + case 0x10ec0298: +@@ -399,6 +398,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.19/alsa-usb-audio-validate-ms-endpoint-descriptors.patch b/queue-4.19/alsa-usb-audio-validate-ms-endpoint-descriptors.patch new file mode 100644 index 00000000000..c9a7e5bb677 --- /dev/null +++ b/queue-4.19/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 +@@ -1890,8 +1890,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.19/revert-alsa-sb8-add-a-check-for-request_region.patch b/queue-4.19/revert-alsa-sb8-add-a-check-for-request_region.patch new file mode 100644 index 00000000000..c3d0f0d346e --- /dev/null +++ b/queue-4.19/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.19/series b/queue-4.19/series index 0ecea78ce9d..d40186a1e86 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -10,3 +10,9 @@ locking-mutex-clear-mutex_flags-if-wait_list-is-empt.patch cifs-fix-memory-leak-in-smb2_copychunk_range.patch alsa-dice-fix-stream-format-for-tc-electronic-konnekt-live-at-high-sampling-transfer-frequency.patch alsa-line6-fix-racy-initialization-of-line6-midi.patch +alsa-dice-fix-stream-format-at-middle-sampling-rate-for-alesis-io-26.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 +alsa-hda-realtek-add-some-clove-ssids-of-alc293.patch