Skip to content

Commit 961b91a

Browse files
jonhunterbroonie
authored andcommitted
ASoC: tegra: Revert 24 and 32 bit support
Commit f3ee990 ("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 <[email protected]> Signed-off-by: Jon Hunter <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
1 parent 6ba7fc9 commit 961b91a

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

sound/soc/tegra/tegra30_i2s.c

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream,
127127
struct device *dev = dai->dev;
128128
struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
129129
unsigned int mask, val, reg;
130-
int ret, sample_size, srate, i2sclock, bitcnt, audio_bits;
130+
int ret, sample_size, srate, i2sclock, bitcnt;
131131
struct tegra30_ahub_cif_conf cif_conf;
132132

133133
if (params_channels(params) != 2)
@@ -137,19 +137,8 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream,
137137
switch (params_format(params)) {
138138
case SNDRV_PCM_FORMAT_S16_LE:
139139
val = TEGRA30_I2S_CTRL_BIT_SIZE_16;
140-
audio_bits = TEGRA30_AUDIOCIF_BITS_16;
141140
sample_size = 16;
142141
break;
143-
case SNDRV_PCM_FORMAT_S24_LE:
144-
val = TEGRA30_I2S_CTRL_BIT_SIZE_24;
145-
audio_bits = TEGRA30_AUDIOCIF_BITS_24;
146-
sample_size = 24;
147-
break;
148-
case SNDRV_PCM_FORMAT_S32_LE:
149-
val = TEGRA30_I2S_CTRL_BIT_SIZE_32;
150-
audio_bits = TEGRA30_AUDIOCIF_BITS_32;
151-
sample_size = 32;
152-
break;
153142
default:
154143
return -EINVAL;
155144
}
@@ -181,8 +170,8 @@ static int tegra30_i2s_hw_params(struct snd_pcm_substream *substream,
181170
cif_conf.threshold = 0;
182171
cif_conf.audio_channels = 2;
183172
cif_conf.client_channels = 2;
184-
cif_conf.audio_bits = audio_bits;
185-
cif_conf.client_bits = audio_bits;
173+
cif_conf.audio_bits = TEGRA30_AUDIOCIF_BITS_16;
174+
cif_conf.client_bits = TEGRA30_AUDIOCIF_BITS_16;
186175
cif_conf.expand = 0;
187176
cif_conf.stereo_conv = 0;
188177
cif_conf.replicate = 0;
@@ -317,18 +306,14 @@ static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
317306
.channels_min = 2,
318307
.channels_max = 2,
319308
.rates = SNDRV_PCM_RATE_8000_96000,
320-
.formats = SNDRV_PCM_FMTBIT_S32_LE |
321-
SNDRV_PCM_FMTBIT_S24_LE |
322-
SNDRV_PCM_FMTBIT_S16_LE,
309+
.formats = SNDRV_PCM_FMTBIT_S16_LE,
323310
},
324311
.capture = {
325312
.stream_name = "Capture",
326313
.channels_min = 2,
327314
.channels_max = 2,
328315
.rates = SNDRV_PCM_RATE_8000_96000,
329-
.formats = SNDRV_PCM_FMTBIT_S32_LE |
330-
SNDRV_PCM_FMTBIT_S24_LE |
331-
SNDRV_PCM_FMTBIT_S16_LE,
316+
.formats = SNDRV_PCM_FMTBIT_S16_LE,
332317
},
333318
.ops = &tegra30_i2s_dai_ops,
334319
.symmetric_rates = 1,

0 commit comments

Comments
 (0)