From patchwork Mon Feb 26 11:17:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10242089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 132FB602DC for ; Mon, 26 Feb 2018 11:19:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0390529EFA for ; Mon, 26 Feb 2018 11:19:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E35A029F4E; Mon, 26 Feb 2018 11:19:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 63E7129F4D for ; Mon, 26 Feb 2018 11:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id: In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: References:List-Owner; bh=rtZiBXOCJIbzCGitZXfu1AEslUNqTvlBW/boCWEng6k=; b=WJY RaW40Wj32+axc8hT3gwQT3cIx+guLZKJc6pjxY2gpvO2VGT+rPynO4Z7niKR5AS1qwqs/lvh29XSg 0jCE4FrWnFFtA/d2u1nI/CPHW90035fVFUibmethUetCRIZpnykG8M1GuCrxs4UuFh4P4lJdUfe1z iEBJLM5x74j5jqgH3VSR83qRZUtEI4BdutHjVomiKswjun3nB6I9dBQfu50K6sB/6NRe0gS55rmDI YvV5ddEiJiwShVVlRzSsgCCQWerr+BHneX41t/JgkY5X7qbMC5YyTE0vzqEmXUC1/bQGBxU2hSyJF K4VwHSiXHUoxNWg4GBuUuGE9uVNjdvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqGoC-0003h7-4K; Mon, 26 Feb 2018 11:19:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqGnf-0003QB-8e for linux-arm-kernel@bombadil.infradead.org; Mon, 26 Feb 2018 11:18:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Date:Message-Id:In-Reply-To:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+gfV5S6wRdWOfMroO/TohUOaEqP6bCvEciedXwONNcM=; b=uaahWmNDUhcyfMLNW0TiCPZhxx gsu8flu1velSOly/S5Hv9Ks96lE7dPRehvOZKAwfdXpIV3rp44yaktcTFRdf7A2BEJpe48qVB0woy 3o7WHLMYh0SyvQ/bJ4EJUiIUEWikavugt6TvZdidTz8WGYnNK5zwOeVSDpL4RJehVZf2bQkjoaK1/ yhhM8th0RmmY8MMg7Dx4fmfh3Kvd7aLfwxljSpvv9AwfawTiDtOsvzqtWb1WaqhzAFWbbYk0KUND9 dwEyXZeV7q0oJwDCuC99wF3ImlAtyqOl72dcj6xuHpOutvouOonQm/4giorNKd+Otv/gEO2TlDzMZ ZWFJ3QkQ==; Received: from heliosphere.sirena.org.uk ([2a01:7e01::f03c:91ff:fed4:a3b6]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqGnc-0004qc-1Y for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2018 11:18:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=+gfV5S6wRdWOfMroO/TohUOaEqP6bCvEciedXwONNcM=; b=YYeOXHmRhnUS Sr9OrZ+nXnfo3xFHRxYsVPhLQo+7uODq5mndTdNZvITgfUX2owOOim2JEl32SNhc56H+EWBQrt3nf KQkB9fLpKLyqm1aMG6jbWeUdLDEKSWV//uFEqU8R9kLCT1lkIQRfCeCl6uiKF47c9+zPSalHBlXOb NLqLI=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqGmk-0007vl-Te; Mon, 26 Feb 2018 11:17:34 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1eqGmk-0005WS-EY; Mon, 26 Feb 2018 11:17:34 +0000 From: Mark Brown To: Katsuhiro Suzuki Subject: Applied "ASoC: uniphier: fix broken sound if use SRC in replay" to the asoc tree In-Reply-To: <20180223121701.13372-1-suzuki.katsuhiro@socionext.com> Message-Id: Date: Mon, 26 Feb 2018 11:17:34 +0000 X-Bad-Reply: In-Reply-To but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180226_111828_099626_CC355D0A X-CRM114-Status: GOOD ( 20.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Masami Hiramatsu , linux-kernel@vger.kernel.org, Jassi Brar , Mark Brown , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The patch ASoC: uniphier: fix broken sound if use SRC in replay has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 398fa30bf138fd4b928dc11422abfe5486aaa8fe Mon Sep 17 00:00:00 2001 From: Katsuhiro Suzuki Date: Fri, 23 Feb 2018 21:17:01 +0900 Subject: [PATCH] ASoC: uniphier: fix broken sound if use SRC in replay This patch fixes settings for ports with SRC. These ports need to set the fixed audio rate and clock. If not, the SRC outputs broken sound. Signed-off-by: Katsuhiro Suzuki Signed-off-by: Mark Brown --- sound/soc/uniphier/aio-core.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/uniphier/aio-core.c b/sound/soc/uniphier/aio-core.c index 1e5f053d9f6b..1711361fc0c2 100644 --- a/sound/soc/uniphier/aio-core.c +++ b/sound/soc/uniphier/aio-core.c @@ -501,7 +501,7 @@ int aio_port_set_clk(struct uniphier_aio_sub *sub) OPORTMXCTR2_MSSEL_MASTER | OPORTMXCTR2_EXTLSIFSSEL_36 | OPORTMXCTR2_DACCKSEL_1_2; - } else { + } else if (sub->swm->type == PORT_TYPE_SPDIF) { if (sub->aio->pll_out >= ARRAY_SIZE(v_pll)) { dev_err(dev, "PLL(%d) is invalid\n", sub->aio->pll_out); @@ -521,6 +521,11 @@ int aio_port_set_clk(struct uniphier_aio_sub *sub) v |= OPORTMXCTR2_EXTLSIFSSEL_24; break; } + } else { + v = OPORTMXCTR2_ACLKSEL_A1 | + OPORTMXCTR2_MSSEL_MASTER | + OPORTMXCTR2_EXTLSIFSSEL_36 | + OPORTMXCTR2_DACCKSEL_1_2; } regmap_write(r, OPORTMXCTR2(sub->swm->oport.map), v); } else { @@ -550,11 +555,19 @@ int aio_port_set_param(struct uniphier_aio_sub *sub, int pass_through, const struct snd_pcm_hw_params *params) { struct regmap *r = sub->aio->chip->regmap; + unsigned int rate; u32 v; int ret; if (!pass_through) { - ret = aio_port_set_rate(sub, params_rate(params)); + if (sub->swm->type == PORT_TYPE_EVE || + sub->swm->type == PORT_TYPE_CONV) { + rate = 48000; + } else { + rate = params_rate(params); + } + + ret = aio_port_set_rate(sub, rate); if (ret) return ret;