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: 4613811 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBE5EC0514 for ; Thu, 24 Jul 2014 00:50:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 21499201D3 for ; Thu, 24 Jul 2014 00:50:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D6DB6201DD for ; Thu, 24 Jul 2014 00:50:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17B606E6AB; Wed, 23 Jul 2014 17:50:06 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BF956E612 for ; Wed, 23 Jul 2014 03:22:27 -0700 (PDT) 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 Subject: Re: [PATCH v3] ASoC: tda998x: add a codec to the HDMI transmitter References: <20140708114057.5ef3cfd0@armhf> In-Reply-To: <20140708114057.5ef3cfd0@armhf> X-Mailman-Approved-At: Wed, 23 Jul 2014 17:50:04 -0700 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" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 =