![](https://secure.gravatar.com/avatar/47869f5f90adf56de5dea3fe94e7e9f1.jpg?s=120&d=mm&r=g)
4 Jul
2023
4 Jul
'23
2:17 p.m.
Hi,
I'm trying to create a sound card which has two codecs associated with one DAI. One codec is responsible for playback and the other one for capture. I can see in soc-pcm.c that __soc_pcm_hw_params() is checking if the stream is valid for the current codec with snd_soc_dai_stream_valid() and if it isn't it is not calling the hw_params() callback. But this check is not there in __soc_pcm_open() which calls snd_soc_dai_startup() for every codec. Can someone shed some light on this? Why is startup() called for codecs that don't support the current stream?
Thank you!
Best Regards, Peter Suti