Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp40575ybi; Fri, 26 Jul 2019 05:51:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoALISZOoad0oWNocK66r4qKZa4kHEEy/Pkf6MGrulpenju/zYxXMG6qtb7Ia8t0yGWOKH X-Received: by 2002:aa7:85d8:: with SMTP id z24mr13760564pfn.218.1564145466143; Fri, 26 Jul 2019 05:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564145466; cv=none; d=google.com; s=arc-20160816; b=LgZaQUXbaGgFynksv15JOm356iIbdiCbJ9UhtKEQK2mRo1V/u3PnrNCqRTrfB6p5pM ug43u68FmX+VWQYoWZ3mZ0N6r7fT5MW20wsww59s2OqN7rMOlW2OrmfucFpLu3ecetH0 P0R6xEcfT5+8U5TJnSwD4XAXi/lLTXe6byp98Wre6HYKD+2Licw8IDwwQ8YU6DLou/zi yCqCwynhQo++zGEdKeMF8P4TaUTMLBfzNvWmtAtAjS3IM4DtTWFxJHKv+24A6qdz0eE/ tYRxGQ09gNypBw3XWA6E4iPLh1/S/UVwwAJRS+K97aWErvgWer32GQuCarqCu70hvK1z C7uA== 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=Cbwmacy9vNq4B+n0PukpHrIPl4ScNgVEPcJ32HL8owE=; b=qHWkrTKJ+eUnbhOafvQ8HHnaucMSReKHoB+eUonly/lwZc2V1c7Ch0Ckk6GHSR2q9D WQRwF8Sj5ohggvygzBTNn0eR2SNh86Diuc8OeRsW1UUGJTV+bFBG8PVW/5cdatkzhkoS ybEyhLiKi4Axk+dUEG+9kauplGKqIYEDvu142n7Bpa0nhMtGMiYmTAKqoS+z7Lz2l57V QpkYag20mzWTGVsrnPBo4kXJ4WeftVRnCzurFMpyZW8Klv6Hc9ddJb0NOg3GqoONcDIF 13wAV+m42u9tOP3iKPxc+6wp0bCRfIc57HYXSesnRbWnsqB5dNgyF0dLAxi2GY1/ysfa JTbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AObi35zU; 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 v2si17456088pjy.48.2019.07.26.05.50.51; Fri, 26 Jul 2019 05:51:06 -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=AObi35zU; 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 S1726678AbfGZMIl (ORCPT + 99 others); Fri, 26 Jul 2019 08:08:41 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45233 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfGZMIl (ORCPT ); Fri, 26 Jul 2019 08:08:41 -0400 Received: by mail-pf1-f194.google.com with SMTP id r1so24431008pfq.12 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=PzEu1+jT2CGXJJ6QuuBwmbPSXF6BM7gIxDc/yHQWFOELBaGYTP5CxiyADQ+iRrfuqw AY8IYykWqzDHqiLb8/oXY5tWkTRxTDqH5vTqeeLuCAiXhrr+QSmkfagz4VG+RpBiwFWW oPiOnerSVnuBJLlt5G9OpFuBViUsmvys70BMGWJ7iUdEA16DfUvWqesGcyiDR4Jr2rAS szlEr1TRK9HMT5vovdbZFwwyYeUkGDfOKgtehnbdmGHDjNMyXSTI21RRWdz1lXEgHAXY 31wUDLqHZqnW2vqvnsuwldTgO+DFhniJLsNiL2rp47YznSTtajXpnMpOuVOFNf4oisgF 6VMA== X-Gm-Message-State: APjAAAUFLGy9qYIcl+dzLFJQ9tvsyA9FNCyuy2jvItZAqV4TA3G/ddvJ 4LCz/kK585HtZlIwdcFXGbj+Do2YlIc= 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 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 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 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. 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; } -- 2.22.0.709.g102302147b-goog