From 8ff86d20eeddb3e8f0105793e1e6dc491d9e153b Mon Sep 17 00:00:00 2001 From: Aditya Bavanari Date: Tue, 2 Dec 2025 09:30:23 +0000 Subject: [PATCH] ASoC: tegra: Fix ret in dpcm_runtime_set_dai_fmt - snd_soc_dapm_dai_get_connected_widgets returns number of valid paths which is being returned as an error code to the mixer control put callbacks of codec master mode and frame mode controls leading to them not set properly. - If the master mode mixer control is set before the frame mode control, this issue will not be observed as the fmt value is still updated in hardware. User space though, will show a wrong value. - Internal I2S loopback failed in Android sanity as the frame mode control is set before the master mode. - Modify the return value to 0 if it is >0 to fix this issue. Bug 5705385 Change-Id: I6662057503b9d5be6b71dfdb219334267ea9b9bc Signed-off-by: Aditya Bavanari Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503844 Reviewed-by: Sameer Pujar GVS: buildbot_gerritrpt Tested-by: Sheetal . Reviewed-by: Mohan kumar Reviewed-by: svcacv Reviewed-by: Sheetal . --- sound/soc/tegra/tegra_asoc_machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 313d3132..bbdf5e11 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -82,7 +82,7 @@ static int dpcm_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, out: snd_soc_dapm_dai_free_widgets(&list); - return ret; + return (ret < 0) ? ret : 0; } static int tegra_machine_codec_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,