Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2154582iof; Tue, 7 Jun 2022 21:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEZ8ghKm7KaLL44wEKjrfhZQxw0RE6eW1DE5g4WIKUg/oeS90r61FHf+c9IXlJ8MNIDG3V X-Received: by 2002:a05:6a00:1886:b0:51b:eefe:e182 with SMTP id x6-20020a056a00188600b0051beefee182mr22421929pfh.75.1654662880581; Tue, 07 Jun 2022 21:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662880; cv=none; d=google.com; s=arc-20160816; b=buKowuu017uyjL2D6lnaxPiDnp/oyMfFgd2wgQWkEGmH5gJ9ih+2ZxrQMsb/vP1WpQ NSZI4p8AR3hWLvs2O5a6p5jpXDAzhhh1RQe6F+kZke5p5ULT5XuILsH63fkxR5wU7uzV ys847BFD96LeVrifl+eF8V7mCkAVYrl8maN8CkdIuifuGGJqRMFT5JmlyG4agIbCKRUh 6E+SnpVu/0KwONr+zFAv6XgP157/lJAH4JyWKrLU69+gHmDyc4KPAF845yhXe7qQdx35 Ll3nu5HnvBP0xl32sq+2jk61DAgrEqi3EoMPF20IRgk2zxnq1wXPFrbfG5pBd0bzCeq3 c/aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9RPPlFBcM1owfqX7l0JiicXACg5IjNXVTCDx5f4Epx8=; b=iM2zMwYXmDOCQ7XtiAX9OzHUEXFP792xMW31Qd1lyVtECeGcgHzKAsQqlN93878DQ9 GPVxlU97RbH8PyUjQAFM5C1Fui9DVbXX2X7KkAFmB1c+UAs/dVy+hl5K9XClRorgDkJH xDAjj1+T/fccxZF92DVVPgHShS1zis7QvLX/M0bPWy/jiiHFjN/g3J8qtQHrf0snfiJM BgFzA4bmgGvBAH5nTRipaVIyrYRw4DAMuAmqOJN8oILrq9+D+y8jJEFjlDpK3kI4aovE Y5VmNXPJb4X95+XxxlHZ4iJGJG4rozN+QeHCY2MBjWlrw2/L3XXTpO3JrBf3iBTgTx/s ZjPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gI6YDL0Y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d16-20020a63d710000000b003c5e1870574si26407804pgg.667.2022.06.07.21.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:34:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gI6YDL0Y; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0BE126D279; Tue, 7 Jun 2022 21:03:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243571AbiFGMV4 (ORCPT + 99 others); Tue, 7 Jun 2022 08:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243651AbiFGMVo (ORCPT ); Tue, 7 Jun 2022 08:21:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B28F7488 for ; Tue, 7 Jun 2022 05:20:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6AE1AB81F85 for ; Tue, 7 Jun 2022 12:20:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95D0BC34115; Tue, 7 Jun 2022 12:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654604455; bh=w2aQJy8XTcqWcZ5VipuId8VpFh1nL10EEwBkOwvPTtQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gI6YDL0YkG7mKXGMOKq+mUybDcF6mtaMPz2d/YmYXxLK7gjJcQ+XVgKLFrlQdEhII XNZAn5ZLGk6qOfBUrWW4u+bTVXm9tlCZd95p2CW9TXAh2xIxt1OppGcEoJugBmg3uW MUI75PkbvmCjbqliTGFW5adTAuxW3uhug5XqwrzEmvhx7fwKUCFRXUc73dexjn/0MN 5/aJI5Xjv9a6/nlVzAJXC2TyrDKfu7ks2ajEcy0aPAckWvqdmH2Phh08Dt2cRFHRvA EZooL/vzyEVRobNF/JGwj3u9ieuOuV5vw3iRqzJ21DQzT2dEbm38MAwkONlDdCL2Z7 cxwfCcgT4R3/Q== Date: Tue, 7 Jun 2022 13:20:50 +0100 From: Mark Brown To: Lukasz Majewski Cc: Liam Girdwood , linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Takashi Iwai , Jaroslav Kysela Subject: Re: [PATCH 2/3] ASoC: wm8940: Rewrite code to set proper clocks Message-ID: References: <20220606154441.20848-1-lukma@denx.de> <20220606154441.20848-2-lukma@denx.de> <20220607141309.11ec7503@ktm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oD4aHu7NoJLDSZnJ" Content-Disposition: inline In-Reply-To: <20220607141309.11ec7503@ktm> X-Cookie: Where's SANDY DUNCAN? X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oD4aHu7NoJLDSZnJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 07, 2022 at 02:13:09PM +0200, Lukasz Majewski wrote: > > On Mon, Jun 06, 2022 at 05:44:40PM +0200, Lukasz Majewski wrote: > > I don't entirely follow the above - in what way might the core adjust > > the clocking, and why would we want to allow the use of invalid > > clocks? Surely that just makes error checking worse. > Hmm, it is a bit complicated. > When I enabed wm8940 support in mainline - the first call to > wm8940_set_dai_sysclk (the set_sysclk callback) required mclk = 11997070 > frequency. > With the current code [1] the initialization of the codec returns > -EINVAL and the codec is not supported in the system: > asoc-simple-card: probe of sound failed with error -22 Well, that looks like a bug in either simple-card or it's configuration which should be fixed then (you should probably use audio-graph-card for new things BTW). If a machine driver just randomly sets a clock rate that the system can't support and doesn't want then that's a problem, presuambly it's getting that rate from somewhere. Note that this is the machine driver trying to set a clock rate, not the core. --oD4aHu7NoJLDSZnJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKfQqEACgkQJNaLcl1U h9CwNQf/SQ1IIya40BCk6cTxfy5APPyLi0PkvOK018oGnfnEu32l/1vb6bVISsbX PHvisytP3OCYODHV7aPKS3hOGYdzE6FE7dkh2BNITANR7b/2w+e035IeNDSb5pw6 VvBQSiOoKGvwiDcwC6qTf7FV7ok0IUAYiEZWs9288QnzfXy8lwEWFujAkEV/hV6q nLx9rP0vwtEIAzzqOjtOZyFWDl7XT5+EdlRvxtSQopJzBieIcFuBBJQw9FJdr1Gk Z9SrxAwfmyKeIhn5tegWV1NewUHZwaEnK7Vpc/j6LXkuhSBD20ngNMio5bTNy123 +mcivhXqL5A9VKdjhg1FpAdOWdBAFg== =nfuP -----END PGP SIGNATURE----- --oD4aHu7NoJLDSZnJ--