Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp775128imm; Fri, 27 Jul 2018 06:01:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcR73mxPxVDbNFA2FBskMfFxQsO345fBwpXzhjrwzV1l2OnU/8uXkAphUdXiWmfcPQoDepL X-Received: by 2002:a17:902:112b:: with SMTP id d40-v6mr6088870pla.123.1532696492720; Fri, 27 Jul 2018 06:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532696492; cv=none; d=google.com; s=arc-20160816; b=Y2kiP/gddz7SnW+i93ZQ4gXTUwieDrrevE47tfvs+yLaHf9dqEkGDLEiuPBA3NKmqA ero8YzxXnMKpteoSfkbEVptHDgeaQV+8km5FvZZsQA3seW21Y8lmXtBX4ctC+OhBVB43 85lyCbqNgyJg4/2Omhu2NmOZGOZAYHYFx39nlS76O0UaDNLngPAleiAfkZrWH1ALp2Mt EyKkPes8Uk7dQ8arqOTcGyYX2d1Qey0rM3bgJBhIpycB0L/seqE2ZIOBuZNXXaDzqfA5 iUoZ4xS0jaHQW/tzJMBii2W2uD7gx9OQDibR0K/6R8wKV7iBpMyqA7eO542UxiCHqoNI QxPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WS6AaKudslqNtaKpVQh4yw2f7kzKidAma5vLKlBRprw=; b=eyWq9EgDG30ecY0D5QZXXhly97Eox+J1d7QVoJlInGrqSePaBoedxNlM8+ayDRmZt3 v4HKZGRF2dcWXvXLSP0Li58pAWoTwEak7hSQ8kmUEgDqRSJqpURvAMa2aUkqYB5Il9SU wbM93GSiu+SlFN+xEmQe9yPcYkPBoYSh8WLBz5QASOCb2Ynny+eSQe3PthQUy7wrbGa8 CzU+48W8ahyOeujD9BUHj0tYSAc/KMepzMDX5/1a7+aDB7G+jl0zrx98QesQnGsloTf7 a9KwXpgVCJ8WbByx5vZK3I7Z3ae3lfEdNJG+kHgWzltlAugLQlX5qcw7gguKD1TX7oey 7jQA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si3856711pgc.650.2018.07.27.06.01.17; Fri, 27 Jul 2018 06:01:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733159AbeG0OVa (ORCPT + 99 others); Fri, 27 Jul 2018 10:21:30 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:57517 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731134AbeG0OV3 (ORCPT ); Fri, 27 Jul 2018 10:21:29 -0400 Received: from [148.252.241.226] (helo=ct-lt-1121.office.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1fj2LH-0008VU-Pv; Fri, 27 Jul 2018 13:59:35 +0100 From: Jorge Sanjuan To: lgirdwood@gmail.com, broonie@kernel.org Cc: jonathanh@nvidia.com, thierry.reding@gmail.com, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel@lists.codethink.co.uk Subject: [PATCH 3/4] ASoC: tegra: Allow 32-bit and 24-bit samples Date: Fri, 27 Jul 2018 13:59:30 +0100 Message-Id: <20180727125931.9794-4-jorge.sanjuan@codethink.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180727125931.9794-1-jorge.sanjuan@codethink.co.uk> References: <20180727125931.9794-1-jorge.sanjuan@codethink.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Edward Cragg The tegra3 audio can support 32 and 24 bit sample sizes so add the option to the tegra30_i2s_hw_params to configure the S32_LE/S24_LE format when requested. Signed-off-by: Ben Dooks Signed-off-by: Edward Cragg [jorge.sanjuan@codethink.co.uk: Squashed multiple patches] Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index ff1996f215ed..e26c19ef7439 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -150,6 +150,15 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream, val = TEGRA30_I2S_CTRL_BIT_SIZE_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; + sample_size = 32; + break; default: return -EINVAL; } @@ -322,14 +331,18 @@ static const struct snd_soc_dai_driver tegra30_i2s_dai_template = { .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_96000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S32_LE | + SNDRV_PCM_FMTBIT_S24_LE | + 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_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S32_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &tegra30_i2s_dai_ops, .symmetric_rates = 1, -- 2.11.0