From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89F56CA9EAF for ; Thu, 24 Oct 2019 16:13:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DD8120659 for ; Thu, 24 Oct 2019 16:13:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="lZkKR8ve"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="q67wTYVt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DD8120659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 45AB1170A; Thu, 24 Oct 2019 18:12:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 45AB1170A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1571933602; bh=F3MSWsoRD4eMWGjDrWgTscoBUkXch4beKTV0+1HYvCc=; h=To:References:From:Date:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=lZkKR8veRMoVi6zRGOcZX9fGpjAKOpAceTkkyady47G2pvhGngFEpoaYitGTYytkQ fGHy3BUR6wt7zB6WLdC+K2AGBz/BoegcZkHWE9zaXIkZM20120gs1YZ5P+FBafpxbf kLBLCQA6j0VYFtAqHDWQLdgRY4xjHRovHb/vZ6V4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C4644F8036B; Thu, 24 Oct 2019 18:12:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 86825F8036E; Thu, 24 Oct 2019 18:12:30 +0200 (CEST) Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A523FF80137 for ; Thu, 24 Oct 2019 18:12:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A523FF80137 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="q67wTYVt" Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 24 Oct 2019 09:12:31 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Thu, 24 Oct 2019 09:12:26 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Thu, 24 Oct 2019 09:12:26 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 24 Oct 2019 16:12:25 +0000 Received: from [10.21.133.51] (172.20.13.39) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 24 Oct 2019 16:12:23 +0000 To: Ben Dooks , , , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Thierry Reding References: <20191018154833.7560-1-ben.dooks@codethink.co.uk> <20191018154833.7560-4-ben.dooks@codethink.co.uk> From: Jon Hunter Message-ID: <2eef499e-d9d4-732a-ddd6-8d307d8cb08d@nvidia.com> Date: Thu, 24 Oct 2019 17:12:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191018154833.7560-4-ben.dooks@codethink.co.uk> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1571933551; bh=Em8zJ+xqp5ltYNyIDBW/UWmUoZdgdkvE/oX0EfLEm/w=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=q67wTYVtcDTM32b2GosfMe2EB89bArLonTeE5E5MkOPL/zd/5lZ0bgNL/aE06pWQU XIZFbDn0eQWY9hnkqWeV/u7FEaXmYKcOX5wx5U7mFJDeHaPqJmZnj0qR2cOwqZfwj8 PTPS5wveDFYJCOaubeIEZzcHhh1ehTPj9IV3f5HaWSrI3v8pCaPz7CWiD1NV7qRo/I zo3H5kBWr+dybur8UXnlli2IXoGGaHWIDkCb7GIc4YAMuGeGK5wIG8hPqlvC3wN/Cz mm6PMnHFME4obvWDSfcOghpj0ht4CoiTpvzymSUMv4CoWq5II+7IcotWC0SkM2JpFI weBwpkQwpkCjg== Cc: linux-kernel@lists.codethink.co.uk, Edward Cragg Subject: Re: [alsa-devel] [PATCH v5 3/7] ASoC: tegra: i2s: Add support for more than 2 channels X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 18/10/2019 16:48, Ben Dooks wrote: > From: Edward Cragg > > The CIF configuration and clock setting is currently hard coded for 2 > channels. Since the hardware is capable of supporting 1-8 channels add > support for reading the channel count from the supplied parameters to > allow for better TDM support. It seems the original implementation of this > driver was fixed at 2 channels for simplicity, and not implementing TDM. > > Signed-off-by: Edward Cragg > [ben.dooks@codethink.co.uk: added is_tdm and channel nr check] > [ben.dooks@codethink.co.uk: merge edge control into set-format] > [ben.dooks@codethink.co.uk: removed is_tdm and moved edge to hw_params] > Signed-off-by: Ben Dooks > --- > v2: > - fix the lrclk for dsp-b format > --- > sound/soc/tegra/tegra30_i2s.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c > index 063f34c882af..fc77e65a3646 100644 > --- a/sound/soc/tegra/tegra30_i2s.c > +++ b/sound/soc/tegra/tegra30_i2s.c > @@ -67,6 +67,7 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, > { > struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); > unsigned int mask = 0, val = 0; > + unsigned int ch_mask, ch_val = 0; > > switch (fmt & SND_SOC_DAIFMT_INV_MASK) { > case SND_SOC_DAIFMT_NB_NF: > @@ -75,6 +76,7 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, > return -EINVAL; > } > > + ch_mask = TEGRA30_I2S_CH_CTRL_EGDE_CTRL_MASK; > mask |= TEGRA30_I2S_CTRL_MASTER_ENABLE; > switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { > case SND_SOC_DAIFMT_CBS_CFS: > @@ -90,10 +92,12 @@ static int tegra30_i2s_set_fmt(struct snd_soc_dai *dai, > TEGRA30_I2S_CTRL_LRCK_MASK; > switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { > case SND_SOC_DAIFMT_DSP_A: > + ch_val = TEGRA30_I2S_CH_CTRL_EGDE_CTRL_NEG_EDGE; Sorry, I just saw the feedback on the previous iteration. I don't think we want to set the polarity but based upon the format that is passed ... https://nv-tegra.nvidia.com/gitweb/?p=linux-nvidia.git;a=blob;f=sound/soc/tegra-alt/tegra210_i2s_alt.c;h=24cf3b55326f687aded22b91182df41c5ae188ac;hb=703aa948d2c92b87fd84f367f43a07778ed098b5#l333 Cheers Jon -- nvpublic _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel