From patchwork Fri Jul 26 04:42:02 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: 11060193 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 CDC011398 for ; Fri, 26 Jul 2019 04:42:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B224628A58 for ; Fri, 26 Jul 2019 04:42:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1E9528A5A; Fri, 26 Jul 2019 04:42:22 +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 390EB28A58 for ; Fri, 26 Jul 2019 04:42:22 +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=vc0POEDw6VC7Jpaj0M+yEGdTCcYLztEu+IhghCdjTtA=; b=O9xocePv0bpJEg NTAyvbadZMo3mJeFYCKM8QIwR5faaqteqt6lonYLaEfS+PjezO6wlGCzNi25Mt4Lw/7/OjVQ5mIJT bNcIHnp5pE3wYrvHVfO7nEVJ5mlfWJbJwqRms936D2+cKfUojlSybijnBffecoTSjPZeHRN74yHKm 5YLPiRagKB2i7FQotJdxZ1ux89fKy2CoZ6P06rY/4M1u+sXdxmlXBWVrgYS4lUtemgnVNn6ygJI4w EAFAgIY2Wa4KT114KQOZCZLIFWIx2XHh+eNlAKdhnKpOo23+y8OqI7cxuWA6f/XyrgqRp21arpDqI lEHVgwIME5A2QkC8IO4Q==; 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 1hqs3h-00017x-MD; Fri, 26 Jul 2019 04:42:21 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hqs3d-000178-7T for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2019 04:42:18 +0000 Received: by mail-pg1-x544.google.com with SMTP id l21so24125790pgm.3 for ; Thu, 25 Jul 2019 21:42:16 -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=eq62dV3aG3jd/W9zqRWfepVRB8FhgcYvUn8Cc6l9GkA=; b=Hm635lZZN0RARpzAb9ayexcKn9YXj1XlLee2lITYorBDY2KOsISLHVejwgEYcg6Nc0 ZqhT1sHlG9s/X0ETZP/JU0sFKEZfCI/zwx6FZHpw1WBMbMM+jyC+fd8EFxcdysy7wZMH YYPvEnctY6Zda/l2Cl2oxKrjCh5ExnnUiBHjE= 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=eq62dV3aG3jd/W9zqRWfepVRB8FhgcYvUn8Cc6l9GkA=; b=cvbtgvs8sXOcS6T/DCRyzHgKhHlQ5Z5Z8xMZuuoJ90n8Y3G0oSVopCLifMp22UGAHT /NOpT/SvCdvvygL41KRc3dIGncbDhQ7h+KaUdWxE3Lz7javR5xdmlTETqSiihwvGg8fV y/YP4lpq6a6Dplr4bTjxObCLWyVkbcpAAx/TxDf+z6BijKaLbEhqV38U5PjY8dd643ST 4J8AP15+U/eaakHXwjLnc2qL5BjCFOEDEWBvjAq6yOwNcnLvuRZ15g5EQcUIaUIpkMoo hVJTJwJpmobcHuPmURux/7Twrg82FKc75wp0aRtsbaApSkFZDADhUTBKwynZzRRH+lxk WOQA== X-Gm-Message-State: APjAAAVf9tZVgc/wfsthyYnNE+pI3hqAbPuNp9p09fdA034x2Tl5/fzj ADyTarAHDIJr5k9R7zD6/hwbHQ== X-Google-Smtp-Source: APXvYqzyDNFdueHohA8SGN1O6dmRutvK/f1c35LtOqHGnJFqaLCJWNkNKPAQTGdjzMb/377e4SAgXA== X-Received: by 2002:a17:90a:9905:: with SMTP id b5mr98357683pjp.70.1564116135769; Thu, 25 Jul 2019 21:42:15 -0700 (PDT) Received: from localhost ([2401:fa00:1:b:e688:dfd2:a1a7:2956]) by smtp.gmail.com with ESMTPSA id t7sm41702252pjq.15.2019.07.25.21.42.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 21:42:14 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Subject: [PATCH] Revert "ASoC: rockchip: i2s: Support mono capture" Date: Fri, 26 Jul 2019 12:42:02 +0800 Message-Id: <20190726044202.26866-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-20190725_214217_298049_89623536 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit db51707b9c9aeedd310ebce60f15d5bb006567e0. Previous discussion in https://patchwork.kernel.org/patch/10147153/ explains the issue of the patch. While device is configured as 1-ch, hardware is still generating a 2-ch stream. When user space reads the data and assumes it is a 1-ch stream, the rate will be slower by 2x. Revert the change so 1-ch is not supported. User space can selectively take one channel data out of two channel if 1-ch is preferred. Currently, both channels record identical data. 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; }