Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1289308ybh; Thu, 16 Jul 2020 08:10:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz59E0Rwa10WahEv8K95tLBshm5oWL3MC1alLwwMujcTAzjfxWonJSUyjzCKTsA/zS/1vka X-Received: by 2002:a17:906:6d4d:: with SMTP id a13mr4052751ejt.146.1594912232438; Thu, 16 Jul 2020 08:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594912232; cv=none; d=google.com; s=arc-20160816; b=K9Xy86cMgy6cTkY/osqsEkhhR1a2ZyEM/8RZV6Wh0uvFU8Dk9Lco0kvwpLHfwYC/jZ aXo/0lGexPhT6cHplO5wrxJzKrdVnypBumRRvw7cORRQmjU6PAmHngi8L+0HNTurVcaI i+z212huyCCft9YObzELZdzk51+kQ3GK6a9hD4mTdAuCa3u+BzAh2IH1zeDRL1ng5+IX dP/JdZYAWofXS2nMGt36XQ3TfCHoJiEspYPBKJitEXhMSoXknqjL9ynO3bPUUUslFdv1 +/20HZSlMiGWw8ssdy2FoSD/wDBFmtL54xMZ6Hr1Kjh2gmHxqJ9cLoYwaTqxXraWVNAK KeZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=Mqa4+46cxFPC2LZuIyoE3br/YPBhDFJDs+fFKvkcwnk=; b=W94wCmpG0BLLCGIyJoz3gOFTBR5X9Dg8f/3nM8U1ldLldFjm3GyRhHPb68ce8vZDvd dqpjkPwOqEJ50L4DLAcT+BfT3smjXDz8JkLzuhNQyMfvp8NOeqPOhHDlN9x3utWj/FcG mTMBp8dekndNf7kWxHwEHbbJTzEtpNfAxxNwE18xTYxvKjGhjSpDHA1pOonyFfgoro5r r+vUVxweFIIIfF+7Vgm6p9VSeS39++Ovnvfkg3o2KMOA87F1HHxFtv17E8iT6dHKetqN Q3Pjl+Au12s0LgHhBu0CAev8i2ItNgCZOMj8u7qy7uJ2EMieyZevEZol1mioZk+Jxw4p hg8g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si3355555ejn.161.2020.07.16.08.10.08; Thu, 16 Jul 2020 08:10:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728725AbgGPPHd (ORCPT + 99 others); Thu, 16 Jul 2020 11:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728552AbgGPPHc (ORCPT ); Thu, 16 Jul 2020 11:07:32 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24178C08C5C0 for ; Thu, 16 Jul 2020 08:07:32 -0700 (PDT) Received: from [IPv6:2a01:e35:2fb5:1510:95f7:ce7f:fb76:c54a] (unknown [IPv6:2a01:e35:2fb5:1510:95f7:ce7f:fb76:c54a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aferraris) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id AE7552A5176; Thu, 16 Jul 2020 16:07:29 +0100 (BST) Subject: Re: [PATCH 1/2] ASoC: fsl_asrc: make sure the input and output clocks are different To: alsa-devel@alsa-project.org Cc: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Shengjiu Wang , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, kernel@collabora.com References: <20200716145201.186270-1-arnaud.ferraris@collabora.com> <20200716145201.186270-2-arnaud.ferraris@collabora.com> From: Arnaud Ferraris Autocrypt: addr=arnaud.ferraris@collabora.com; keydata= mQINBF6V3oEBEADExzr1s9YngScJ0KNMGen7k3cH1sn0h7tf7AFlXA94jXBgFyzIMT5lqey0 9LwcO6AIkFF+gRVAKIblkeacsy5W6OQXgdFMitx936oAcU0XYQ2X5NxCQHzEsWYzkLIZnFTB Ur3CW9HtAjAircED5KVJzA1GM8BEFfG3LoonWsw0CO9UN2arwT1uLARSPgL6LPpmo1IOSwJh D6vtOyzlRrLkw4KHzUobEiIjxzjXttH8TC3I6OSb8kavG08cmA+DMf/nLFxK0QbdOP2wSZ0w UTU6RBikuLmDBaT4PphuwtAgVwhO9l0PNRoYzugrXuRF0RCLpmJN05tz/o/w7Y8ieLgQE8Om xGKXJyo0T4wlUl9ARM9Y0ZIRhdI1alFspBcF63oyZmOAT+2fPLr6W0fEfmtMBhDaZun2ZdKR M1JwTTkh8jVLs3svM3Ch2JjiH0kgYA0oza5fXaB9s4Fa4fxpmacx8fawKR5r/BhmYNK15PPd YxIZJqnTJgCDI2G4tQ9K+Eev1rBo6i8n96rDqxTxdyQixMhxMmGtj6/bknpVIN947ABKDHdt UsWa4E+qwFrYDXT7RxhL+JGn4VrtIR1kpTJHfmVXnn+RW7JKdDkalvEuXJSOArszcgpDlYRq +ZT/ybdcmdtuz8+Ev0fig/9WdPBHwg5oKDlT6+iN0oISAzoFSQARAQABtC9Bcm5hdWQgRmVy cmFyaXMgPGFybmF1ZC5mZXJyYXJpc0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GeIbfT4Gp/GNOWPRp1q2lj/12AT3yh97E9PghVdOOkxdHfFRIxt6qfcinl3w0 ihwz588Q48GmFzJw0LOidtCC5tW4m2CX01Gq7qdGd92R0+S36Zjxl8n2jhypQ1zRmrngf7M5 xZQG6fKWuIur3RI= Message-ID: <1f98f8ba-5996-4653-bad6-ad46bbe6fbd1@collabora.com> Date: Thu, 16 Jul 2020 17:07:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200716145201.186270-2-arnaud.ferraris@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 16/07/2020 à 16:52, Arnaud Ferraris a écrit : > The current clock selection algorithm might select the same clock for > both input and output. This can happen when, for instance, the output > sample rate is a multiple of the input rate. > > This patch makes sure it always selects distinct input and output > clocks. > > Signed-off-by: Arnaud Ferraris > --- > sound/soc/fsl/fsl_asrc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index 02c81d2e34ad..bfd35b9c0781 100644 > --- a/sound/soc/fsl/fsl_asrc.c > +++ b/sound/soc/fsl/fsl_asrc.c > @@ -622,7 +622,8 @@ static void fsl_asrc_select_clk(struct fsl_asrc_priv *asrc_priv, > clk_rate = clk_get_rate(asrc_priv->asrck_clk[clk_index]); > /* Only match a perfect clock source with no remainder */ > if (clk_rate != 0 && (clk_rate / rate[j]) <= 1024 && > - (clk_rate % rate[j]) == 0) > + (clk_rate % rate[j]) == 0 && > + (j == 0 || i != select_clk[j-1])) > break; > } > > Well, it looks like I sent the wrong patch for this one, will send a v2 fixing this right now. Sorry about the noise. Regards, Arnaud