Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5236795ybl; Tue, 27 Aug 2019 01:18:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0R7VlJMKFK+kCtyvXmD/O98lIjWFttefjI220VF8EDaN3v+gl5LIdeeoKEjLlJD76EdvW X-Received: by 2002:a17:90a:b781:: with SMTP id m1mr17477213pjr.141.1566893921339; Tue, 27 Aug 2019 01:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566893921; cv=none; d=google.com; s=arc-20160816; b=RgdfEaLTILhN44pg3uE4ji435lzeaqajSov3GELXziOaprN1sKtFmhgKYZPzVO9+PR 0i5N44EZy748/DbqioxaYIetcEcsd5hRBLb7SsbBY+ZZ/YWndHmYlghKz5WNjJh/CKwZ n3Kt/09Bfqhs2QnhBYsLlBUfWgTg7qHh5ufmvK0KK1dgfwZAMA+Wvg2DMZ10XxpDLGCe YoswzApiaecLqVaR3LZ8KZ611QKFvVDH+9A/S21aW02LPBsqTgMbvG+cYQp7QPQLk8ep g+2JWw6Uz2oFsLZRpFzmL2atsAOzm8un4b0DShJcOfm3pC3xOmaGm7J7Kwq4rq0Ir63c pc/w== 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=/OiTTvGohtPydm0cdYPSB645xSEUe7TeZNbfItxXVhQ=; b=XNBVwi4Qb4GyEt9fRVic8O5h4SfKG3HCMd0lrpSdEFfZABBBL2tVwmptmKAT30JZAV IyWOB445jW2dHbPAemTXmUdaZL/jI327Ove5XFaBfar6EC9gs5KXIk6R+NDUDIs9YGR3 8jRFA/HYHLum5Fbitp82lxnlyfHYx3P80a4hiUtMz+g0JG1h+K+lTQ2WFvbhPtrtD5MG BAAgfp58dIWSX+x/EMp/EpHdLLEOVBR92lQ1RjN4jL4ssxhYgX6w2aXkR189Cbd2O1ON wtB1PcKxOAU/2tcYYKNkZfQNdA56nAbRT/QDkrfHhobf08hLHemblRn6PKbGZgDFcetn TRXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WjRuVJNv; 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 bb7si12262067plb.303.2019.08.27.01.18.26; Tue, 27 Aug 2019 01:18:41 -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=WjRuVJNv; 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 S1730905AbfH0IPk (ORCPT + 99 others); Tue, 27 Aug 2019 04:15:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:46864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729722AbfH0HzH (ORCPT ); Tue, 27 Aug 2019 03:55:07 -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 E47A921872; Tue, 27 Aug 2019 07:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892506; bh=x8G/+spOK1KkqunKclxM5WEhUj4bsI1BAHWtozBZiWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WjRuVJNviul4QaSjqvfOPG5QAKg/NPBAsjzxvVzkaEo/I1xu1PUorGkPODq+0LoIP WF++q/hXi60/+NWLsy0D4vLJ/rgc7XJkuvWzY1WvDB8q+9PZWvLIacd0Ww63G9gsY6 QQHy86cVRnTmJHRGyY3l+24ZJmCpyp5C+qHboQJE= 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 4.19 17/98] ASoC: rockchip: Fix mono capture Date: Tue, 27 Aug 2019 09:49:56 +0200 Message-Id: <20190827072719.211225533@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072718.142728620@linuxfoundation.org> References: <20190827072718.142728620@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 60d43d53a8f5e..11399f81c92f9 100644 --- a/sound/soc/rockchip/rockchip_i2s.c +++ b/sound/soc/rockchip/rockchip_i2s.c @@ -329,7 +329,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: @@ -462,7 +461,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 | @@ -662,7 +661,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