]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blobdiff - queue-5.10/asoc-tegra-fix-dspk-16-bit-playback.patch
5.10-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.10 / asoc-tegra-fix-dspk-16-bit-playback.patch
diff --git a/queue-5.10/asoc-tegra-fix-dspk-16-bit-playback.patch b/queue-5.10/asoc-tegra-fix-dspk-16-bit-playback.patch
new file mode 100644 (file)
index 0000000..90a2fef
--- /dev/null
@@ -0,0 +1,53 @@
+From 2e93a29b48a017c777d4fcbfcc51aba4e6a90d38 Mon Sep 17 00:00:00 2001
+From: Sameer Pujar <spujar@nvidia.com>
+Date: Fri, 5 Apr 2024 10:43:06 +0000
+Subject: ASoC: tegra: Fix DSPK 16-bit playback
+
+From: Sameer Pujar <spujar@nvidia.com>
+
+commit 2e93a29b48a017c777d4fcbfcc51aba4e6a90d38 upstream.
+
+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: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Sameer Pujar <spujar@nvidia.com>
+Acked-by: Thierry Reding <treding@nvidia.com>
+Link: https://msgid.link/r/20240405104306.551036-1-spujar@nvidia.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/tegra/tegra186_dspk.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/sound/soc/tegra/tegra186_dspk.c
++++ b/sound/soc/tegra/tegra186_dspk.c
+@@ -1,8 +1,7 @@
+ // SPDX-License-Identifier: GPL-2.0-only
++// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ //
+ // tegra186_dspk.c - Tegra186 DSPK driver
+-//
+-// Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
+ #include <linux/clk.h>
+ #include <linux/device.h>
+@@ -241,14 +240,14 @@ static int tegra186_dspk_hw_params(struc
+               return -EINVAL;
+       }
+-      cif_conf.client_bits = TEGRA_ACIF_BITS_24;
+-
+       switch (params_format(params)) {
+       case SNDRV_PCM_FORMAT_S16_LE:
+               cif_conf.audio_bits = TEGRA_ACIF_BITS_16;
++              cif_conf.client_bits = TEGRA_ACIF_BITS_16;
+               break;
+       case SNDRV_PCM_FORMAT_S32_LE:
+               cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
++              cif_conf.client_bits = TEGRA_ACIF_BITS_24;
+               break;
+       default:
+               dev_err(dev, "unsupported format!\n");