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: 4609651 Return-Path: X-Original-To: patchwork-linux-arm@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 4B46AC0514 for ; Wed, 23 Jul 2014 10:25:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 228DC201BA for ; Wed, 23 Jul 2014 10:25:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54EA820179 for ; Wed, 23 Jul 2014 10:25:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9thJ-0001G8-D2; Wed, 23 Jul 2014 10:22:57 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9thG-0001Cu-PM for linux-arm-kernel@lists.infradead.org; Wed, 23 Jul 2014 10:22:55 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140723_032255_166519_B0C7DE16 X-CRM114-Status: GOOD ( 12.83 ) X-Spam-Score: -0.7 (/) 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: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 =