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: 10149343 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 B69F4601A1 for ; Mon, 8 Jan 2018 12:36:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D2B127DCD for ; Mon, 8 Jan 2018 12:36:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91C802856E; Mon, 8 Jan 2018 12:36:43 +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 2A91E2852A for ; Mon, 8 Jan 2018 12:36:43 +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=/XZkWuuAzwPT3Gc3Y8iJ91PxKqtx2bQglmuNO+5zL28=; b=bF8 9cGbqA99mnOt9RbnGEG4pH3b5Yd/Cx2ZxnD5VZ3wmyDUsueu/jqLskFNT89CvDF8OCwBgAGaWHhto 0YKrL76Eh7rNlwE58KEiuonN6uHVOAamjEheqz3ioU9YVh8NSGss1QtVRRsdZWmcXUy9yTuZvZ8F0 ko76oLAVenz50E7V1/DJ4mcrHncNgIWETv/qBaeBIRa0r2rW0cklOvFkrHvCwfiXJBm5pfYKE6Dz+ b1+vozbMXhoT7NSFhHoPGyNGv29TXxNSd+8r24IJkjZqo49UNTRihVliYw25WzRE6Bcap6W3f/PNn hwR9RIKTeKV+Gdgi7dkSM4CDLqr+l5A==; 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 1eYWfR-0001wu-MH; Mon, 08 Jan 2018 12:36:41 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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; }