ipc4: Ensure pipeline component directions are synchronized
This patch addresses an issue where audio output could be silent due to the direction property of pipeline components not being set. The added code ensures that if the source component's direction is unset but the sink's direction is set, or vice versa, the direction is copied from the set component to the unset one.
This synchronization of the direction property guarantees that the pipeline's data flow is correctly established, allowing the pipeline_for_each_comp function to traverse and process all components as intended, thus resolving the silent audio output problem.
@kv2019i please take another look.
Ready to go once mandatory CI checks are green.
No further comments, so proceeding with merge.