From patchwork Thu Aug 27 17:33:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 11741175 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A39813B1 for ; Thu, 27 Aug 2020 17:35:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6280E20791 for ; Thu, 27 Aug 2020 17:35:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ob/Pz43K"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="XvcyLiX4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6280E20791 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E9EE01801; Thu, 27 Aug 2020 19:34:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E9EE01801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1598549712; bh=sSHh0SalXuG7BXFUVBcY5L/8Wsw6PQQfZ7l8uajXaMg=; h=From:To:Subject:Date:References:Cc:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=Ob/Pz43Kifn/qWtFgiMQtFqQsDN8iy67GCeuujiLbH8R4N4z06sxdwjuFK9/W79E2 pPZxChuGtY8hK+0j4sA4QP+BFdWVxp/cDpsOm7SiA8YyOFZH7QAy9Sf7cMH3i1J62w dpJG2HNgs2vL6LILXDOETcZ49y7ZMVvMcdxnhCxw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 53E91F80143; Thu, 27 Aug 2020 19:34:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F3B8F8016F; Thu, 27 Aug 2020 19:34:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CAC54F80105 for ; Thu, 27 Aug 2020 19:34:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CAC54F80105 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="XvcyLiX4" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200827173412euoutp01a8968e3e0cb91a6c6237c97d8adf7eb7~vMHBqYWKV0438704387euoutp01B for ; Thu, 27 Aug 2020 17:34:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200827173412euoutp01a8968e3e0cb91a6c6237c97d8adf7eb7~vMHBqYWKV0438704387euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1598549652; bh=FG4lWC3OyYSTOLqHoWMOSEZ22uCxKHsr9ai6/RI9xsA=; h=From:To:Cc:Subject:Date:References:From; b=XvcyLiX4GVkJkxO+lCRDFklWIHp4//bHe9ytEqj4F/nqdfrB6sHoLWDB9sgKHia2V quSa2dCsE6qExuihCpL6ekF5ib58G3+x3nl/6+8Kx33yUgJ/4a5TJ5KZ82OiJMRTOC jTwbh0smewhFFftvJeHpGor79p7q2U9PfLYECdpE= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200827173411eucas1p29395f8de00aeb99cfa455d2567f3f3be~vMHBPD3lW0522405224eucas1p2M; Thu, 27 Aug 2020 17:34:11 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 4F.B8.05997.39EE74F5; Thu, 27 Aug 2020 18:34:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200827173411eucas1p1283200677c5e077c5e07af938934eb5d~vMHA0w_EJ2355723557eucas1p1C; Thu, 27 Aug 2020 17:34:11 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200827173411eusmtrp2e006860f94534a2855b95257a53d0a71~vMHA0IHnN2777327773eusmtrp26; Thu, 27 Aug 2020 17:34:11 +0000 (GMT) X-AuditID: cbfec7f4-677ff7000000176d-58-5f47ee933c6a Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 25.C6.06314.39EE74F5; Thu, 27 Aug 2020 18:34:11 +0100 (BST) Received: from AMDC3061.digital.local (unknown [106.120.51.75]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200827173410eusmtip181f6027bcab211c6c172b88b90a66242~vMHATrp0z0123701237eusmtip1a; Thu, 27 Aug 2020 17:34:10 +0000 (GMT) From: Sylwester Nawrocki To: broonie@kernel.org, lgirdwood@gmail.com Subject: [PATCH 1/2] ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811 Date: Thu, 27 Aug 2020 19:33:56 +0200 Message-Id: <20200827173357.31891-1-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42LZduzned3J79zjDW53K1pcuXiIyWLjjPWs FlMfPmGzuNK6idHi/PkN7BbfrnQwWVzeNYfNYu2Ru+wWn9/vZ7U4/Kad1YHLY8PnJjaPnbPu sntsWtXJ5jF9zn9Gj74tqxg9Pm+SC2CL4rJJSc3JLEst0rdL4MrovvGVtWAbf8XcFwsZGxi/ 8nQxcnJICJhIrDo+i7GLkYtDSGAFo8TjltdMEM4XRonFf3axQjifGSVmXXzMBtOy9PZDqKrl jBJ7Oq6DJcBatp9KBLHZBAwleo/2MYLYIgLaEnNudrCBNDALdDJJnJx8lR0kISwQLXF9zlmg FRwcLAKqEs9/gPXyClhLLHh9G2qZvMTqDQeYQXolBH6zSVycMIMZpF5CwEXiWgMTRI2wxKvj W9ghbBmJ/zvnM0HUNzNK9Oy+zQ7hTGCUuH98ASNElbXEnXO/2EAGMQtoSqzfpQ8x01GiY2sx hMknceOtIEgxM5A5adt0qK28Eh1tQhAzVCR+r5oOdYGURPeT/ywQtofE4/cTGSEhEisx7c1C 9gmMcrMQVi1gZFzFKJ5aWpybnlpslJdarlecmFtcmpeul5yfu4kRmDBO/zv+ZQfjrj9JhxgF OBiVeHh37HOPF2JNLCuuzD3EKMHBrCTC63T2dJwQb0piZVVqUX58UWlOavEhRmkOFiVxXuNF L2OFBNITS1KzU1M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-CMS-MailID: 20200827173411eucas1p1283200677c5e077c5e07af938934eb5d X-Msg-Generator: CA X-RootMTR: 20200827173411eucas1p1283200677c5e077c5e07af938934eb5d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200827173411eucas1p1283200677c5e077c5e07af938934eb5d References: Cc: alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com, b.zolnierkie@samsung.com, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , m.szyprowski@samsung.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The WM8994_MICBIAS register is not available in the WM1811 CODEC so skip initialization of that register for that device. This suppresses an error during boot: "wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec" Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- sound/soc/codecs/wm8994.c | 2 ++ sound/soc/codecs/wm_hubs.c | 3 +++ sound/soc/codecs/wm_hubs.h | 1 + 3 files changed, 6 insertions(+) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 038be66..b3ba053 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4193,11 +4193,13 @@ static int wm8994_component_probe(struct snd_soc_component *component) wm8994->hubs.dcs_readback_mode = 2; break; } + wm8994->hubs.micd_scthr = true; break; case WM8958: wm8994->hubs.dcs_readback_mode = 1; wm8994->hubs.hp_startup_mode = 1; + wm8994->hubs.micd_scthr = true; switch (control->revision) { case 0: diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 891effe..0c88184 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c @@ -1223,6 +1223,9 @@ int wm_hubs_handle_analogue_pdata(struct snd_soc_component *component, snd_soc_component_update_bits(component, WM8993_ADDITIONAL_CONTROL, WM8993_LINEOUT2_FB, WM8993_LINEOUT2_FB); + if (!hubs->micd_scthr) + return 0; + snd_soc_component_update_bits(component, WM8993_MICBIAS, WM8993_JD_SCTHR_MASK | WM8993_JD_THR_MASK | WM8993_MICB1_LVL | WM8993_MICB2_LVL, diff --git a/sound/soc/codecs/wm_hubs.h b/sound/soc/codecs/wm_hubs.h index 4b8e5f0..988b29e 100644 --- a/sound/soc/codecs/wm_hubs.h +++ b/sound/soc/codecs/wm_hubs.h @@ -27,6 +27,7 @@ struct wm_hubs_data { int hp_startup_mode; int series_startup; int no_series_update; + bool micd_scthr; bool no_cache_dac_hp_direct; struct list_head dcs_cache; From patchwork Thu Aug 27 17:33:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 11741177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10FC0109B for ; Thu, 27 Aug 2020 17:36:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95F1F2087E for ; Thu, 27 Aug 2020 17:36:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mZdklpXQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="PxYfTVtr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95F1F2087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D84091828; Thu, 27 Aug 2020 19:35:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D84091828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1598549764; bh=hXDyegF3OBnlvyi3lCWTfrDRSxC4lYOaCNgAQSkWQ94=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mZdklpXQWNU5tWGSVMkx6LHEhuBQz4kMaol+7W3xGcQOZm7ojYdMyGPIEdMM7/Dvk dHq2zgLXSnSgTEUyqV3IULVqPtXp5uBr+9Q9OmGW5aE7NTb/Bg5HMvWm5PtIqR1dv/ 2ItyAZ7fdN/T9DZNE5ymjyohkajEkiMnD8GOYuHY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D0370F80245; Thu, 27 Aug 2020 19:34:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E4F53F8025A; Thu, 27 Aug 2020 19:34:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87F12F801D9 for ; Thu, 27 Aug 2020 19:34:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87F12F801D9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="PxYfTVtr" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200827173428euoutp02b68a01fb9325d69e34d7bb31004f1894~vMHQdbV9y2598725987euoutp02i for ; Thu, 27 Aug 2020 17:34:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200827173428euoutp02b68a01fb9325d69e34d7bb31004f1894~vMHQdbV9y2598725987euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1598549668; bh=wFMLyUMElLYUTG35lzNQlKN/voBWwST2pPYptKilXs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PxYfTVtrZyGO4DwmsGdluocOPuXdlG5cEJQPcsIrhxgeFBTf1FXNJCOpUB2s1kH66 GzpZrBfQMiYDGYGeOmvRZuYLgAdPacHSy8MGIrLLO5iM0gsbFu3OpPjO5Mchnf4NJY MnB58OJo1oRht5aut9FshSIJbAPa4LuZ+NCZ+xHk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200827173427eucas1p1aabdd7d6624406b2d54e10b9b1cc4770~vMHQQlTUM2355023550eucas1p1T; Thu, 27 Aug 2020 17:34:27 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 41.1C.06456.3AEE74F5; Thu, 27 Aug 2020 18:34:27 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200827173426eucas1p13f9f7d358dfcc440db160de3dc658ddf~vMHPbXoEN2355723557eucas1p1M; Thu, 27 Aug 2020 17:34:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200827173426eusmtrp1fd6176141ac3bed27fc1e0a9130388dd~vMHPavXXn1826418264eusmtrp1P; Thu, 27 Aug 2020 17:34:26 +0000 (GMT) X-AuditID: cbfec7f2-7efff70000001938-dd-5f47eea36d06 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 58.C6.06314.2AEE74F5; Thu, 27 Aug 2020 18:34:26 +0100 (BST) Received: from AMDC3061.digital.local (unknown [106.120.51.75]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200827173426eusmtip112b67de1ca4586f3308c4e8bca11ebd5~vMHO7gs0W0514105141eusmtip1O; Thu, 27 Aug 2020 17:34:26 +0000 (GMT) From: Sylwester Nawrocki To: broonie@kernel.org, lgirdwood@gmail.com Subject: [PATCH 2/2] ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions Date: Thu, 27 Aug 2020 19:33:57 +0200 Message-Id: <20200827173357.31891-2-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200827173357.31891-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduzned3F79zjDT5f07W4cvEQk8XGGetZ LaY+fMJmcaV1E6PF+fMb2C2+Xelgsri8aw6bxdojd9ktPr/fz2px+E07qwOXx4bPTWweO2fd ZffYtKqTzWP6nP+MHn1bVjF6fN4kF8AWxWWTkpqTWZZapG+XwJXx8QpnwVS+iv2rGhgbGF9w dzFycEgImEg8vVTSxcjFISSwglGi9ctTti5GTiDnC6PExLkJ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9jCC2iICuxK2l x5hBipgFJjJJbHp4nQkkISwQJ/H12CewBhYBVYlrMy6DNfAKWEt8/nSUDWKDvMTqDQeYQRZz CthINP9KAAkLAZVceniedQIj3wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5mxiBgb3t2M/N OxgvbQw+xCjAwajEw7tjn3u8EGtiWXFl7iFGCQ5mJRFep7On44R4UxIrq1KL8uOLSnNSiw8x mgLdNJFZSjQ5Hxh1eSXxhqaG5haWhubG5sZmFkrivB0CB2OEBNITS1KzU1MLUotg+pg4OKUa GPN0/i7sZbrjYR/2aomZ546ipP64M4evBsTdZso4+GzB0sCq27LGxWK8eqw6Wv82BnJY379h 6L/DaPVX219T1szulU4SLO1jj38ZGOtgf+BoXE++tffEbgWduylrS0sT2N28V86PXxpZIm/M NW3vZZZe4ZN/mzOXSkr/agwTUjQq7pMxDkpVYinOSDTUYi4qTgQAW1DUhoICAAA= X-CMS-MailID: 20200827173426eucas1p13f9f7d358dfcc440db160de3dc658ddf X-Msg-Generator: CA X-RootMTR: 20200827173426eucas1p13f9f7d358dfcc440db160de3dc658ddf X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200827173426eucas1p13f9f7d358dfcc440db160de3dc658ddf References: <20200827173357.31891-1-s.nawrocki@samsung.com> Cc: alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com, b.zolnierkie@samsung.com, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , m.szyprowski@samsung.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" When the wm8958_mic_detect, wm8994_mic_detect functions get called from the machine driver, e.g. from the card's late_probe() callback, the CODEC device may be PM runtime suspended and any regmap writes have no effect. Add PM runtime calls to these functions to ensure the device registers are updated as expected. This suppresses an error during boot "wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec" caused by the regmap access error due to the cache_only flag being set. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- sound/soc/codecs/wm8994.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index b3ba053..fc9ea19 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3514,6 +3514,8 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack * return -EINVAL; } + pm_runtime_get_sync(component->dev); + switch (micbias) { case 1: micdet = &wm8994->micdet[0]; @@ -3561,6 +3563,8 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack * snd_soc_dapm_sync(dapm); + pm_runtime_put(component->dev); + return 0; } EXPORT_SYMBOL_GPL(wm8994_mic_detect); @@ -3932,6 +3936,8 @@ int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack * return -EINVAL; } + pm_runtime_get_sync(component->dev); + if (jack) { snd_soc_dapm_force_enable_pin(dapm, "CLK_SYS"); snd_soc_dapm_sync(dapm); @@ -4000,6 +4006,8 @@ int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack * snd_soc_dapm_sync(dapm); } + pm_runtime_put(component->dev); + return 0; } EXPORT_SYMBOL_GPL(wm8958_mic_detect);