Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3708441ybv; Mon, 10 Feb 2020 05:05:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyMoCkdCDAzbYiOl1VpNtYcKICXjnXViW1+43Wxi8tY1Q5PJnHIzf+lRCIuJ85DrJLNnq8R X-Received: by 2002:aca:d15:: with SMTP id 21mr770859oin.120.1581339956815; Mon, 10 Feb 2020 05:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339956; cv=none; d=google.com; s=arc-20160816; b=V5rPfFrcP68DWfvCPqbRJhC0cBIGn8RC137Af17VL+l6aPQtP67egOwujaMYoARGY0 rwZkeY38bFcVpRyttzx6uR5nZ6OEc6rwQjk17lkqD0MYH2rPcvqqL2uTTeIzDce2lGLV Fq1vZ4GQx+8mu2Q5qnePKO83nnEj0aDgrJfTXEaH/Orwmu7zb5KfsbZYiOoJyEYOvKSW pngPNBq7jBiBAv4K5r2nMEmaMw418WSOzYTn+TrC7wr3Ok2Yo8jLB6nlvcewtBXDGByb ZLBVKqAaAlE1bfuXwMTAN8uC1VZ1b0KbPRfOCTAz4bktEzRsqLhjHJ2JvyxWQIcTGSOG /qsA== 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=WcMrhU3+QMAcBFMZIqTSNda7k00jODROeH/EFUri4VE=; b=odnude7ORw+calEGtZel0Y/6wwhufW+yN8c4YkzopwQMki+un1iisGV9KHrCDqlP8r kWBA5d3ks+QAb+hnUqgHpe0GcTHxo1uBRLbY3yCs/BMVQJRVfy5rX116wIHYcahkcWZ6 nWNlfopyMXKdgU6sUSDJA4cf09IsR7hrcPHbXZe0oUISlNcDMU20QkNPnSgXyKKqbxh2 XCo1/xurYiLIuxiaDkCdPOPKoFVOMA3ViH/rRr+NRdPYdkeqzt4jXQE0ktmnGApYzXuL 4Fw8WTKLmk4Kwvu5bvPU4dpgO9qLy+5JIPcXXmQ+nAd/XFs7CrnNR7blxbTVHxpwbK2V 0mdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Te2QJnZz; 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 b2si197197ots.284.2020.02.10.05.05.44; Mon, 10 Feb 2020 05:05:56 -0800 (PST) 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=Te2QJnZz; 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 S1730672AbgBJNFS (ORCPT + 99 others); Mon, 10 Feb 2020 08:05:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:38920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729610AbgBJMkF (ORCPT ); Mon, 10 Feb 2020 07:40:05 -0500 Received: from localhost (unknown [209.37.97.194]) (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 0725920873; Mon, 10 Feb 2020 12:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338405; bh=GAM5V/8FPrfz0YntJtaRUj1MImVbYe/4Mnir3egPm9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Te2QJnZzj3Gp75siTvNkBSJHJCmqgydVb5WzeVg0azJJ2fSA/7hwD7dAgM1v7Lr7a I6Hf24jXUgxPoWvmbxevlEP9lo0XrVIy1Y/MMedq6bf7RsXfOnpA77R5tkp41hEJVo 52N548q7nJOOXajNm0aULcaEZzNnutLC0tJwmiJA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Osipenko , Jon Hunter , Mark Brown Subject: [PATCH 5.5 107/367] ASoC: tegra: Revert 24 and 32 bit support Date: Mon, 10 Feb 2020 04:30:20 -0800 Message-Id: <20200210122434.276611971@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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 From: Jon Hunter commit 961b91a93ea27495022b2bdc3ca0f608f2c97b5f upstream. Commit f3ee99087c8ca0ecfdd549ef5a94f557c42d5428 ("ASoC: tegra: Allow 24bit and 32bit samples") added 24-bit and 32-bit support for to the Tegra30 I2S driver. However, there are two additional commits that are also needed to get 24-bit and 32-bit support to work correctly. These commits are not yet applied because there are still some review comments that need to be addressed. With only this change applied, 24-bit and 32-bit support is advertised by the I2S driver, but it does not work and the audio is distorted. Therefore, revert this patch for now until the other changes are also ready. Furthermore, a clock issue with 24-bit support has been identified with this change and so if we revert this now, we can also fix that in the updated version. Reported-by: Dmitry Osipenko Signed-off-by: Jon Hunter Tested-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200131091901.13014-1-jonathanh@nvidia.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- sound/soc/tegra/tegra30_i2s.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -127,7 +127,7 @@ static int tegra30_i2s_hw_params(struct struct device *dev = dai->dev; struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); unsigned int mask, val, reg; - int ret, sample_size, srate, i2sclock, bitcnt, audio_bits; + int ret, sample_size, srate, i2sclock, bitcnt; struct tegra30_ahub_cif_conf cif_conf; if (params_channels(params) != 2) @@ -137,19 +137,8 @@ static int tegra30_i2s_hw_params(struct switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: val = TEGRA30_I2S_CTRL_BIT_SIZE_16; - audio_bits = TEGRA30_AUDIOCIF_BITS_16; sample_size = 16; break; - case SNDRV_PCM_FORMAT_S24_LE: - val = TEGRA30_I2S_CTRL_BIT_SIZE_24; - audio_bits = TEGRA30_AUDIOCIF_BITS_24; - sample_size = 24; - break; - case SNDRV_PCM_FORMAT_S32_LE: - val = TEGRA30_I2S_CTRL_BIT_SIZE_32; - audio_bits = TEGRA30_AUDIOCIF_BITS_32; - sample_size = 32; - break; default: return -EINVAL; } @@ -181,8 +170,8 @@ static int tegra30_i2s_hw_params(struct cif_conf.threshold = 0; cif_conf.audio_channels = 2; cif_conf.client_channels = 2; - cif_conf.audio_bits = audio_bits; - cif_conf.client_bits = audio_bits; + cif_conf.audio_bits = TEGRA30_AUDIOCIF_BITS_16; + cif_conf.client_bits = TEGRA30_AUDIOCIF_BITS_16; cif_conf.expand = 0; cif_conf.stereo_conv = 0; cif_conf.replicate = 0; @@ -317,18 +306,14 @@ static const struct snd_soc_dai_driver t .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_96000, - .formats = SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S24_LE | - SNDRV_PCM_FMTBIT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .capture = { .stream_name = "Capture", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_96000, - .formats = SNDRV_PCM_FMTBIT_S32_LE | - SNDRV_PCM_FMTBIT_S24_LE | - SNDRV_PCM_FMTBIT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &tegra30_i2s_dai_ops, .symmetric_rates = 1,