ASoC: SOF: match SSP config with pcm hw params
authorJaska Uimonen <jaska.uimonen@linux.intel.com>
Fri, 26 Mar 2021 16:51:50 +0000 (18:51 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 29 Mar 2021 16:28:19 +0000 (17:28 +0100)
commitc943a586f6e49998b323afbd7f788afabf6ed89b
tree19b8cb86a570f248740fd09c74ec096caabad6d9
parente12be9fbfb91173b3aa358466ce0474823be2695
ASoC: SOF: match SSP config with pcm hw params

This patch adds a function to find a match between pcm hw params and SSP
DAI config. Config is matched against sample rate and if match is found
current config is set. If match isn't found last matched config is left
as current i.e. current config is not touched. Functionality for SSP
DAIs with 1 config remains the same as before.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210326165150.255533-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c