Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5222885ybl; Tue, 27 Aug 2019 01:03:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4gWMcsHx8AeCTPPyi5m7Rz/Oh4cLqgeoUlnyIy/vIKm8XCmmqQImHkC1JjEpSV8Ba+XOA X-Received: by 2002:a62:640e:: with SMTP id y14mr24229067pfb.222.1566893037537; Tue, 27 Aug 2019 01:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893037; cv=none; d=google.com; s=arc-20160816; b=UD3aPxNXbpRLoSUEpvqdF2sNiICdtFZx3pE7Jh3/qTnoYbdhF3fqZlufAyYZR7UySe 4J6O4LMvK2mj1YU5zF99eH0mvzC3pSitueEO6iHH6qcQqiWzS0W15h23i161dE4nogFQ huHr3QSupZt4xTmGKGmI7j15X1W+GoGUgkvI67DC4aRPzdT7O2QuUO8kwVkhcpw3EPww jn5Ozx+/eBd93XOMSmoIF21eFdg4a4o/xz0D35oyT1lP3n2aegM0dpD3TP1qLb2GyvD9 RbNlHMELkpcGMZSZp/LiuEI2sJ32KKHVFCUt42wlnqfUVSOeZnVgzTgz0aFr75qV8B+0 EV1w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EP9IXLst2DY2QI6dGIuxWPpNbgSNNzCRyav76jqWPxo=; b=g7YVVyG9QUNeC8iDWQp1tt5MtEmN43drW5AfWcZFJtekn7Vw3htLyObClJAeyhlxjn HBzDdmiYgmjsIZUWmgTQeeCPXBuucMBHfXZxoldpfc41itYw9eL27X1FnWJVXwu61ql2 VE1MPa0w67xM+Rgr5Pox5obKswrXwqz4A7l+oN49jgzDMCWvWoz+xQFhaLGHBqOnIHVz X2el85LDRUOOvY+9NVFrQ+8Ap21LJKCfJxgw5t8dHvCmwS8AXe6Hh+FqxY2T9P64YMri dNfn/9O1m7wsxPqtmHd2fKZ/9iWV9nTs5uCIBPpRVi5LP94VZTi1llEQRxEHuqr0wazx dHhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wZAyIXt6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si11953252pla.206.2019.08.27.01.03.42; Tue, 27 Aug 2019 01:03:57 -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=@kernel.org header.s=default header.b=wZAyIXt6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731719AbfH0IBP (ORCPT + 99 others); Tue, 27 Aug 2019 04:01:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:57046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731697AbfH0IBM (ORCPT ); Tue, 27 Aug 2019 04:01:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0699421872; Tue, 27 Aug 2019 08:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892871; bh=n4pNaO05dxOx6NIO4+x1P922/09WWLtMIBbVP/9Muxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wZAyIXt6mTO64F6QLSZ1cY+cJyFxQ3Y3kB/jbZJekhPXcTC8JIiaF7Tvjx8s5F9/5 6Kssm61ZGuXtwp6omNpXMdT4TH42LpvJ0hLyl8QgDJQSEu8guBQIBDOLA6Ep4qYP6f ay+BU8NyXyxt3jA+7Wyt2rJre2FHG/n9z0v5xt2o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cheng-Yi Chiang , Mark Brown , Sasha Levin Subject: [PATCH 5.2 042/162] ASoC: rockchip: Fix mono capture Date: Tue, 27 Aug 2019 09:49:30 +0200 Message-Id: <20190827072739.718169690@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072738.093683223@linuxfoundation.org> References: <20190827072738.093683223@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 789e162a6255325325bd321ab0cd51dc7e285054 ] This reverts commit db51707b9c9aeedd310ebce60f15d5bb006567e0. Revert "ASoC: rockchip: i2s: Support mono capture" 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 Link: https://lore.kernel.org/r/20190726044202.26866-1-cychiang@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 0a34d0eb8dba9..88ebaf6e1880a 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.20.1