Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11682183ybi; Thu, 25 Jul 2019 21:43:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/cV69LJiAg7GB6Vf3iPRz5Qo0iODKIIdSV28PgsLp30BAhaRboNlgb2sOnDmYqdbjbI1H X-Received: by 2002:aa7:8007:: with SMTP id j7mr19980406pfi.154.1564116185720; Thu, 25 Jul 2019 21:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564116185; cv=none; d=google.com; s=arc-20160816; b=Ml8sUw9wHB756ckftg3FPTso9gqauEZFFfmrc4FYJgmTCDEZvs/ld2Tu8qlM1Nd4Wl tvlKO6luPr9NqqrHQG7ild3grxdlzcRrW7uFaE3/b6ytFnR3xBkmYFY/RSlQG8WZ/mIJ iiK6/TN3j7GVaPIzSJVne96NDmm1zxnHSP0oWQ8X+bgEt9fhQfDD0QN7rWMqQrncultm IK6dOeC4K1vSNTtln7ShVQ6h9x8i9Bc26p2suX2Bfbk1nEW890xBHHTjbMdHm0P8AsqM 6kyRx39fEuZFcCia3WxQ1VsQG76wJmS0/N8+DueOELtfl8+iaaZSF7MWJ0GthoozCCbL 2GHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eq62dV3aG3jd/W9zqRWfepVRB8FhgcYvUn8Cc6l9GkA=; b=wqU93ANKmjVUQCPadS5nCtu5E65bVU3dzPddUqjFSnLff8Vl+Jatqfrs+8b6FDf8OO K1y5wr2xFuwc+3QLbuZdeQ5CkVaR7rwB4QPGN5bDHaMqZ2Qtlu7DQDbIe0kZUR3gA6pR 87IuSBrkygdNc/xOiczOz+aLGZVYsDoGyYcJdnKYCEKxd5qCa3dU2djyRQxlp3I2PO4d n0Ie/vk/MmzLS9WpGboJGBbWhBN2AZ10NJIyBVe5c+ZXBpbaxCXGsLOINNcdNTBY2L+6 dkmpiN5VYndjz9TH3P+7p3TW5GM3BNF9qC2Ty/iWRUw0kIJmUlXhH9O3eNAWVsOYItAq ok1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hm635lZZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si19026471pjv.99.2019.07.25.21.42.50; Thu, 25 Jul 2019 21:43:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Hm635lZZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725897AbfGZEmR (ORCPT + 99 others); Fri, 26 Jul 2019 00:42:17 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43356 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbfGZEmQ (ORCPT ); Fri, 26 Jul 2019 00:42:16 -0400 Received: by mail-pf1-f195.google.com with SMTP id i189so23860402pfg.10 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=mUFqQvoPnuio6E3b7qaDhCxJdHwC1FdZ8wJPe3XtP7IMDLWFEoPyk6ou74bmdIM0Hx MQD53rY0wX9kAfAEYRQgvBmIMI6GFuFUVx/qxUORnka4MjgUClYX9VfcpCVnp6suahum o6uL8pidg+gG6+yS4B72tlZyjusYob0IU2NTTu2gi/wszeMjsEevBTiJEm+ofZe9vHHL tSYiJ2CDGMGM1iKfVqeZafA1NZka84jQ+xWQmG5Q7NkJ8E3mjNbP0uVXvgppPvY++8Gr zsD+KNMqWnPSHZ6t+rOVpgjhTWm7UttwYHTZo5bYKFqbZi2zhfwHiPgXSZCaMUosn2ST T/cg== X-Gm-Message-State: APjAAAWp4UvnH1FAbnTOne5boQ0XRp6kTzhG+4zbEkm6MaTX0sBfap+r BwqiJO6IzlgQJkmz8WydN5HetWmkbco= 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 Cc: Mark Brown , Takashi Iwai , Liam Girdwood , Jaroslav Kysela , Heiko Stuebner , dianders@chromium.org, dgreid@chromium.org, tzungbi@chromium.org, mka@chromium.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Cheng-Yi Chiang 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.22.0.709.g102302147b-goog