From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DFA8C2D0C0 for ; Mon, 23 Dec 2019 17:18:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2D3820715 for ; Mon, 23 Dec 2019 17:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577121521; bh=7hbrwSYizLbrmRfg3lqO9IcnILFqyNtB76qENb1VVF8=; h=Subject:To:Cc:From:Date:List-ID:From; b=MGFT62Rj/BeagK1Sc+eEnniAGDG/8+J8dU3cfdVO/ZeUpqI/fbOHr5SzYHNv+82H4 SrbX/Il5k+ZOUxNdMVX+PVWt6Hb+eJhpWdG2zXy0eBFlXO4JU5tjDs4QY2P0bW5lH8 E4xyWiKQyAdWiyZoEqY5W1AvJD8zQd7XJSHPYSrQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726821AbfLWRSk (ORCPT ); Mon, 23 Dec 2019 12:18:40 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49899 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbfLWRSk (ORCPT ); Mon, 23 Dec 2019 12:18:40 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DEEC3217FC; Mon, 23 Dec 2019 12:18:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 23 Dec 2019 12:18:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ywkn83 Z+d+zWyf06A6qqRWIx0eJfafyXZ1DgQij95vM=; b=HI6I6js4MkaYvpOgGvnoTJ eBT1LIzHd7nsZLi+nivrdLiuK7AK/GFOJLzH2qLRhrpMO0RMn5APQVoftcgBMH5G jbWrR3UQOto+ItN9xsgIJ4AbDK45qucMrEnRfDjmIyE2UaHO83MDzrf6iOaCSY+a cjSGS1aim0c0CDtiQKcEMuZMQK/MFgr6q0XaPtIUJeo8l7CsBTrtgxYVs0ST+M13 UirWEUXt/ZWXTQ9oIGxg1X3bdSrpsZAbW+Y+M1yXeY9GcihnFvWoMFJ6WwD0APsL HXVqn+wAOfwUyek7X6TohC060UpeTjLtaTXS9ZosbJF/zMd2DVMsnqESAtwmNSTg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddvtddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepudelkedrkeelrdeige drvdegleenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrdgtohhm necuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from localhost (unknown [198.89.64.249]) by mail.messagingengine.com (Postfix) with ESMTPA id A191A30609A0; Mon, 23 Dec 2019 12:18:39 -0500 (EST) Subject: FAILED: patch "[PATCH] ALSA: hda/ca0132 - Fix work handling in delayed HP detection" failed to apply to 4.9-stable tree To: tiwai@suse.de, stable@vger.kernel.org Cc: From: Date: Mon, 23 Dec 2019 12:18:28 -0500 Message-ID: <157712150812785@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 42fb6b1d41eb5905d77c06cad2e87b70289bdb76 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 Dec 2019 09:51:11 +0100 Subject: [PATCH] ALSA: hda/ca0132 - Fix work handling in delayed HP detection CA0132 has the delayed HP jack detection code that is invoked from the unsol handler, but it does a few weird things: it contains the cancel of a work inside the work handler, and yet it misses the cancel-sync call at (runtime-)suspend. This patch addresses those issues. Fixes: 15c2b3cc09a3 ("ALSA: hda/ca0132 - Fix possible workqueue stall") Cc: Link: https://lore.kernel.org/r/20191213085111.22855-4-tiwai@suse.de Signed-off-by: Takashi Iwai diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 8d0209fff8f5..32ed46464af7 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -7607,11 +7607,10 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) /* Delay enabling the HP amp, to let the mic-detection * state machine run. */ - cancel_delayed_work(&spec->unsol_hp_work); - schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500)); tbl = snd_hda_jack_tbl_get(codec, cb->nid); if (tbl) tbl->block_report = 1; + schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500)); } static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb) @@ -8457,12 +8456,25 @@ static void ca0132_reboot_notify(struct hda_codec *codec) codec->patch_ops.free(codec); } +#ifdef CONFIG_PM +static int ca0132_suspend(struct hda_codec *codec) +{ + struct ca0132_spec *spec = codec->spec; + + cancel_delayed_work_sync(&spec->unsol_hp_work); + return 0; +} +#endif + static const struct hda_codec_ops ca0132_patch_ops = { .build_controls = ca0132_build_controls, .build_pcms = ca0132_build_pcms, .init = ca0132_init, .free = ca0132_free, .unsol_event = snd_hda_jack_unsol_event, +#ifdef CONFIG_PM + .suspend = ca0132_suspend, +#endif .reboot_notify = ca0132_reboot_notify, };