[PATCH 2/2] soc: codecs: cpcap: set voice DAI format as specified in DT

From: Ivaylo Dimitrov

Date: Wed Aug 05 2026 - 10:53:56 EST


We can have port endpoints with different DAI formats, make sure those are
actually set-up

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@xxxxxxxxx>
---
sound/soc/codecs/cpcap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cpcap.c b/sound/soc/codecs/cpcap.c
index 987c63fc5fa4..fc41e1547bda 100644
--- a/sound/soc/codecs/cpcap.c
+++ b/sound/soc/codecs/cpcap.c
@@ -1256,6 +1256,7 @@ static int cpcap_voice_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_component *component = dai->component;
struct device *dev = component->dev;
struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
@@ -1289,7 +1290,7 @@ static int cpcap_voice_hw_params(struct snd_pcm_substream *substream,
return err;
}

- return 0;
+ return snd_soc_runtime_set_dai_fmt(rtd, rtd->dai_link->dai_fmt);
}

static int cpcap_voice_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id,
--
2.39.5