From patchwork Fri Jul 26 12:08:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-yi Chiang X-Patchwork-Id: 11060907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBA4D746 for ; Fri, 26 Jul 2019 12:09:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B99A728812 for ; Fri, 26 Jul 2019 12:09:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB82628AAA; Fri, 26 Jul 2019 12:09:01 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 56B0328812 for ; Fri, 26 Jul 2019 12:09:01 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=RhULZub449L2vMrXzGZKLgRalEAEcE26P6bos5KU2QY=; b=NccyGnR23VhMnH qKZgX5m3McSZipwkjt+4iaIlGCN5sH/4EpT2dCFEsjoViQLmetQ/8f9iv4I8qv5MkXVGxocVk54qC SEJ1LBOL9LpmJOmmk4d84kVzr+fmsByTTZdmqPps6+sp8/apBK3x2ONyWDHmiaJyzusYdJ2kO0ihq GV64Isk5qxcaLyHZNvKHsrN/g2RNT1fepbeHNN6fFdgEmpXoEH/s4CFEjaEk6Mm61YWXVVy/5GAIn JBPt3c9sVfHCQbuHbNuI+Dipe+N5zlaYuSGJROD7D4Fp5slPqbl+WauEvn8j+KFGGOdKRBFeEF5UQ 094KnBXpOgO9F6xBa4Fg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hqz1u-0003wP-7s; Fri, 26 Jul 2019 12:08:58 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqz1e-0003jD-0m for linux-rockchip@lists.infradead.org; Fri, 26 Jul 2019 12:08:43 +0000 Received: by mail-pf1-x442.google.com with SMTP id g2so24444042pfq.0 for ; Fri, 26 Jul 2019 05:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cbwmacy9vNq4B+n0PukpHrIPl4ScNgVEPcJ32HL8owE=; b=AObi35zUYJig2WeybEddiDzaj/fnCxwM2Qj8U5BZrRxfR7DqT4XA6WSF7zyiUwBiqg 7yBr/+X/fyFPhrst6RV5yT7Jak4QkmSzMlIGvboPQSv6DlB5VgLqLjkRyDrp1/cFZCE5 paPvLI+dXkBmqIhc5bCOvjWN7Fk+X7xb919Ck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Cbwmacy9vNq4B+n0PukpHrIPl4ScNgVEPcJ32HL8owE=; b=AoN+3P5jzAniKdLa16W9ANT067aToZjAHFEhad+QgrFy8GVVwirwZwxpqubvXFoiiR VOMPQMZQ3tExfnCIOK8qy6Tv2aNrJdd0wJAVUr9VufBjIVVdMqjgYW2bIWKXLteBL+6m 2dn4Ux2nrB55zDnogtwVNGMaozVYJzFbVpPMGUEBNX/1dAS/N8VweFx7BPWydgMB16YD wOf9XyMtdcNqxBv0mt0Tluk23rgzQZjVhE+vRs/voQrBq8Ud3TuhTiPf92qYH6+AzivM wplSJe3oRm7JxlF7dNP3qX2qtM22UJ0pHj0OpS1AudDZ3H0w3J1IbjBGKb0+tlol3d23 ycHA== X-Gm-Message-State: APjAAAW28LBLLDDgB3bfJL5qfaeGeN2XyB9vBwsqartzj5gb65u7uJsq 5bFUO4l7ccGOdkD3qh7fOIDF3A== X-Google-Smtp-Source: APXvYqz9ldY9m4MPhE5vPXUihPALYRe2GG7mFkrh7mMDn8k9KRoYh+ADGCd1vq8cRpZmJBcyhGuM9A== X-Received: by 2002:a17:90a:bc0c:: with SMTP id w12mr65162344pjr.111.1564142920570; Fri, 26 Jul 2019 05:08:40 -0700 (PDT) Received: from localhost ([2401:fa00:1:b:e688:dfd2:a1a7:2956]) by smtp.gmail.com with ESMTPSA id m20sm54800981pff.79.2019.07.26.05.08.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jul 2019 05:08:39 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: rockchip: i2s: Revert "ASoC: rockchip: i2s: Support mono capture" Date: Fri, 26 Jul 2019 20:08:33 +0800 Message-Id: <20190726120833.186833-1-cychiang@chromium.org> X-Mailer: git-send-email 2.22.0.709.g102302147b-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190726_050842_055872_E1604C33 X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 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, dianders@chromium.org, Heiko Stuebner , Liam Girdwood , Takashi Iwai , tzungbi@chromium.org, Jaroslav Kysela , linux-rockchip@lists.infradead.org, Mark Brown , dgreid@chromium.org, mka@chromium.org, linux-arm-kernel@lists.infradead.org, Cheng-Yi Chiang Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit db51707b9c9aeedd310ebce60f15d5bb006567e0. Commit db51707b9c9a ("ASoC: rockchip: i2s: Support mono capture") adds support of mono capture to rockchip_i2s_dai. However, I2S controller is still generating a 2-channel stream because it only supports even number of channels. When user space reads the data and assumes it is a mono stream, the rate will be slowed down. Revert the change so the DAI no longer claims that mono capture is supported. Fixes: db51707b9c9a ("ASoC: rockchip: i2s: Support mono capture") Signed-off-by: Cheng-Yi Chiang --- sound/soc/rockchip/rockchip_i2s.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index 0a34d0eb8dba..88ebaf6e1880 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -326,7 +326,6 @@ 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: @@ -459,7 +458,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = { }, .capture = { .stream_name = "Capture", - .channels_min = 1, + .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = (SNDRV_PCM_FMTBIT_S8 | @@ -659,7 +658,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) } if (!of_property_read_u32(node, "rockchip,capture-channels", &val)) { - if (val >= 1 && val <= 8) + if (val >= 2 && val <= 8) soc_dai->capture.channels_max = val; }