linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples"
@ 2020-01-31  9:19 Jon Hunter
  2020-01-31 15:38 ` Dmitry Osipenko
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jon Hunter @ 2020-01-31  9:19 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Thierry Reding
  Cc: alsa-devel, linux-tegra, linux-kernel, Ben Dooks,
	Dmitry Osipenko, Jon Hunter, stable

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.

Cc: stable@vger.kernel.org

Reported-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 sound/soc/tegra/tegra30_i2s.c | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index dbed3c5408e7..d59882ec48f1 100644
--- 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 snd_pcm_substream *substream,
 	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 snd_pcm_substream *substream,
 	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 snd_pcm_substream *substream,
 	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 tegra30_i2s_dai_template = {
 		.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,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples"
  2020-01-31  9:19 [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples" Jon Hunter
@ 2020-01-31 15:38 ` Dmitry Osipenko
  2020-01-31 16:08   ` Jon Hunter
  2020-02-01 11:27 ` Mark Brown
  2020-02-02 12:08 ` Applied "ASoC: tegra: Revert 24 and 32 bit support" to the asoc tree Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Dmitry Osipenko @ 2020-01-31 15:38 UTC (permalink / raw)
  To: Jon Hunter, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Thierry Reding, Ben Dooks
  Cc: alsa-devel, linux-tegra, linux-kernel, stable

31.01.2020 12:19, Jon Hunter пишет:
> 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.
> 
> Cc: stable@vger.kernel.org
> 
> Reported-by: Dmitry Osipenko <digetx@gmail.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---

Thanks, Jon!

Tested-by: Dmitry Osipenko <digetx@gmail.com>

Ben, looking forward to have 24bit working in 5.7 :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples"
  2020-01-31 15:38 ` Dmitry Osipenko
@ 2020-01-31 16:08   ` Jon Hunter
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Hunter @ 2020-01-31 16:08 UTC (permalink / raw)
  To: Dmitry Osipenko, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Thierry Reding, Ben Dooks
  Cc: alsa-devel, linux-tegra, linux-kernel, stable


On 31/01/2020 15:38, Dmitry Osipenko wrote:
> 31.01.2020 12:19, Jon Hunter пишет:
>> 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.
>>
>> Cc: stable@vger.kernel.org
>>
>> Reported-by: Dmitry Osipenko <digetx@gmail.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
> 
> Thanks, Jon!
> 
> Tested-by: Dmitry Osipenko <digetx@gmail.com>

Thanks. I just realised I forgot the fixes-tag ...

Fixes: f3ee99087c8c ("ASoC: tegra: Allow 24bit and 32bit samples")

Mark, let me know if you want me to resend.

Jon

-- 
nvpublic

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples"
  2020-01-31  9:19 [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples" Jon Hunter
  2020-01-31 15:38 ` Dmitry Osipenko
@ 2020-02-01 11:27 ` Mark Brown
  2020-02-02 12:08 ` Applied "ASoC: tegra: Revert 24 and 32 bit support" to the asoc tree Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-02-01 11:27 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Thierry Reding,
	alsa-devel, linux-tegra, linux-kernel, Ben Dooks,
	Dmitry Osipenko, stable

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Fri, Jan 31, 2020 at 09:19:01AM +0000, Jon Hunter wrote:
> 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

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "ASoC: tegra: Revert 24 and 32 bit support" to the asoc tree
  2020-01-31  9:19 [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples" Jon Hunter
  2020-01-31 15:38 ` Dmitry Osipenko
  2020-02-01 11:27 ` Mark Brown
@ 2020-02-02 12:08 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-02-02 12:08 UTC (permalink / raw)
  To: Jon Hunter
  Cc: alsa-devel, Ben Dooks, Dmitry Osipenko, Jaroslav Kysela,
	Liam Girdwood, linux-kernel, linux-tegra, Mark Brown, stable,
	Takashi Iwai, Thierry Reding

The patch

   ASoC: tegra: Revert 24 and 32 bit support

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 961b91a93ea27495022b2bdc3ca0f608f2c97b5f Mon Sep 17 00:00:00 2001
From: Jon Hunter <jonathanh@nvidia.com>
Date: Fri, 31 Jan 2020 09:19:01 +0000
Subject: [PATCH] ASoC: tegra: Revert 24 and 32 bit support

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 <digetx@gmail.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200131091901.13014-1-jonathanh@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
---
 sound/soc/tegra/tegra30_i2s.c | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index dbed3c5408e7..d59882ec48f1 100644
--- 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 snd_pcm_substream *substream,
 	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 snd_pcm_substream *substream,
 	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 snd_pcm_substream *substream,
 	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 tegra30_i2s_dai_template = {
 		.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,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-02 12:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31  9:19 [PATCH] Revert "ASoC: tegra: Allow 24bit and 32bit samples" Jon Hunter
2020-01-31 15:38 ` Dmitry Osipenko
2020-01-31 16:08   ` Jon Hunter
2020-02-01 11:27 ` Mark Brown
2020-02-02 12:08 ` Applied "ASoC: tegra: Revert 24 and 32 bit support" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).