Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp534517ybe; Mon, 2 Sep 2019 05:38:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRXljIXxrqjoAdeoARW+ER0dzghxCKXPaprs63fo0PZtPUnWypE93j96+w/oNc+R5N2PZt X-Received: by 2002:a17:902:b18b:: with SMTP id s11mr30375055plr.1.1567427903025; Mon, 02 Sep 2019 05:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567427903; cv=none; d=google.com; s=arc-20160816; b=SKneE5pKdkmx1pMI86dbmXm77P5omoI2jPKM4xVtID6qwP285gyJjbymjrikQ2dXun 38er2xA0pA+DpfX4nqoGDpGgEHWvBHsxyxbiUn+fo+6KMTIdj3YairsOfD/9gvSjPL/5 QQaaJ+FQoHQ1isGet6SLjCSy8dXtOY5NB8JPQx33k0/4R5qAecwAN7Lptkf1nA1/3ynU YhB497oB+vYpZgkmpanNxNE++4if6ICgxGMnlY0+z71/lrgoldSrARpAFgavUl3UTSSy TxaVHpgPE+biwo7tr9A7AvoMuWBFyvDuFhLzJau/xbohiYZpbpzle7+xr/xfdT0wEWnh xtng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RHTgkM0dM8xda/qXMLAftdtWVTMspSpd+zBxKdxmYLg=; b=p+X2ou+0hLXUSbAB4CJXnjTVwHh9LWocm092jCXP+FGX4Yd7d0AxB83hMuLqdHuXL0 tDjWjYgcGcXsVjHAX10o9neVYxfORYOnkRiKuKV4Wg1wA3J0DnbikK1J3hBhX3+53tZb IGknDs0aA0TgZSzXEQFQBoN3vw61FHRIy3PB1pDDeAE7Kj7SVgao/svvUheYHxDmSDyr 0JJQHzEhEnaTroToaqZAzGAf4Eqw3PnoYiNhUlRHVeutEN4piyPbFA7IpXcz3Xu/U9QQ 3f0dlafAtj6OVRZ2PQF5Qg9L0VU7USMJWMW820wlAPx3ovPmpIxpqYGZjPZEZVuQclv2 e4EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=q2WL50s0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h24si5210082pjt.22.2019.09.02.05.38.08; Mon, 02 Sep 2019 05:38:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=q2WL50s0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731170AbfIBMC7 (ORCPT + 99 others); Mon, 2 Sep 2019 08:02:59 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41980 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730314AbfIBMC7 (ORCPT ); Mon, 2 Sep 2019 08:02:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RHTgkM0dM8xda/qXMLAftdtWVTMspSpd+zBxKdxmYLg=; b=q2WL50s09cQ8HSMxrwkyp2lQE KEWJsv8fwGb6HNa2DyeWECv+x39Wlm1WjFANRf2dfFkQxsSMQ+WXGSmtqywvNn49tNV+wqNX0L6DE +NRIZFLBN9Spw5oVoLWH4G5G4UABZdNu79sH/XvNtxpTmeb4+Mz+3iDlNReEpC6ou5FXw=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i4l2o-00039e-0O; Mon, 02 Sep 2019 12:02:50 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 1714E2742CCB; Mon, 2 Sep 2019 13:02:49 +0100 (BST) Date: Mon, 2 Sep 2019 13:02:49 +0100 From: Mark Brown To: Katsuhiro Suzuki Cc: David Yang , Daniel Drake , Hans de Goede , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] ASoC: es8316: judge PCM rate at later timing Message-ID: <20190902120248.GA5819@sirena.co.uk> References: <20190831162650.19822-1-katsuhiro@katsuster.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20190831162650.19822-1-katsuhiro@katsuster.net> X-Cookie: Lost ticket pays maximum rate. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 01, 2019 at 01:26:48AM +0900, Katsuhiro Suzuki wrote: > This patch change the judge timing about playing/capturing PCM rate. >=20 > Original code set constraints list of PCM rate limits at set_sysclk. > This strategy works well if system is using fixed rate clock. >=20 > But some boards and SoC (such as RockPro64 and RockChip I2S) has > connected SoC MCLK out to ES8316 MCLK in. In this case, SoC side I2S > will choose suitable frequency of MCLK such as fs * mclk-fs when > user starts playing or capturing. The best way to handle this is to try to support both fixed and variable clock rates, some other drivers do this by setting constraints based on MCLK only if the MCLK has been set to a non-zero value. They have the machine drivers reset the clock rate to 0 when it goes idle so that no constraints are applied then. This means that if the machine has a fixed clock there will be constraints, and that constraints get applied if one direction has started and fixed the clock, but still allows the clock to be varied where possible. --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1tBOgACgkQJNaLcl1U h9Cqsgf/QH87sADyO5H2sSFpF1Q+z94gj4FdObMAowT+MfdNXULU7KlUsVfMcZ1i uqbIgpKzNezmZ0HSIckM81LJhPki96kWttW1LV4C/0XSse0qRvmlodK8eCg5P8ah DUUrvBEd65MRMpTNKdF/QZ8QSG8CSHgDntHA1iej9N6k04LeGLVEB9N25h0Kv02R +z+mHUCQvxmh5+ql8hg2a9XvKEyOW/fslKAV57xgEHbP8ElCdwkBqVvVn1LkyldJ b+cwBXQ/4HbjHQMJB7effDFbSpRJ8GrHO/SBT78pt05pu2+8gVqy+TV7CrM2bw7m Qhv3yQbq2xzikv0Vjj3WX+Gtnsjm7g== =AnX7 -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--