Received: by 10.223.164.202 with SMTP id h10csp3684184wrb; Sat, 25 Nov 2017 14:31:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMY7AKXh9jIpo0Yk0tMSBIqoY8dEZLL7QZyJH6YMJdC7Br3qbyZErFr5PJtbaGl2YBpSu7/9 X-Received: by 10.84.241.139 with SMTP id b11mr5813760pll.352.1511649067620; Sat, 25 Nov 2017 14:31:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511649067; cv=none; d=google.com; s=arc-20160816; b=jw4xRCY6u2gudffcGPPNmvebV99gCbspvFzEckJHtVWml/ZYE3rlDi+wjd5eAJcGQs Re4FzQ9RwXnAMgc2ESLngLnVDHctGmhKfBuEfWI6VTcoa7/IiW370VHRfjg38bGCUR8V rhf5o9qZC5Tzljvo3PlSaz8iixPco/ti1b9o8V/8+ca+4ckDocBV0MFCmoz06C7U0pZn krZFNfD0PSmNwlZEEfyhlpPSicVtQnCVGzwgfUJsE1PQ/5fSG6M6e9qNlWYd92fPKQfA tTWDz4eOd5IYVM414gGawLhQZgY4SvW2jhWyiwq5B2mmi8kjYpJ3aqPJfx+AqLAwFIjx kjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=LnKG/vR45CtOOwkv6OuOclFm/cmfweE/I2RUOeV6xLs=; b=z/clLXQn02rdM5oOMBSMg7qx7q/tck+RZoVjk1oO/S3LX++OEVXjiomQJQPMsYnxw7 hnqIQtuB0lSMXdmEFI/SWhPQhTOcJTySJncOoSqIKUetpxdpIgmF1WNXxNuOIgxXNRZo 1i74/cp3dmQAGEiBXHXu2LsYyLo7kdboomkMjSpxYI0TRVDeLMFRsVwb6oGL4iYk7jJb /EwFbVqCrL4AJDEYMVVC3/JhqIm2gwvs0qxc6wIIsxEedwDwwRsKcC1FV3grk8cd0fhJ cHpvHwK+OvSvh4pCLutVMijfbKkvpRarV6Nd3FQa6MxDW3TEInxDWzVRnenEmQ22+Ybp Hsbg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si20742835plb.52.2017.11.25.14.30.55; Sat, 25 Nov 2017 14:31:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbdKYWaI (ORCPT + 81 others); Sat, 25 Nov 2017 17:30:08 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:52051 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751446AbdKYWaH (ORCPT ); Sat, 25 Nov 2017 17:30:07 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3yknn62Rcxz1qr05; Sat, 25 Nov 2017 23:30:02 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3yknn60Vbcz1qqkq; Sat, 25 Nov 2017 23:30:02 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 8gQ2tfamSu7B; Sat, 25 Nov 2017 23:30:00 +0100 (CET) X-Auth-Info: spwKMSH/cr0VlqhGaPAFd8dFkMUt1Pb0iVCEoHxafAY= Received: from jawa (89-64-27-66.dynamic.chello.pl [89.64.27.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 25 Nov 2017 23:30:00 +0100 (CET) Date: Sat, 25 Nov 2017 23:29:48 +0100 From: Lukasz Majewski To: Nicolin Chen Cc: Arnaud Mouiche , broonie@kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org, tiwai@suse.com, perex@perex.cz, lgirdwood@gmail.com, fabio.estevam@nxp.com, timur@tabi.org, caleb@crome.org, max.krummenacher@toradex.com, mpa@pengutronix.de, mail@maciej.szmigiero.name Subject: Re: [PATCH] ASoC: fsl_ssi: Override bit clock rate based on slot number Message-ID: <20171125232921.01994d72@jawa> In-Reply-To: <20170913230147.GA21287@Asurada-Nvidia> References: <1504848223-3376-1-git-send-email-nicoleotsuka@gmail.com> <2020d72a-4517-55d0-59a1-171c71f91c7b@invoxia.com> <20170912213233.GA11419@Asurada-Nvidia> <20170913230147.GA21287@Asurada-Nvidia> Organization: denx.de X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/P9/mtF/.pSIy2CD/LP33DJF"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/P9/mtF/.pSIy2CD/LP33DJF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Nicolin, > On Wed, Sep 13, 2017 at 10:02:20AM +0200, Arnaud Mouiche wrote: >=20 > > >Could you please give me a few set of examples of how you set > > >set_sysclk(), set_tdm_slot() with the current driver? The idea > > >here is to figure out a way to calculate the bclk in hw_params > > >without getting set_sysclk() involved any more. =20 >=20 > > Here is one, where a bclk =3D 4*16*fs is expected =20 >=20 > > In another setup, there are 8 x 16 bits slots, whatever the number > > of active channels is. > > In this case bclk =3D 128 * fs > > The number of slots is completely arbitrary. Some slots can even be > > reserved for communication between codecs that don't communicate > > with linux. =20 >=20 > In summary, bclk =3D sample rate * slots * slot_width; >=20 > I will update my patch soon. >=20 > > >Unfortunately, it looks like a work around to me. I understand > > >the idea of leaving set_sysclk() out there to override the bit > > >clock is convenient, but it is not a standard ALSA design and > > >may eventually introduce new problems like today. =20 > >=20 > > I agree. I'm not conservative at all concerning this question. > > I don't see a way to remove set_sysclk without breaking current TDM > > users anyway, at least for those who don't have their code > > upstreamed. =20 >=20 > Which TDM case would be broken by this removal? The only impact > that I can see is that the ASoC core returns an ENOTSUPP for a > set_sysclk() call now, which is something that a dai-link driver > should have taken care of anyway. >=20 > > All information provided through snd_soc_dai_set_tdm_slot( cpu_dai, > > mask, mask, slots, width ) should be enough > > In this case, for TDM users > >=20 > > bclk =3D slots * width * fs (where slots is !=3D channels) =20 >=20 > > will manage 99 % of the cases. > > And the remaining 1% will concern people who need to hack the kernel > > so widely they don't care about the set_sysclk removal. =20 >=20 > A patch from those people will be always welcome. >=20 > > - fsl-asoc-card.c : *something will break since > > snd_soc_dai_set_sysclk returned code is checked* =20 >=20 > I've already submitted a patch to ignore all ENOTSUPP. Nicolin, do you know what happened with this patch? I couldn't find it in current linux/master. Has it been applied to any asoc tree for being upstreamed? Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de --Sig_/P9/mtF/.pSIy2CD/LP33DJF Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAloZ7twACgkQAR8vZIA0 zr3UNwgAxc7jIVuPCbUqlreObR7s2qxgN7/9bH9gZb06a6jYk1mItbMYU6wPqB62 2FxeHSqxWxRUrAFARxpLxDOD8Wr5C86OrWs2qFL9a1ljKN2wyUCcCtWceiVNfkfP Lhq9R93SBBcYv2djUYezv5W5aOGF2kSlr7blAanf01oC48WDkBdMnTaMK9UCbxB0 u8s5gkfXAyODs68JqxvI+v4LJH9yj05hjv/ZN+cntyhJKsydZJNNiAIH37z2JmwY iql07mOzalBdsgjfMiikArgyFJQq7g+WoiVzMYUU0ldfcytZFDl6lHHtF/bUqicd Ywk9UFGdwZUUC14uZDB2iJYWGirVgg== =8trV -----END PGP SIGNATURE----- --Sig_/P9/mtF/.pSIy2CD/LP33DJF-- From 1578467299598319479@xxx Wed Sep 13 23:02:02 +0000 2017 X-GM-THRID: 1577948615970036430 X-Gmail-Labels: Inbox,Category Forums