I am using hw_params_fixup, but it's not enough. The first thing I do is
to not add the BE HW constraint rules in runtime->hw_constraints,
because this will potentially affect the FE HW params. If the FE does
sampling rate conversion, for example, applying the sampling rate
constrain rules from a BE codec on FE is useless. The second thing I do
is to apply these BE HW constraint rules to the BE HW params. It's true
that the BE HW params can be fine tuned via hw_params_fixup (topology,
device-tree or even static parameters) and set in such a way that avoid
the BE HW constraints, so we could ignore the constraint rules added by
their drivers. It's not every elegant and running the BE HW constraint
rules for the fixup BE HW params can be a sanity check. Also, I am
thinking that if the FE does no conversion (be_hw_params_fixup missing)
and more than one BEs are available, applying the HW constraint rules on
the same set of BE HW params could rule out the incompatible BE DAI
links and start the compatible ones only. I am not sure this is a real
usecase.