Skip to content

Commit 2e93a29

Browse files
pujarsbroonie
authored andcommitted
ASoC: tegra: Fix DSPK 16-bit playback
DSPK configuration is wrong for 16-bit playback and this happens because the client config is always fixed at 24-bit in hw_params(). Fix this by updating the client config to 16-bit for the respective playback. Fixes: 327ef64 ("ASoC: tegra: Add Tegra186 based DSPK driver") Cc: [email protected] Signed-off-by: Sameer Pujar <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7a1625c commit 2e93a29

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sound/soc/tegra/tegra186_dspk.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-only
2+
// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
23
//
34
// tegra186_dspk.c - Tegra186 DSPK driver
4-
//
5-
// Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
65

76
#include <linux/clk.h>
87
#include <linux/device.h>
@@ -241,14 +240,14 @@ static int tegra186_dspk_hw_params(struct snd_pcm_substream *substream,
241240
return -EINVAL;
242241
}
243242

244-
cif_conf.client_bits = TEGRA_ACIF_BITS_24;
245-
246243
switch (params_format(params)) {
247244
case SNDRV_PCM_FORMAT_S16_LE:
248245
cif_conf.audio_bits = TEGRA_ACIF_BITS_16;
246+
cif_conf.client_bits = TEGRA_ACIF_BITS_16;
249247
break;
250248
case SNDRV_PCM_FORMAT_S32_LE:
251249
cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
250+
cif_conf.client_bits = TEGRA_ACIF_BITS_24;
252251
break;
253252
default:
254253
dev_err(dev, "unsupported format!\n");

0 commit comments

Comments
 (0)