Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1852348ybh; Fri, 17 Jul 2020 02:59:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBEBjc2AwZGEiA2N0PeL14iXNAunL4HOKyD9Yp+EjhHeSQVhcnV6cof4D9KlAyN0xXkmMh X-Received: by 2002:a17:906:8595:: with SMTP id v21mr8044238ejx.333.1594979980599; Fri, 17 Jul 2020 02:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594979980; cv=none; d=google.com; s=arc-20160816; b=X98p3QOpq3yViyTEGuXo05twOoRTCVwpWzt8xjquKr0oy5gUlE45/IojG1sHpxIoBh AXwR3Pl+Vjo07GwndXqE9O3fgS6VC+PCUhEQFW3ygAmJHQQ2LfJcpfIO6LnPC2OC6Pf2 YZ6iTujh3sJjQoz59sB0pha9Cg9Nv4N6GqujLyUww0aHnqNzQDHlKsWiRqMaWqXE4y/i Sdvjzl8uZNySSl9pChlfI855ivfwjAb1nzC/LNa4kINHZEW/MJRsZ1nLpUKs/P769Eq3 dahysTtSsJeTptsgkyFozn3/GMsEtzcz9TLa3ex9y5kLL2TznPz1So467dO/y7KxvzaF Q9/Q== 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=gRxpZ/70i5eGDjQBArCwiF4rPgyBCiKeAvR3Y+ZXweU=; b=SsSyiVupJN7fjAVHIRA3+z3dnZ5seCEovjWkm5HuLdRPkJRdJSwehrBL8a0uFe0F9E 0WhRvCpvlgm40bnB75SEVNaZNNYmAIBZ+c31aY+3COh4McycQm2og9xFf3L5aSe8m1E4 zWcgLsNQtpEsJ5cbeSvXeMAo+DcJi7P5r529gUCJLDeXSqXcFryTYuPkRQJ9YP0rbwNy I7TZDURbaEHT3LFAJS60fzaJcgi5r8noF1JsfLQiI9qqfgqLOHVKRV4CfhPHXTKJ68xU qtU55y2eQXduOuO4Ht62b+/2OjQqlUrdpRXf1E1AQwdRLt4Wj+PHb8ali2Jj3Eakx+5R voYg== 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 hh22si5073893ejb.85.2020.07.17.02.59.17; Fri, 17 Jul 2020 02:59:40 -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 S1726040AbgGQJ6j (ORCPT + 99 others); Fri, 17 Jul 2020 05:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbgGQJ6j (ORCPT ); Fri, 17 Jul 2020 05:58:39 -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 DE0D4C061755 for ; Fri, 17 Jul 2020 02:58:38 -0700 (PDT) Received: from [IPv6:2a01:e35:2fb5:1510:c567:382e:1974:9868] (unknown [IPv6:2a01:e35:2fb5:1510:c567:382e:1974:9868]) (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 EA4562A4F66; Fri, 17 Jul 2020 10:58:35 +0100 (BST) Subject: Re: [PATCH v2 2/2] ASoC: fsl_asrc: always use internal ratio To: Nicolin Chen Cc: alsa-devel@alsa-project.org, Timur Tabi , Xiubo Li , Fabio Estevam , Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , kernel@collabora.com, Shengjiu Wang References: <20200716145201.186270-1-arnaud.ferraris@collabora.com> <20200716151352.193451-1-arnaud.ferraris@collabora.com> <20200716151352.193451-3-arnaud.ferraris@collabora.com> <20200716233742.GA27376@Asurada-Nvidia> 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+iN0oISAzoFSQARAQABtC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YmtgZk/9daDd9NfDGVWZX2PZrHPkxiC6kJlq+ 9skF89liUCOGeIbfT4Gp/GNOWPRp1q2lj/12AT3yh97E9PghVdOOkxdHfFRIxt6qfcinl3w0 ihwz588Q48GmFzJw0LOidtCC5tW4m2CX01Gq7qdGd92R0+S36Zjxl8n2jhypQ1zRmrngf7M5 xZQG6fKWuIur3RI= Message-ID: Date: Fri, 17 Jul 2020 11:58:32 +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: <20200716233742.GA27376@Asurada-Nvidia> 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 17/07/2020 à 01:37, Nicolin Chen a écrit : >> @@ -507,8 +507,7 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair, bool use_ideal_rate) >> >> /* Enable Ideal Ratio mode */ > > The code is against the comments now -- need to update this line. It isn't, the following code still enables "Ideal Ratio" mode (see below) >> regmap_update_bits(asrc->regmap, REG_ASRCTR, >> - ASRCTR_IDRi_MASK(index) | ASRCTR_USRi_MASK(index), >> - ASRCTR_IDR(index) | ASRCTR_USR(index)); >> + ASRCTR_IDRi_MASK(index), ASRCTR_IDR(index); > > The driver falls back to ideal ratio mode if there is no matched > clock source. Your change seems to apply internal ratio mode any > way? Probably would break the fallback routine. Strictly speaking, internal ratio is only enabled when we have matched clock sources, and is used in addition to the calculated dividers (allows the ASRC to better adjust to drifting/inaccurate physical clocks). "Ideal Ratio" mode is different, and still enabled as a fallback when no clock source is matched. Ideal ratio requires both USRi and IDRi bits to be set, and that would still be the case if there is no matched clock source. The only difference my patch introduces is that USRi is always set (was previously cleared for "normal" mode), and therefore only IDRi needs to be set in order to enable ideal ratio mode. Regards, Arnaud