]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: tegra: Add support for S24_LE audio format
authorRitu Chaudhary <rituc@nvidia.com>
Tue, 22 Oct 2024 04:13:30 +0000 (04:13 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 22 Oct 2024 14:06:29 +0000 (15:06 +0100)
Add support for S24_LE format for all internal and IO AHUB
modules, except for ASRC (which is already supported).

The data flow happens as mentioned below:

- ADMAIF picks 24-bit valid data and converts it to 32-bit before
  sending to internal AHUB modules. This makes the driver change
  simpler for internal AHUB modules.
- IO modules CIF converts the 32-bit data to 24-bit before sending it
  to the external world.
- To maintain consistency across modules, conversions between 24-bit
  and 32-bit occur either at ADMAIF or at the IO modules CIF.

This feature has been thoroughly tested and verified with all internal
AHUB modules on the Jetson AGX Orin Platform, as well as with the
external RT5640 codec.

Signed-off-by: Ritu Chaudhary <rituc@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Link: https://patch.msgid.link/20241022041330.3421765-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra186_dspk.c
sound/soc/tegra/tegra210_admaif.c
sound/soc/tegra/tegra210_adx.c
sound/soc/tegra/tegra210_amx.c
sound/soc/tegra/tegra210_dmic.c
sound/soc/tegra/tegra210_i2s.c
sound/soc/tegra/tegra210_i2s.h
sound/soc/tegra/tegra210_mixer.c
sound/soc/tegra/tegra210_mvc.c
sound/soc/tegra/tegra210_ope.c
sound/soc/tegra/tegra210_sfc.c

index 508128b7783edbc867b84f8d1e790ca44d96d88b..1be6c09cbe1a5f767a709bf432501294134512d3 100644 (file)
@@ -245,6 +245,7 @@ static int tegra186_dspk_hw_params(struct snd_pcm_substream *substream,
                cif_conf.audio_bits = TEGRA_ACIF_BITS_16;
                cif_conf.client_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
                cif_conf.client_bits = TEGRA_ACIF_BITS_24;
@@ -313,6 +314,7 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = {
                .channels_max = 2,
                .rates = SNDRV_PCM_RATE_8000_48000,
                .formats = SNDRV_PCM_FMTBIT_S16_LE |
+                          SNDRV_PCM_FMTBIT_S24_LE |
                           SNDRV_PCM_FMTBIT_S32_LE,
            },
        },
@@ -324,6 +326,7 @@ static struct snd_soc_dai_driver tegra186_dspk_dais[] = {
                .channels_max = 2,
                .rates = SNDRV_PCM_RATE_8000_48000,
                .formats = SNDRV_PCM_FMTBIT_S16_LE |
+                          SNDRV_PCM_FMTBIT_S24_LE |
                           SNDRV_PCM_FMTBIT_S32_LE,
            },
            .ops = &tegra186_dspk_dai_ops,
index a866aeb2719d1b4418862d7280c3368e5c94f458..58fdb0e7995428ce2377bb4ea26bd5b879f99c0c 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_admaif.c - Tegra ADMAIF driver
-//
-// Copyright (c) 2020 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -285,6 +285,11 @@ static int tegra_admaif_hw_params(struct snd_pcm_substream *substream,
                cif_conf.client_bits = TEGRA_ACIF_BITS_16;
                valid_bit = DATA_16BIT;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
+               cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
+               cif_conf.client_bits = TEGRA_ACIF_BITS_24;
+               valid_bit = DATA_32BIT;
+               break;
        case SNDRV_PCM_FORMAT_S32_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
                cif_conf.client_bits = TEGRA_ACIF_BITS_32;
@@ -561,6 +566,7 @@ static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .capture = {                                    \
@@ -570,6 +576,7 @@ static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .ops = &tegra_admaif_dai_ops,                   \
index 109f763fe211ebc53a700f5f4735d5c56ce5998c..3e6e8f51f380baa81fb145d5674c91da1040a7d5 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_adx.c - Tegra210 ADX driver
-//
-// Copyright (c) 2021-2023 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -127,6 +127,7 @@ static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -237,6 +238,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .capture = {                                    \
@@ -246,6 +248,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .ops = &tegra210_adx_in_dai_ops,                \
@@ -260,6 +263,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
                        .channels_max = 16,                     \
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
+                                  SNDRV_PCM_FMTBIT_S16_LE |    \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
@@ -269,6 +273,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
                        .channels_max = 16,                     \
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
+                                  SNDRV_PCM_FMTBIT_S16_LE |    \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
index 38a2d6ec033b404828b5e4c6f05e448a85d81da9..a9ef22c19e814e7a87ddc94f03140dd81ae1e84f 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_amx.c - Tegra210 AMX driver
-//
-// Copyright (c) 2021-2023 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -144,6 +144,7 @@ static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -266,6 +267,7 @@ static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .capture = {                                    \
@@ -275,6 +277,7 @@ static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .ops = &tegra210_amx_in_dai_ops,                \
@@ -290,6 +293,7 @@ static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .capture = {                                    \
@@ -299,6 +303,7 @@ static const struct snd_soc_dai_ops tegra210_amx_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                   SNDRV_PCM_FMTBIT_S16_LE |    \
+                                  SNDRV_PCM_FMTBIT_S24_LE |    \
                                   SNDRV_PCM_FMTBIT_S32_LE,     \
                },                                              \
                .ops = &tegra210_amx_out_dai_ops,               \
index d9b577f146dc5a74ce5162bd1571327a468e27d8..7986be71f43d6d983bb2b495193323ba48f739b8 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_dmic.c - Tegra210 DMIC driver
-//
-// Copyright (c) 2020 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -139,6 +139,7 @@ static int tegra210_dmic_hw_params(struct snd_pcm_substream *substream,
        case SNDRV_PCM_FORMAT_S16_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -325,6 +326,7 @@ static struct snd_soc_dai_driver tegra210_dmic_dais[] = {
                        .channels_max = 2,
                        .rates = SNDRV_PCM_RATE_8000_48000,
                        .formats = SNDRV_PCM_FMTBIT_S16_LE |
+                                  SNDRV_PCM_FMTBIT_S24_LE |
                                   SNDRV_PCM_FMTBIT_S32_LE,
                },
        },
@@ -336,6 +338,7 @@ static struct snd_soc_dai_driver tegra210_dmic_dais[] = {
                        .channels_max = 2,
                        .rates = SNDRV_PCM_RATE_8000_48000,
                        .formats = SNDRV_PCM_FMTBIT_S16_LE |
+                                  SNDRV_PCM_FMTBIT_S24_LE |
                                   SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_dmic_dai_ops,
index a3908b15dfdc0a31d5a2366f5e8587c10bf9bc95..07ce2dbe6c00a883471a468beca653c1a4895d83 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_i2s.c - Tegra210 I2S driver
-//
-// Copyright (c) 2020 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -629,6 +629,7 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream,
        case SNDRV_PCM_FORMAT_S16_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                cif_conf.audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -656,6 +657,11 @@ static int tegra210_i2s_hw_params(struct snd_pcm_substream *substream,
                sample_size = 16;
                cif_conf.client_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
+               val = I2S_BITS_24;
+               sample_size = 32;
+               cif_conf.client_bits = TEGRA_ACIF_BITS_24;
+               break;
        case SNDRV_PCM_FORMAT_S32_LE:
                val = I2S_BITS_32;
                sample_size = 32;
@@ -720,6 +726,7 @@ static struct snd_soc_dai_driver tegra210_i2s_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -729,6 +736,7 @@ static struct snd_soc_dai_driver tegra210_i2s_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
        },
@@ -741,6 +749,7 @@ static struct snd_soc_dai_driver tegra210_i2s_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -750,6 +759,7 @@ static struct snd_soc_dai_driver tegra210_i2s_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_i2s_dai_ops,
index fe478f3d843529a518df06c13a276ca5009e2801..543332de740547fb209b62635b30cf3d08bd7c3e 100644 (file)
@@ -1,8 +1,8 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * tegra210_i2s.h - Definitions for Tegra210 I2S driver
+/* SPDX-License-Identifier: GPL-2.0-only
+ * SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES.
+ * All rights reserved.
  *
- * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
+ * tegra210_i2s.h - Definitions for Tegra210 I2S driver
  *
  */
 
@@ -87,6 +87,7 @@
 
 #define I2S_BITS_8                             1
 #define I2S_BITS_16                            3
+#define I2S_BITS_24                            5
 #define I2S_BITS_32                            7
 #define I2S_CTRL_BIT_SIZE_MASK                 0x7
 
index e07e2f1d2f7075b279a3af05d7e0db147d9f38a6..410259d98dfb30875af899ed8735080e71fba888 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_mixer.c - Tegra210 MIXER driver
-//
-// Copyright (c) 2021 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -248,6 +248,7 @@ static int tegra210_mixer_set_audio_cif(struct tegra210_mixer *mixer,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -312,6 +313,7 @@ static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .capture = {                                    \
@@ -321,6 +323,7 @@ static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .ops = &tegra210_mixer_in_dai_ops,              \
@@ -336,6 +339,7 @@ static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .capture = {                                    \
@@ -345,6 +349,7 @@ static const struct snd_soc_dai_ops tegra210_mixer_in_dai_ops = {
                        .rates = SNDRV_PCM_RATE_8000_192000,    \
                        .formats = SNDRV_PCM_FMTBIT_S8 |        \
                                SNDRV_PCM_FMTBIT_S16_LE |       \
+                               SNDRV_PCM_FMTBIT_S24_LE |       \
                                SNDRV_PCM_FMTBIT_S32_LE,        \
                },                                              \
                .ops = &tegra210_mixer_out_dai_ops,             \
index 4ead52564ab6ec72687c173fa7f611b57773b4b2..119f1750147864275366104b20a61ab65932532e 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_mvc.c - Tegra210 MVC driver
-//
-// Copyright (c) 2021 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -441,6 +441,7 @@ static int tegra210_mvc_set_audio_cif(struct tegra210_mvc *mvc,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -569,6 +570,7 @@ static struct snd_soc_dai_driver tegra210_mvc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -578,6 +580,7 @@ static struct snd_soc_dai_driver tegra210_mvc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
        },
@@ -592,6 +595,7 @@ static struct snd_soc_dai_driver tegra210_mvc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -601,6 +605,7 @@ static struct snd_soc_dai_driver tegra210_mvc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_mvc_dai_ops,
index e2bc604e8b797be8f45b92fc5ae82e77c0cb1454..c595cec9baaba8d71df127328d2cb8080a9dd793 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_ope.c - Tegra210 OPE driver
-//
-// Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -47,6 +47,7 @@ static int tegra210_ope_set_audio_cif(struct tegra210_ope *ope,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -129,6 +130,7 @@ static struct snd_soc_dai_driver tegra210_ope_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -138,6 +140,7 @@ static struct snd_soc_dai_driver tegra210_ope_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
        },
@@ -150,6 +153,7 @@ static struct snd_soc_dai_driver tegra210_ope_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -159,6 +163,7 @@ static struct snd_soc_dai_driver tegra210_ope_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_ope_dai_ops,
index e16bbb44cc77c7825cebed5fbab157faef09a359..df88708c733ceff9e43f4308a34faca7ab08c36d 100644 (file)
@@ -1,8 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
+// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// All rights reserved.
 //
 // tegra210_sfc.c - Tegra210 SFC driver
-//
-// Copyright (c) 2021-2023 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/clk.h>
 #include <linux/device.h>
@@ -3133,6 +3133,7 @@ static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc,
        case SNDRV_PCM_FORMAT_S16_LE:
                audio_bits = TEGRA_ACIF_BITS_16;
                break;
+       case SNDRV_PCM_FORMAT_S24_LE:
        case SNDRV_PCM_FORMAT_S32_LE:
                audio_bits = TEGRA_ACIF_BITS_32;
                break;
@@ -3395,6 +3396,7 @@ static struct snd_soc_dai_driver tegra210_sfc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -3404,6 +3406,7 @@ static struct snd_soc_dai_driver tegra210_sfc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_sfc_in_dai_ops,
@@ -3417,6 +3420,7 @@ static struct snd_soc_dai_driver tegra210_sfc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .capture = {
@@ -3426,6 +3430,7 @@ static struct snd_soc_dai_driver tegra210_sfc_dais[] = {
                        .rates = SNDRV_PCM_RATE_8000_192000,
                        .formats = SNDRV_PCM_FMTBIT_S8 |
                                SNDRV_PCM_FMTBIT_S16_LE |
+                               SNDRV_PCM_FMTBIT_S24_LE |
                                SNDRV_PCM_FMTBIT_S32_LE,
                },
                .ops = &tegra210_sfc_out_dai_ops,