On 3/31/24 19:32, Kuninori Morimoto wrote:
snd_soc_dai_link_set_capabilities() checks all CPU/Codec DAI (Y)(Z) for Playback/Capture (X) and checks its validation (A), and setup dpcm_playback/capture flags (a).
void snd_soc_dai_link_set_capabilities(...) { ... (X) for_each_pcm_streams(direction) { ... (Y) for_each_link_cpus(dai_link, i, cpu) { ... (A) if (... snd_soc_dai_stream_valid(...)) { ... } } (Z) for_each_link_codecs(dai_link, i, codec) { ... (A) if (... snd_soc_dai_stream_valid(...)) { ... } } ... }
(a) dai_link->dpcm_playback = supported[...]; (a) dai_link->dpcm_capture = supported[...]; }
This validation check will be automatically done on new soc_get_playback_capture(). snd_soc_dai_link_set_capabilities() is no longer needed. Let's remove it.
Humm, this is really hard to review.
soc_get_playback_capture() used to do a verification of the match between dailink and dais, and now it doesn't have it any longer and this patch removes the checks?