From: Greg Kroah-Hartman Date: Sat, 3 Apr 2021 08:30:23 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.4.265~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45d19c159dbb77c669a7b1908f8f25a7c996aae2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-hda-realtek-call-alc_update_headset_mode-in-hp_automute_hook.patch alsa-usb-audio-apply-sample-rate-quirk-to-logitech-connect.patch tracing-fix-stack-trace-event-size.patch --- diff --git a/queue-4.4/alsa-hda-realtek-call-alc_update_headset_mode-in-hp_automute_hook.patch b/queue-4.4/alsa-hda-realtek-call-alc_update_headset_mode-in-hp_automute_hook.patch new file mode 100644 index 00000000000..535e940f7a0 --- /dev/null +++ b/queue-4.4/alsa-hda-realtek-call-alc_update_headset_mode-in-hp_automute_hook.patch @@ -0,0 +1,46 @@ +From e54f30befa7990b897189b44a56c1138c6bfdbb5 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Sat, 20 Mar 2021 17:15:42 +0800 +Subject: ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook + +From: Hui Wang + +commit e54f30befa7990b897189b44a56c1138c6bfdbb5 upstream. + +We found the alc_update_headset_mode() is not called on some machines +when unplugging the headset, as a result, the mode of the +ALC_HEADSET_MODE_UNPLUGGED can't be set, then the current_headset_type +is not cleared, if users plug a differnt type of headset next time, +the determine_headset_type() will not be called and the audio jack is +set to the headset type of previous time. + +On the Dell machines which connect the dmic to the PCH, if we open +the gnome-sound-setting and unplug the headset, this issue will +happen. Those machines disable the auto-mute by ucm and has no +internal mic in the input source, so the update_headset_mode() will +not be called by cap_sync_hook or automute_hook when unplugging, and +because the gnome-sound-setting is opened, the codec will not enter +the runtime_suspend state, so the update_headset_mode() will not be +called by alc_resume when unplugging. In this case the +hp_automute_hook is called when unplugging, so add +update_headset_mode() calling to this function. + +Cc: +Signed-off-by: Hui Wang +Link: https://lore.kernel.org/r/20210320091542.6748-2-hui.wang@canonical.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4294,6 +4294,7 @@ static void alc_update_headset_jack_cb(s + struct alc_spec *spec = codec->spec; + spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN; + snd_hda_gen_hp_automute(codec, jack); ++ alc_update_headset_mode(codec); + } + + static void alc_probe_headset_mode(struct hda_codec *codec) diff --git a/queue-4.4/alsa-usb-audio-apply-sample-rate-quirk-to-logitech-connect.patch b/queue-4.4/alsa-usb-audio-apply-sample-rate-quirk-to-logitech-connect.patch new file mode 100644 index 00000000000..7a051d70f5e --- /dev/null +++ b/queue-4.4/alsa-usb-audio-apply-sample-rate-quirk-to-logitech-connect.patch @@ -0,0 +1,35 @@ +From 625bd5a616ceda4840cd28f82e957c8ced394b6a Mon Sep 17 00:00:00 2001 +From: Ikjoon Jang +Date: Wed, 24 Mar 2021 18:51:52 +0800 +Subject: ALSA: usb-audio: Apply sample rate quirk to Logitech Connect + +From: Ikjoon Jang + +commit 625bd5a616ceda4840cd28f82e957c8ced394b6a upstream. + +Logitech ConferenceCam Connect is a compound USB device with UVC and +UAC. Not 100% reproducible but sometimes it keeps responding STALL to +every control transfer once it receives get_freq request. + +This patch adds 046d:0x084c to a snd_usb_get_sample_rate_quirk list. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203419 +Signed-off-by: Ikjoon Jang +Cc: +Link: https://lore.kernel.org/r/20210324105153.2322881-1-ikjn@chromium.org +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1155,6 +1155,7 @@ bool snd_usb_get_sample_rate_quirk(struc + case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */ + case USB_ID(0x2912, 0x30c8): /* Audioengine D1 */ + case USB_ID(0x413c, 0xa506): /* Dell AE515 sound bar */ ++ case USB_ID(0x046d, 0x084c): /* Logitech ConferenceCam Connect */ + return true; + } + return false; diff --git a/queue-4.4/series b/queue-4.4/series index 3a4e4539ead..da32bef98dc 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -12,3 +12,6 @@ staging-comedi-cb_pcidas64-fix-request_irq-warn.patch ext4-do-not-iput-inode-under-running-transaction-in-.patch appletalk-fix-skb-allocation-size-in-loopback-case.patch net-wan-lmc-unregister-device-when-no-matching-devic.patch +alsa-usb-audio-apply-sample-rate-quirk-to-logitech-connect.patch +alsa-hda-realtek-call-alc_update_headset_mode-in-hp_automute_hook.patch +tracing-fix-stack-trace-event-size.patch diff --git a/queue-4.4/tracing-fix-stack-trace-event-size.patch b/queue-4.4/tracing-fix-stack-trace-event-size.patch new file mode 100644 index 00000000000..a5734d2528a --- /dev/null +++ b/queue-4.4/tracing-fix-stack-trace-event-size.patch @@ -0,0 +1,74 @@ +From 9deb193af69d3fd6dd8e47f292b67c805a787010 Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (VMware)" +Date: Thu, 1 Apr 2021 13:54:40 -0400 +Subject: tracing: Fix stack trace event size + +From: Steven Rostedt (VMware) + +commit 9deb193af69d3fd6dd8e47f292b67c805a787010 upstream. + +Commit cbc3b92ce037 fixed an issue to modify the macros of the stack trace +event so that user space could parse it properly. Originally the stack +trace format to user space showed that the called stack was a dynamic +array. But it is not actually a dynamic array, in the way that other +dynamic event arrays worked, and this broke user space parsing for it. The +update was to make the array look to have 8 entries in it. Helper +functions were added to make it parse it correctly, as the stack was +dynamic, but was determined by the size of the event stored. + +Although this fixed user space on how it read the event, it changed the +internal structure used for the stack trace event. It changed the array +size from [0] to [8] (added 8 entries). This increased the size of the +stack trace event by 8 words. The size reserved on the ring buffer was the +size of the stack trace event plus the number of stack entries found in +the stack trace. That commit caused the amount to be 8 more than what was +needed because it did not expect the caller field to have any size. This +produced 8 entries of garbage (and reading random data) from the stack +trace event: + + -0 [002] d... 1976396.837549: + => trace_event_raw_event_sched_switch + => __traceiter_sched_switch + => __schedule + => schedule_idle + => do_idle + => cpu_startup_entry + => secondary_startup_64_no_verify + => 0xc8c5e150ffff93de + => 0xffff93de + => 0 + => 0 + => 0xc8c5e17800000000 + => 0x1f30affff93de + => 0x00000004 + => 0x200000000 + +Instead, subtract the size of the caller field from the size of the event +to make sure that only the amount needed to store the stack trace is +reserved. + +Link: https://lore.kernel.org/lkml/your-ad-here.call-01617191565-ext-9692@work.hours/ + +Cc: stable@vger.kernel.org +Fixes: cbc3b92ce037 ("tracing: Set kernel_stack's caller size properly") +Reported-by: Vasily Gorbik +Tested-by: Vasily Gorbik +Acked-by: Vasily Gorbik +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman +--- + kernel/trace/trace.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/trace/trace.c ++++ b/kernel/trace/trace.c +@@ -1867,7 +1867,8 @@ static void __ftrace_trace_stack(struct + size *= sizeof(unsigned long); + + event = trace_buffer_lock_reserve(buffer, TRACE_STACK, +- sizeof(*entry) + size, flags, pc); ++ (sizeof(*entry) - sizeof(entry->caller)) + size, ++ flags, pc); + if (!event) + goto out; + entry = ring_buffer_event_data(event);