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=-9.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 78C5AC433E0 for ; Mon, 27 Jul 2020 06:35:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 D90A72073E for ; Mon, 27 Jul 2020 06:35:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fb9XUO9z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D90A72073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BFVS060b6zDqWN for ; Mon, 27 Jul 2020 16:35:44 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::844; helo=mail-qt1-x844.google.com; envelope-from=shengjiu.wang@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fb9XUO9z; dkim-atps=neutral Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BFVPT4KwVzDrhC for ; Mon, 27 Jul 2020 16:33:33 +1000 (AEST) Received: by mail-qt1-x844.google.com with SMTP id s16so11428444qtn.7 for ; Sun, 26 Jul 2020 23:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w03YsC20p+dHNFM0U+uQthrGb6bTfy1HNpPAv/xPssM=; b=fb9XUO9zYs7ABnO/X0liXVU0exs845LVf7rzCAGArl4oIBDv6nRZMmTaLM/ad3gxfr WxjqZ69tAQlIm5FmiqeZkuPVAJfSDEV+FMiAAuvtJpUM2aAR0g/g/pCReUQikOfSIfUn Yonte7RtlVRG7RLZAJgn6vi89u2VC+MUH19PQZUD1dafIYgRzOMpC9pxj0z93j2BgFqA B26cuaNWywhMWJTYlfEdX57GNU//HWAZ3MbixzXamt96ER2zJiMBXpKweR2PC6xyepYh wI0Jf7tQG79YfUoegG5+Lwp3huwydPO2HasvcGqsiOVgIEsYpumF/InSmusZXpeawmM7 ZSxw== 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=w03YsC20p+dHNFM0U+uQthrGb6bTfy1HNpPAv/xPssM=; b=RBKkqdEwHXq1YC/OkmrN9FltQIOWSMF2t1Vl5mQ6kHq7TPXc1imIRy5Hz1t609m/xj aCt63AtOhjMZu/HVotnXehItWbOcdROVE9vPb+yAPGIHG/Sz8Pl4AUP4VUQfCgykXXiX BHMXeROqQivFrhULK9OSxLgLd6We+QXVSdgdw//DHCGcM8VdE/twk8p2nWK81RGXwBCD LqsJjOB4qqj2AmyB/koueM3VAZw/v53Lgx8cl+FzLL0oPSYNzmFF4yollaFJKL01mtyX sF6rrIra6Hl29bZ6rch1jPoLX2a8uph6TDGwD7ha3fmXjraCT202VFBnZ2W8ArP/nXCC 8Qkg== X-Gm-Message-State: AOAM531liNv8BjdSwiQTgpKOb69X+92akWhPFObXgwu3sdoRqsBR1VJj ruzDvnu2XsuOZ8+YuoOsxzxG3cesOnh3xJJS8+A= X-Google-Smtp-Source: ABdhPJxAach4+q/kZpihLnqh0Vmpd7JeL6MA+Nyc9iccYws64hNeTYJWYJ30qASwfI5ZNQ2LrtckCQGMba3t1dGXCXI= X-Received: by 2002:aed:2946:: with SMTP id s64mr442181qtd.204.1595831609481; Sun, 26 Jul 2020 23:33:29 -0700 (PDT) MIME-Version: 1.0 References: <1595762417-2190-1-git-send-email-shengjiu.wang@nxp.com> <20200727005558.GA30124@Asurada-Nvidia> In-Reply-To: <20200727005558.GA30124@Asurada-Nvidia> From: Shengjiu Wang Date: Mon, 27 Jul 2020 14:33:18 +0800 Message-ID: Subject: Re: [PATCH] ASoC: fsl-asoc-card: Remove fsl_asoc_card_set_bias_level function To: Nicolin Chen Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux-ALSA , Timur Tabi , Xiubo Li , Fabio Estevam , Shengjiu Wang , Takashi Iwai , Liam Girdwood , Mark Brown , linuxppc-dev@lists.ozlabs.org, linux-kernel Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jul 27, 2020 at 8:58 AM Nicolin Chen wrote: > > On Sun, Jul 26, 2020 at 07:20:17PM +0800, Shengjiu Wang wrote: > > With this case: > > aplay -Dhw:x 16khz.wav 24khz.wav > > There is sound distortion for 24khz.wav. The reason is that setting > > PLL of WM8962 with set_bias_level function, the bias level is not > > changed when 24khz.wav is played, then the PLL won't be reset, the > > clock is not correct, so distortion happens. > > > > The resolution of this issue is to remove fsl_asoc_card_set_bias_level. > > Move PLL configuration to hw_params and hw_free. > > Hmm...using set_bias_level() instead of hw_params/hw_free() was > strongly suggested by Mark when I got imx-wm8962 machine driver > upstream. So we will need his input here, although I personally > don't have a problem with it... > > > After removing fsl_asoc_card_set_bias_level, also test WM8960 case, > > it can work. > > > > Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support") > > Signed-off-by: Shengjiu Wang > > --- > > sound/soc/fsl/fsl-asoc-card.c | 149 +++++++++++++++------------------- > > 1 file changed, 66 insertions(+), 83 deletions(-) > > > > diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c > > index 4848ba61d083..0517dbb3e908 100644 > > --- a/sound/soc/fsl/fsl-asoc-card.c > > +++ b/sound/soc/fsl/fsl-asoc-card.c > > @@ -73,6 +73,7 @@ struct cpu_priv { > > * @codec_priv: CODEC private data > > * @cpu_priv: CPU private data > > * @card: ASoC card structure > > + * @is_stream_in_use: flags for release resource in hw_free > > Would love to see something shorter... Could we reuse similar > one below, borrowing from fsl_ssi driver? > > * @streams: Mask of current active streams: BIT(TX) and BIT(RX) > > > static int fsl_asoc_card_audmux_init(struct device_node *np, > > struct fsl_asoc_card_priv *priv) > > { > > @@ -611,7 +600,6 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) > > /* Diversify the card configurations */ > > if (of_device_is_compatible(np, "fsl,imx-audio-cs42888")) { > > codec_dai_name = "cs42888"; > > - priv->card.set_bias_level = NULL; > > Can check if set_bias_level is still being used with this change. Do you mean to keep this line: priv->card.set_bias_level = NULL; ? best regards wang shengjiu