ASoC: codecs: cpcap: set voice DAI format as specified in DT

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@gmail.com>
Link: https://patch.msgid.link/20260805144434.1290261-3-ivo.g.dimitrov.75@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Ivaylo Dimitrov 2026-08-05 17:44:34 +03:00 committed by Mark Brown
parent 24fb36c193
commit 26a92a6968
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

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