mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ASoC: tegra: Fix 24bit usecase
The tegra_dai_fixup function was incorrectly updating the format mask when S24_LE format was requested and DAI has 32-bit sample width incase the stream on that DAI is already running. S24_LE format uses 32-bit physical width on the DAI interface, but the format mask should remain as S24_LE to maintain proper format negotiation. The fix adds a check to skip format mask updates when S24_LE is requested and DAI sample_bits is 32. This resolves issues with RT5640 and other codecs that support 24-bit audio formats on Tegra platforms. Bug 5350165 Change-Id: Ie297a4176866c9bb3dbc9f40ac7b6d9051a879f6 Signed-off-by: Sheetal <sheetal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396978 Reviewed-by: Sameer Pujar <spujar@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Mohan kumar <mkumard@nvidia.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
//
|
||||
// tegra_mixer_control.c - Override DAI PCM parameters
|
||||
|
||||
@@ -348,6 +348,14 @@ static void tegra_dai_fixup(struct snd_soc_dai *dai,
|
||||
channels->min = channels->max = d_channels;
|
||||
|
||||
if (d_sample_bits) {
|
||||
/*
|
||||
* Skip format update when S24_LE is requested and DAI sample_bits is 32.
|
||||
* This handles the case where dai->sample_bits represents the physical
|
||||
* width for S24_LE format, which is 32 bits.
|
||||
*/
|
||||
if (d_sample_bits == 32 && snd_mask_test(mask, SNDRV_PCM_FORMAT_S24_LE))
|
||||
return;
|
||||
|
||||
snd_mask_none(mask);
|
||||
|
||||
switch (d_sample_bits) {
|
||||
|
||||
Reference in New Issue
Block a user