From patchwork Mon Jan 8 12:35:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10149347 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 41828601A1 for ; Mon, 8 Jan 2018 12:36:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 290F227DCD for ; Mon, 8 Jan 2018 12:36:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DD412856B; Mon, 8 Jan 2018 12:36:47 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 B00CD27DCD for ; Mon, 8 Jan 2018 12:36:46 +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=cyo8qMCW3NL/ZXYkYSsoRKToHJy4JhZbbXlOTqW0v40=; b=Avc 5jq9xOcOnOH8SXxDRpHhEJk5neKeSPSlXj3xIOjFKDYtUNkXECT1EVbtbJr9+lzfn4+Vb/Fo3TUtl vTZI8NYDNagiS7UekzvioV/cChCm0Cu74dZlhQdV0wy9mAsHb+YcBQub6FmOphCZHk8I2bwYXlhPz K9lSDZIZZr+pcoK3MfRMbD+8AkU6rWV2ymAyMLiao/p58g+xZMlo93anEhgqOTOTbW45JqpGfspwZ AyVncbX/jit8uTWC5gkbdvVfSgLTLmPT3XTQ94GFBGDozgbB1AkV/k2ypFzfeDC+AG6m4+zqFnOJw AWl2hLVOeRV0gO3kjgB8AZDxJMokL4Q==; 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 1eYWfU-0001xu-Gu; Mon, 08 Jan 2018 12:36:44 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYWfP-0001wX-Pb; Mon, 08 Jan 2018 12:36:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=5fO9wuogZSMcyDof1TgNOSyi94yzs8ppgEiw4ST2qwQ=; b=JFddkCMznRFrkl4GUCZsIDOo5V 1n8rtoI9uSG+cqKuIoorH4nwjQXqO/y+GUOJV4C4NKKN/sP9GtI3bwNux7+IsxcOK5rKBzzmrxAsv p6Fe/gBHg2wYPG/rq3f72tk28DhZEsN7B/3WO6KLVW7CRV7ylYLKn6a5rBC+KZgIpLAEMLel7j3Ja qg8i93ZU3uY/ug4Wtre9zFHvNnFb0QNp9Mn/5XNCsm/aNznD/XcAwvwrYBLAv2XwuFKb/u5FOAq8N 4R4mStQ649pink9Wj9emrT0KHDjqTjIGTbY2oHXSA32XIjtiAtxySI5B28B+aXifozik+X5NjJOCA yHNzcYVw==; Received: from heliosphere.sirena.org.uk ([2a01:7e01::f03c:91ff:fed4:a3b6]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYWfM-0001dJ-Dl; Mon, 08 Jan 2018 12:36:37 +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=5fO9wuogZSMcyDof1TgNOSyi94yzs8ppgEiw4ST2qwQ=; b=XpqZ7b6Xu3+x RYVHZcsrTW1IyaQED/h42uih6Hag+uO38IYE5Gk2L2NW7Kq3T+X3W1CquKUBfR2Th2u0qrYABh/SF XpPRLVxWgfBywLHekApXfGh6mHv0CxkuPz/809IGbIUgYelbna7CT4NGQymeXFF5ffpX5iayw66aN TyRMY=; 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 1eYWeK-0001xQ-5n; Mon, 08 Jan 2018 12:35:32 +0000 Received: from broonie by debutante with local (Exim 4.90) (envelope-from ) id 1eYWeJ-0003HQ-NH; Mon, 08 Jan 2018 12:35:31 +0000 From: Mark Brown To: Matthias Kaehlcke Subject: Applied "ASoC: rockchip: i2s: Support mono capture" to the asoc tree In-Reply-To: <20180105221242.22083-1-mka@chromium.org> Message-Id: Date: Mon, 08 Jan 2018 12:35:31 +0000 X-Bad-Reply: In-Reply-To but no 'Re:' in Subject. 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, Heiko Stuebner , linux-kernel@vger.kernel.org, Brian Norris , Takashi Iwai , Liam Girdwood , linux-rockchip@lists.infradead.org, Mark Brown , Dylan Reid , Jaroslav Kysela , 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: rockchip: i2s: Support mono capture 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 db51707b9c9aeedd310ebce60f15d5bb006567e0 Mon Sep 17 00:00:00 2001 From: Matthias Kaehlcke Date: Fri, 5 Jan 2018 14:12:42 -0800 Subject: [PATCH] ASoC: rockchip: i2s: Support mono capture The Rockchip I2S controller only allows to configure even numbers of capture channels. It is still possible to capture monophonic audio by using dual-channel mode and ignoring the 'data' from the second channel. Signed-off-by: Matthias Kaehlcke Signed-off-by: Mark Brown --- sound/soc/rockchip/rockchip_i2s.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 908211e1d6fc..cc22ab3d10dd 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -328,6 +328,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, val |= I2S_CHN_4; break; case 2: + case 1: val |= I2S_CHN_2; break; default: @@ -460,7 +461,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = { }, .capture = { .stream_name = "Capture", - .channels_min = 2, + .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = (SNDRV_PCM_FMTBIT_S8 | @@ -654,7 +655,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) } if (!of_property_read_u32(node, "rockchip,capture-channels", &val)) { - if (val >= 2 && val <= 8) + if (val >= 1 && val <= 8) soc_dai->capture.channels_max = val; }