Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp809957rdb; Fri, 6 Oct 2023 23:25:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEizLOjzPDV2fnfKQEgAv6S1S8DifhK6GxlUxymPPrVXJE0tOltwLiBOqIVurXPhKihKiOO X-Received: by 2002:a05:6358:8809:b0:143:9425:e2b6 with SMTP id hv9-20020a056358880900b001439425e2b6mr10782918rwb.2.1696659937317; Fri, 06 Oct 2023 23:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696659937; cv=none; d=google.com; s=arc-20160816; b=pc2E/+Fl61sKz6LGFPmV0kFLwAe/hV2aqK1eJ8ykznsCTzLcqWvmpDIhgzmYaCW8y/ bC/7ff3/tc2loHuAXC83UxkpajuiKErO3c8f7U/iyq4JsjLPzey2ashRjfqmBqtyu3Af KTdgo5awAzzka1b5ZixaV2gKkzzPHAapEZHvZvzKW9Xt+KbNDQCPLcicLLdN4TeeG260 r14megOvU/Vh75J1zEZvMBzkyL5K3+xhupxzianEw9H/McBWjr0JbWYV1mFlmkKJfD0w bMSng5aXfGybLN3kt2HmGfxVAUywYUABzNpeKIB1rqJ3zhtYGC4ny6EJ787rkt7HruzW r+kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ACLW61emleu45Tjx3YfDFv2KwkJqTD/kT9czMbGVVKA=; fh=uGbNZByVkAkI5tHuSlcf2KReGnx4r3+VgxlYia4gc+k=; b=EaOc6yHYxCk/SduVqr65XBh/9ilrEEIMp0/fj+jzVw5JSAJjaOuZRJ6qTruEncrj4S +HI+a0UPDppEVy1XevfdBaFr0m3kVJjrL7Xu8sBzeX2cippRAT2Ivr03zV0rlVvJfQ2k wvqJmXRFt6MuuOEClvIM5U2nL/aTzz78U/SVHzFWp6uHMWXU+W76VBFS8e184ix/G6om dNCfO/wFLxjQs+rgcdZXd+6K1lv2MfQeBfi8pfzMALG28YylwBd/2ZkQJepWw3IYn/SC e7YaQx63MnwJPonvyvjc16jetkZtWS4U+/Ec+aHjhFL7Yn8RU3Ozposn8ZTJkuPCCBSu 8YSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id i10-20020a17090acf8a00b00279020d1fb0si5107865pju.129.2023.10.06.23.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 23:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 40D6A8356469; Fri, 6 Oct 2023 23:25:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343578AbjJGGZW (ORCPT + 99 others); Sat, 7 Oct 2023 02:25:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343532AbjJGGZV (ORCPT ); Sat, 7 Oct 2023 02:25:21 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3BBDDBF; Fri, 6 Oct 2023 23:25:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 7E0F980E0; Sat, 7 Oct 2023 06:25:19 +0000 (UTC) Date: Sat, 7 Oct 2023 09:25:18 +0300 From: Tony Lindgren To: Andreas Kemnade Cc: =?utf-8?B?UMOpdGVy?= Ujfalusi , bcousson@baylibre.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, jarkko.nikula@bitmer.com, dmitry.torokhov@gmail.com, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 1/3] ASoC: ti: omap-mcbsp: Ignore errors for getting fck_src Message-ID: <20231007062518.GM34982@atomide.com> References: <20230705190324.355282-1-andreas@kemnade.info> <20230705190324.355282-2-andreas@kemnade.info> <7d58d52d-2087-45af-b29e-2515b63ead13@gmail.com> <20230920063353.GQ5285@atomide.com> <20230921121626.GT5285@atomide.com> <20231006102348.GK34982@atomide.com> <20231006213003.0fbac87a@aktux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231006213003.0fbac87a@aktux> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 23:25:26 -0700 (PDT) * Andreas Kemnade [231006 19:30]: > On Fri, 6 Oct 2023 13:23:48 +0300 > Tony Lindgren wrote: > > Here's what I think the regression fix for omap4 clocks would be, the > > old main_clk is not the same as the module clock that we get by default. > > If this looks OK I'll do a similar fix also for omap5. > > > > Or is something else also needed? > > > > hmm, > audio output works, the waring is away, but something new is here: OK good to hear it works, I'll send out fixes for omap4 and 5, seems the runtime PM warning is something different. > omap-mcbsp 40124000.mcbsp: Runtime PM usage count underflow! > # cat /sys/bus/platform/devices/40124000.mcbsp/power/runtime_status > active > > even with no sound. I guess if the mcbsp instance is not used, runtime PM is enabled but pm_runtime_resume_and_get() is never called by ASoC? If so then the following might be a fix, not familiar with runtime PM done by ASoC though and not sure if some kind of locking would be needed here. Regards, Tony 8< ------------------------ diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c index fdabed5133e83..b399d86f22777 100644 --- a/sound/soc/ti/omap-mcbsp.c +++ b/sound/soc/ti/omap-mcbsp.c @@ -74,14 +74,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) return 0; } - pm_runtime_put_sync(mcbsp->dev); + if (mcbsp->active) + pm_runtime_put_sync(mcbsp->dev); r = clk_set_parent(mcbsp->fclk, fck_src); if (r) dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n", src); - pm_runtime_get_sync(mcbsp->dev); + if (mcbsp->active) + pm_runtime_get_sync(mcbsp->dev); clk_put(fck_src);