From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933771AbbELSm5 (ORCPT ); Tue, 12 May 2015 14:42:57 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:34911 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932870AbbELSmz (ORCPT ); Tue, 12 May 2015 14:42:55 -0400 Date: Tue, 12 May 2015 19:42:37 +0100 From: Mark Brown To: Zidan Wang Cc: nicoleotsuka@gmail.com, timur@tabi.org, Xiubo.Lee@gmail.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Message-ID: <20150512184237.GP3066@sirena.org.uk> References: <1431339894-4248-2-git-send-email-zidan.wang@freescale.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="U+NfgObvpQT1Q9Yq" Content-Disposition: inline In-Reply-To: <1431339894-4248-2-git-send-email-zidan.wang@freescale.com> X-Cookie: Auction: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 2/3] ASoC: fsl_sai: Add tdm slots operation for SAI master mode 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 --U+NfgObvpQT1Q9Yq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 11, 2015 at 06:24:42PM +0800, Zidan Wang wrote: > if (!sai->is_slave_mode) { > + slot_width = sai->slot_width; > ret = fsl_sai_set_bclk(cpu_dai, tx, > - 2 * word_width * params_rate(params)); > + sai->slots * slot_width * params_rate(params)); > if (ret) This seems to make TDM configuration mandatory which seems like a step back - if it's been set up then of course we need to use it but if it's not been configured we should be able to just infer something from hw_params as we have been doing. Checking to see if the relevant values have been set and falling back to using hw_params seems better. Otherwise this looks good. --U+NfgObvpQT1Q9Yq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVUkmcAAoJECTWi3JdVIfQbUEH+waDqZMrjdtzAac3BmjexrV8 cs0n0GKMJhoSP3ZmB9turr1jqlB/Vr9rb5Ip4IXf2jvsD42kVTTeRyJxKmM2W+43 Tz9hR4ApJpZZi29TGhvOX14xaZ3wTpByoVxDkIOVHXFnZfZKjkX6nth+61LlwWWB Tk+ihCpVIH5EgikqxQR9ggcBSy0Y2Yl7sVTVi0bI0JFCJzcpsgShVyMJrSzEb02R qWIBT2CZKJP5WtET/tKHrwsgMiMUhBDBfMna7wXjiI6+nR1dR0KDWtIz5xnRMfX+ hoQxibzqG2ijvxR21/wdAezjNBTeAGPyZaOiSTGuYOi6F6BK9sLUDwyMUCcquSw= =52TZ -----END PGP SIGNATURE----- --U+NfgObvpQT1Q9Yq--