Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3577890pxj; Tue, 1 Jun 2021 08:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrNcfTer+EAdVxzyUcmwJXcSVuGbBCXeKTSGSkYyrH479GDjLl77UHYuAz6AEqsJhts2TU X-Received: by 2002:a05:6602:5ce:: with SMTP id w14mr2036712iox.155.1622561155466; Tue, 01 Jun 2021 08:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622561155; cv=none; d=google.com; s=arc-20160816; b=eVazOwYr5+fdM12IBCmUrGzIAfKB207X7B23XDXkbIB4BFqy4zdqR7z3D50iPb3x/0 W0Io3wEfpH829esuhOYe5TDrcVw7RZnrtm4dbeEdQYr5eW256vRtAzwRb7HoeSG5jWIT Vy/1w7fW17lm/DEgY563QnrYcn7GmOzEpX5767qDCitKPMscxs7dzi9LsM0V1GHXEWkh AI/xGivpjCH714M/AAnmrmZTl0nybCTykPZPVwwrSOgBklIA9Ec0Sk5gUnJ1UUNaiNN9 ghX/+qA6ut3K/4U+AS8+xTaTtfbwoaUzUTT7KpOI7zA+cPL3JhYkgtQ0svJmouoN2lgs kCsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=SHY1Su43K3ELrQR9CrBAbBOQHJtxQOdLocpoZ2X7Ng8=; b=qu50HQTKV69ZV4C94xE1sX1tH7moGt5T7T4Wbc66e86s3Eh4s4vUgNVc7qLM3i+Qdj vvJEzYg8h/Uiyh6/5rSrGWNPn4qqIi7nCuW/h/R6ncZ9tGMxVHPCa1n0amMYnRdMUENo p2+Z4QHU9ehMmJwjJTgQkcKS4DPcYrecg7/61DFhHK5f5nJED63zcjT7IbXlhEc4oc6b MrQIVOdgDXxxdlEgw7yPP0OlLuwq4o2SaJWsLzfY9tHVcxIf+1h3CBh1KDO0UfLlJGgq 6n1ubDTVwEvfXkfFTpNF/lfO8rzUq4o6bb7eKeNklfgkwlwtOjAB6wr2mU4gCdzkpXIy NVrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FkPjp6Fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si20767092ioi.54.2021.06.01.08.25.41; Tue, 01 Jun 2021 08:25:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FkPjp6Fb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234210AbhFAP0E (ORCPT + 99 others); Tue, 1 Jun 2021 11:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233924AbhFAP0D (ORCPT ); Tue, 1 Jun 2021 11:26:03 -0400 Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F15C061574 for ; Tue, 1 Jun 2021 08:24:22 -0700 (PDT) Received: by mail-vs1-xe35.google.com with SMTP id j15so1282071vsf.2 for ; Tue, 01 Jun 2021 08:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SHY1Su43K3ELrQR9CrBAbBOQHJtxQOdLocpoZ2X7Ng8=; b=FkPjp6FbTjUVq0pXGa6pXaYuNulBbgZ3zjSZhG9UJqpFTSCH8y84SKHJER94xQE4Cn cykpvCo8tmeqKzyTSGAEvcES7HBlyJ+TBL+c9dqLUIAeiIt66tj6Feg42qZca/cWLFrP 8IXz2k7nKsD/90QvJiwFL8082iMK1XOCW7vdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SHY1Su43K3ELrQR9CrBAbBOQHJtxQOdLocpoZ2X7Ng8=; b=N5Bqbl6plh/v+xvxEnRRinGZSYj/Rqep54hYogyu0E0S1P9/ehm0ZtD3AVfjfaHC5G fWrnNcP0/fajdCS+OBJ5JXaNb2uDfty7dej9GrlDsnLaKhPRZ3amb8sHaIusSvFvOa/E sD5onayos8j/cPvvDIyG0g8Bs/tgls0ye3DpCIPtt+zgugno/2KVFTQUGaM2vrR86Wfc uMIoLbtVQFv6Epq7etHXL1Be5f8iWefOYWnPG0kQRQ6n3sfqjOcGhcUAjC4ahknNh2BI JG02rVn+hpTR6NIrV/hvWsAn2i3Ns6h9c2SENe80ABzk3kwVocWpde34Nmjtx5aGYSAB 2CrA== X-Gm-Message-State: AOAM532ac2R4s5zacD0gytcsQHH0D/YQaN0S068HnNb+vQlgXbgZRLei Lz4u2OnwWCrBkBlwPQzs0JgDtkguDL1jtg== X-Received: by 2002:a67:ec4f:: with SMTP id z15mr19115950vso.27.1622561061186; Tue, 01 Jun 2021 08:24:21 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id m187sm496371vsc.15.2021.06.01.08.24.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 08:24:21 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id x1so8675801uau.1 for ; Tue, 01 Jun 2021 08:24:21 -0700 (PDT) X-Received: by 2002:a25:6088:: with SMTP id u130mr40579283ybb.257.1622560637314; Tue, 01 Jun 2021 08:17:17 -0700 (PDT) MIME-Version: 1.0 References: <20210524142114.18676-1-srivasam@codeaurora.org> In-Reply-To: <20210524142114.18676-1-srivasam@codeaurora.org> From: Doug Anderson Date: Tue, 1 Jun 2021 08:17:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin To: Srinivasa Rao Mandadapu Cc: Andy Gross , Bjorn Andersson , Liam Girdwood , Mark Brown , Rob Herring , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , Srinivas Kandagatla , Rohit kumar , linux-arm-msm , ALSA Development Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , Stephen Boyd , Judy Hsiao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, May 24, 2021 at 7:21 AM Srinivasa Rao Mandadapu wrote: > > This patch fixes PoP noise of around 15ms observed during audio capture begin. > Enables BCLK and LRCLK in snd_soc_dai_ops prepare call for introducing some delay > before capture start and clock enable. > > Co-developed-by: Judy Hsiao > Signed-off-by: Judy Hsiao > Signed-off-by: Srinivasa Rao Mandadapu > --- > Changes Since V2: > -- Updated comments as per linux style > -- Removed unrelated changes. > Changes Since V1: > -- Enableed BCLK and LRCLK in dai ops prepare API instead of startup API > -- Added comments > > sound/soc/qcom/lpass-cpu.c | 54 +++++++++++++++++++++++++++++++++++++- > 1 file changed, 53 insertions(+), 1 deletion(-) Presumably related with Srinivas Kandagatla's comments: this patch causes a bad splat at bootup. Specifically, here's what I saw when this patch was in the Chrome OS 5.4 kernel: ------------[ cut here ]------------ lpass_audio_core_lpaif_pri_ibit_clk already disabled WARNING: CPU: 0 PID: 2066 at drivers/clk/clk.c:958 clk_core_disable+0x4a0/0x670 CPU: 0 PID: 2066 Comm: cras Not tainted 5.4.122-lockdep #4 Hardware name: Google Lazor (rev1 - 2) with LTE (DT) pstate: 60400089 (nZCv daIf +PAN -UAO) pc : clk_core_disable+0x4a0/0x670 lr : clk_core_disable+0x4a0/0x670 sp : ffffff81727cf8a0 x29: ffffff81727cf8a0 x28: 1ffffff033d2b8d5 x27: dfffffd000000000 x26: ffffff81a3781980 x25: 1ffffff03493d3b3 x24: ffffff816f433480 x23: dfffffd000000000 x22: 1ffffff035b66e2f x21: 00000000ffffffff x20: ffffff81adb3717c x19: ffffff81adb37100 x18: 0000000000000339 x17: ffffffffffffffff x16: 0000000000000006 x15: 0000000000000001 x14: 0720072007200720 x13: 0000000000000000 x12: ffffffd0132c1e00 x11: 0000000000000001 x10: 0000000000000000 x9 : cff2cb5e2cb22e00 x8 : cff2cb5e2cb22e00 x7 : ffffffd010288f74 x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffffffd010429d10 x2 : 0000000000000001 x1 : 0000000000000008 x0 : 0000000000000034 Call trace: clk_core_disable+0x4a0/0x670 clk_disable+0x50/0x64 lpass_cpu_daiops_shutdown+0x190/0x204 [snd_soc_lpass_cpu] snd_soc_dai_shutdown+0x8c/0x9c soc_pcm_close+0x258/0x478 snd_pcm_release_substream+0xfc/0x1e8 snd_pcm_release+0x8c/0x124 __fput+0x1e4/0x4fc ____fput+0x1c/0x28 task_work_run+0x12c/0x164 do_notify_resume+0x1e04/0x2c48 work_pending+0x8/0x14 irq event stamp: 101552 -Doug