From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932105AbcF3MP4 (ORCPT ); Thu, 30 Jun 2016 08:15:56 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58584 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751975AbcF3MPx (ORCPT ); Thu, 30 Jun 2016 08:15:53 -0400 Date: Wed, 29 Jun 2016 20:13:22 +0100 From: Mark Brown To: Garlic Tseng Cc: tiwai@suse.de, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, koro.chen@mediatek.com, PC.Liao@mediatek.com, ir.lian@mediatek.com Message-ID: <20160629191322.GT6247@sirena.org.uk> References: <1466149440-23889-1-git-send-email-garlic.tseng@mediatek.com> <1466149440-23889-7-git-send-email-garlic.tseng@mediatek.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cUjMc5fB5G+GsIM6" Content-Disposition: inline In-Reply-To: <1466149440-23889-7-git-send-email-garlic.tseng@mediatek.com> X-Cookie: You are always busy. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 137.158.23.105 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [PATCH v5 6/9] ASoC: mediatek: add mt2701 platform driver implementation. X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cUjMc5fB5G+GsIM6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 17, 2016 at 03:43:57PM +0800, Garlic Tseng wrote: > +static int mt2701_afe_i2s_set_clkdiv(struct snd_soc_dai *dai, int div_id, > + int div) > +{ Why are we adding a set_clkdiv() operation? I would expect the driver to be able to figure things out automatically. > + case DIV_ID_MCLK_TO_BCK: > + afe_priv->i2s_path[i2s_num].div_mclk_to_bck = div; > + break; > + case DIV_ID_BCK_TO_LRCK: > + afe_priv->i2s_path[i2s_num].div_bck_to_lrck = div; > + break; Especially in the case where we're configuring LRCLK, that's trivial when we know the sample rate which we have to know anyway. --cUjMc5fB5G+GsIM6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXdB3RAAoJECTWi3JdVIfQ3i4H/jYWX/TMsFxkFrK4hQuSqQR9 U9z+zyvxFGVIZCKn28o0zVdrukgCeTXTnWXdqut8tnCDZU+sVmOp3bVsFk/sHUBQ eQwhiw90zbJ0pUKb8ARREX0k3MedjEdNJgxMgX9a+JK31Xo+Oafqt7FsKU9N0pP4 H10qlDNIZvBzh6oDqzgKvUI+LImcYefVTsS+TUVVIMg6Hc/IRHyVDdEG5LqBQjfv YrMRezTFDYuXQKzmTW7biNqPUn7Tm6FtjqifHx4nwvrnFwCzW9sMK1iTj0OgEKON xdh45c+oQJoXYKwrzsGMa1h7Cn2PnrJ1RzM6/apd13l+nwbvtoZV4xAKLZ09qKE= =jCnM -----END PGP SIGNATURE----- --cUjMc5fB5G+GsIM6--