From patchwork Wed Jul 23 10:22:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jackson X-Patchwork-Id: 4609631 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 28D1A9F375 for ; Wed, 23 Jul 2014 10:22:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58FC820179 for ; Wed, 23 Jul 2014 10:22:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 13BE7201BA for ; Wed, 23 Jul 2014 10:22:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E0645265720; Wed, 23 Jul 2014 12:22:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 9C65F2655E4; Wed, 23 Jul 2014 12:22:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 145F72655E4; Wed, 23 Jul 2014 12:22:18 +0200 (CEST) Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by alsa0.perex.cz (Postfix) with ESMTP id 8EFD4265607 for ; Wed, 23 Jul 2014 12:22:09 +0200 (CEST) Received: from [10.1.193.37] (e106787-lin.cambridge.arm.com [10.1.193.37]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s6NAM6HU017905; Wed, 23 Jul 2014 11:22:06 +0100 Message-ID: <53CF8CCE.3030205@arm.com> Date: Wed, 23 Jul 2014 11:22:06 +0100 From: Andrew Jackson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Jean-Francois Moine , Mark Brown , Russell King - ARM Linux References: <20140708114057.5ef3cfd0@armhf> In-Reply-To: <20140708114057.5ef3cfd0@armhf> Cc: "devicetree@vger.kernel.org" , "alsa-devel@alsa-project.org" , "lgirdwood@gmail.com" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: Re: [alsa-devel] [PATCH v3] ASoC: tda998x: add a codec to the HDMI transmitter X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/08/14 10:40, Jean-Francois Moine wrote: > This patch adds a CODEC function to the NXP TDA998x HDMI transmitter. > > The CODEC handles both I2S and S/PDIF input and does dynamic input > switch in the TDA998x I2C driver on start/stop audio streaming. > > Signed-off-by: Jean-Francois Moine > --- Shouldn't the patch also capture the current audio rate in tda998x_codec.c:tda_hw_params? Otherwise, when tda998x_drv.c:tda998x_audio_start invokes tda998x_drv.c:tda998x_configure_audio, the value of 'N' will be calculated incorrectly. So something similar to: Andrew diff --git a/drivers/gpu/drm/i2c/tda998x_codec.c b/drivers/gpu/drm/i2c/tda998x_codec.c index e7f223d..b6c4fb3 100755 --- a/drivers/gpu/drm/i2c/tda998x_codec.c +++ b/drivers/gpu/drm/i2c/tda998x_codec.c @@ -111,6 +111,7 @@ static int tda_hw_params(struct snd_pcm_substream *substream, tda998x_audio_start(priv, 0); return 0; } + priv->params.audio_sample_rate = params_rate(params); priv->params.audio_format = dai->id; priv->audio_sample_format = params_format(params); params.audio_cfg =