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 <abavanari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503844
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
This commit is contained in:
Aditya Bavanari
2025-12-02 09:30:23 +00:00
committed by mobile promotions
parent f2c7bd17be
commit 8ff86d20ee

View File

@@ -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,