Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3506715imw; Thu, 7 Jul 2022 03:01:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vH97Q2+vd1bRMW+2B9XNobW0zk/SJ4fvWJ6tX4JnsCvJPaW9Oe1jp/SJ2AKSEtfDl3Ys9p X-Received: by 2002:a17:902:d405:b0:16b:f1ee:27c0 with SMTP id b5-20020a170902d40500b0016bf1ee27c0mr13894106ple.10.1657188108958; Thu, 07 Jul 2022 03:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657188108; cv=none; d=google.com; s=arc-20160816; b=cfmwTQVaP0OfFtUJnLUe7cL5Cc5duTwFSQUSgX3D0LtchRJekw1u5hbrKzFee0P4vk u9Or6iEdheQN/9NoTFrCHQkaLs+CDvvNRpo4dsZcZ46ab9wqs9TjDY9/f6ARzah+uAXT NPNqPqcnNX1U3ezaorCqQ99uJoFKocigSNxs/Kc7rEGrwluTKtEKo5ZT1hdgwTpl1Bq9 9LgEy79tDbpTYAYEzZ2vjF7KGzVTJX8D3ckmjnUA3EbEUgEKd0Rsot6lJK155W+apd5m b/qFBPNev9tl75dBXvY3KiTjAAtW6QgD9hBnA1LF9w3f2XaIpgTXHcmAbKqo2g16vIHq k1HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=M2iuLPi3znYre9jdhTqzIq1pKMAjj+Qt7rBhbS9PMKc=; b=vp/8pjoDqv9uCg8YmRJyKCQmDi0WN6Cogl3HHnmc/hwKozrLsZELB1XUaXk1yY/h5L uPEPSX2Muq9JliSsBk/d9BYZR9LbOk9HdQy8OknGvroCVDnb2+zT8wI7JlCik5NsJagW vYHyJPl07nOtWHm7w04mlJ3G5QBJfW3IxO3VQIWOo9IzNDqmsHTiyVYT+qAlX+xmcBJr R+fJnvWYaiKOSgj61VtkGu1Y9ntNmcJV2NOgXL5kXd4mq31RHPNng0eYdS9DqfieW4po bLADeJ2ipLDE2pwpfKPDqmD2AZ9nr3m+2orgVfZQIqaO7ItrIREbhbAyPpAEXlaMDSWu tQvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=TOmpTwpk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 75-20020a63004e000000b004116f0071dbsi30112475pga.242.2022.07.07.03.01.33; Thu, 07 Jul 2022 03:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=TOmpTwpk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235085AbiGGJxS (ORCPT + 99 others); Thu, 7 Jul 2022 05:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234897AbiGGJxR (ORCPT ); Thu, 7 Jul 2022 05:53:17 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C7D4F185; Thu, 7 Jul 2022 02:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1657187594; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M2iuLPi3znYre9jdhTqzIq1pKMAjj+Qt7rBhbS9PMKc=; b=TOmpTwpkYfoyrZfXgxN9P80ZdASQ8xAFueCXRyevhw88XDpsFtV4IV7mDsi6K5yFPNze8l dqjj9z/hQSnOThUzJif9/1cTlTT2SQMQnbV1KdyJmlCP+P6Y0ONS+RMosmXgVFSLXzw4rr s5a4qsRk8qXubcC8Ieb1GeXaMrlFpuw= Date: Thu, 07 Jul 2022 10:53:05 +0100 From: Paul Cercueil Subject: Re: [PATCH 10/11] ASoC: jz4740-i2s: Support S20_LE and S24_LE sample formats To: Aidan MacDonald Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, linux-mips@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <20220706211330.120198-11-aidanmacdonald.0x0@gmail.com> References: <20220706211330.120198-1-aidanmacdonald.0x0@gmail.com> <20220706211330.120198-11-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mer., juil. 6 2022 at 22:13:29 +0100, Aidan MacDonald=20 a =E9crit : > The audio controller on JZ47xx SoCs supports 20- and 24-bit > samples coming from memory. Allow those formats to be used > with the I2S driver. >=20 > Signed-off-by: Aidan MacDonald > --- > sound/soc/jz4740/jz4740-i2s.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/sound/soc/jz4740/jz4740-i2s.c=20 > b/sound/soc/jz4740/jz4740-i2s.c > index 80b355d715ce..ee99c5e781ec 100644 > --- a/sound/soc/jz4740/jz4740-i2s.c > +++ b/sound/soc/jz4740/jz4740-i2s.c > @@ -222,9 +222,15 @@ static int jz4740_i2s_hw_params(struct=20 > snd_pcm_substream *substream, > case SNDRV_PCM_FORMAT_S8: > sample_size =3D 0; > break; > - case SNDRV_PCM_FORMAT_S16: > + case SNDRV_PCM_FORMAT_S16_LE: > sample_size =3D 1; > break; > + case SNDRV_PCM_FORMAT_S20_LE: > + sample_size =3D 3; > + break; > + case SNDRV_PCM_FORMAT_S24_LE: > + sample_size =3D 4; > + break; Did you test these? It is unclear to me, looking at the JZ4740 PM, if=20 the 18-bit, 20-bit and 24-bit samples are in 4 bytes or 3 bytes. Cheers, -Paul > default: > return -EINVAL; > } > @@ -362,7 +368,9 @@ static const struct snd_soc_dai_ops=20 > jz4740_i2s_dai_ops =3D { > }; >=20 > #define JZ4740_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \ > - SNDRV_PCM_FMTBIT_S16_LE) > + SNDRV_PCM_FMTBIT_S16_LE | \ > + SNDRV_PCM_FMTBIT_S20_LE | \ > + SNDRV_PCM_FMTBIT_S24_LE) >=20 > static struct snd_soc_dai_driver jz4740_i2s_dai =3D { > .probe =3D jz4740_i2s_dai_probe, > -- > 2.35.1 >=20